android - View disappear while using relativelayout's "toLeftof" -


i'm using android's relativelayout, trying make 2 buttons align side side. but, when use layout_toleftof, button02 disappear. it's fine if use layout_torightof. knows why?

<button      android:id="@+id/button01"      android:layout_alignparentleft="true"      android:layout_height="wrap_content"      android:layout_width="wrap_content"      android:text="@+id/button01"> </button>  <button      android:id="@+id/button02"      android:layout_height="wrap_content"      android:layout_width="wrap_content"      android:text="@+id/button02"      android:layout_toleftof="@+id/button01"     android:layout_aligntop="@+id/button01"      android:layout_alignbottom="@+id/button01"      > </button> 

that's because first 1 aligned left; if put second button left of first one, outside screen.

so, if change

android:layout_alignparentleft="true" 

to

android:layout_alignparentright="true" 

in first button?


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -