Hi Erel,
I've download a new version and test about anchor feature. I create panel1 and 3 buttons.
The first step,I create button1 on the panel1,the second step,I create button2 by duplicated button1 and the last step,I create button3 as same as do button1. My problem are:
1. after run,I see only button2
2. In designer,button2's parent is activity isn't panel1 as same as button's parent.
About the "invisible views". Change their anchor to LEFT, TOP and you will see that their dimensions are 0 or negative values.
You should understand how BOTH anchor works. Horizontal BOTH means that the distance to the left edge and the distance to the right edge are constant. This means that the width will change automatically.
Play with the panel width (in the abstract designer). You will see how the width changes together with the panel. If you decrease the panel's width too much the views will disappear.
BOTH should usually used with large views that are close to their parents bounds.
Hi Erel,
I've tried to set button1's parent is activity ,but button2 and button3 still have parent is panel1. Why are button2 and button3 not show? Please test a new sourcecode.
P.S. I think that Bring to Front munu and Send to back menu have problems in post#3,I cann't do them.
They are not visible because their vertical anchor is not "correct". It is set to BOTH and the distance from the top is 360. So when you rotate the device their height becomes a negative value.
You should only use BOTH for large views that should fill the available area.
Hi Erel,
I've succeeded to understand anchored view,but I'm not clearly, I have question about this anchored view tutorial that every views' parent is always activity ,or not ? (in my case which has panel1) Can I set buttons' prarents are panel1,cann't I?