Friday 15 June 2012

android - Framelayout behaviour -


What do I know about framelit, with the most recently added child on top, the child scene in a stack Are drawn. This is also on the official document page.

I have seen that it behaves like this, but with the past few experiences I have seen that children located below the stack are also available for example

  Lt; Framelate & gt; & Lt; Button1 & gt; // should not be accessible & lt; Button2 & gt; // should be accessible & lt; / Framelayout & gt;   

But I can also click on the 2 button, how the framelet actually behaves. This is the only layout I can not find.

I've found that children are also accessible at the bottom of the stack

Touch events go to the widget which is at the top of the Z-axis on the touch event's X / Y coordinate relative layout has the same effect.

& lt; Button1 & gt; // should be accessible & lt; Button2 & gt; // should not be accessible

This is incorrect after a child of frame layout or relative layout -With more on the axis, the float at the top of button2 button1 , where they will overlap. If button1 is visible, then the user can tap that visible part and the button1 will receive that touch event. button2 , because it is above the widget pile in FrameLayout , will always be visible and will always be eligible for touch events in its visible area.

No comments:

Post a Comment