I am trying to make a RelativeLayout with an image centered in the
bottom, and a line spanning the bottom. The layout should have the
height of the image, and fill the width. All of this is in a linear
layout with other things in it. See code below for reference.

Problem is: As soon as I insert the view (with alignParentBottom) my
RelativeLayout fills the entire view (minus what came before it in the
LinearLayout). Is this a bug? I can force what I want by setting a
specific height to the RelativeLayout (eg. 12dp) but that's not
exactly what I want.

Any thoughts?

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/
android"
        android:orientation="vertical"
        android:layout_width="match_parent"
        android:layout_height="match_parent">
[...]
        <RelativeLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content" >
                <View
                        android:layout_width="match_parent"
                        android:layout_height="1px"
                        android:layout_alignParentBottom="true" />
                <ImageView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:src="@drawable/indicator_current"
                        android:layout_centerInParent="true" />
        </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

Reply via email to