Friday, March 28, 2014

Android controls in top issues in viewgroup


There are many viewgroup imageview controls, when I touch a control when the control is on display in the outermost (that is on the top floor is not blocked), I did not realize how bringToFront this function?
<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
Great God who helped me to think of a way to achieve
Reply:
1 What is your viewgroup
2, to determine the overlap in controls in a parent do?
3, make sure you touch the controls, the controls you really want to top it?
Reply:
Try ViewGroup's bringChildToFront (View child) method.
Reply:
With ViewGroup's bringChildToFront (View child) method does not work
Reply:
myViewGroup is my custom (inherited viewGroup), all my controls are placed myViewGroup container and the container is placed framelayout myViewGroup view layout,
Reply:
If you do not myViewGroup, directly to the controls on the framelayout layout, then bringtofront This function can feel very strange, anyone know how to solve it?
Reply:

1, note bringtofront rewrite.

2, let your myViewGroup inherited from framelayout

No comments:

Post a Comment