Hi All, I have a requirement that a view (for instance, Button) has to be aligned at the bottom of a RelativeLayout, which has some background image.
When I give bottom alignment the view (Button), the background of RelativeLayout is stretched. Why is it behaving so? I have attached my layout xml here. Please tell me the reason. I know it can be done by some other layout. But, I want to know the reason why RelativeLayout is behaving like this. <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/bg" > <Button android:id="@+id/button1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:text="Button" /> </RelativeLayout> </LinearLayout> -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en