I've got a layout (that's a listitem) and want to set a fixed width. (it's a horizontal listview)
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="60dp" android:layout_height="wrap_content" > <Button android:id="@+id/action_toggle" android:layout_width="match_parent" android:layout_height="10dp" android:layout_alignParentTop="true" android:background="@drawable/green_button2" /> </RelativeLayout> (i've removed items above to the bare minimum) Shouldn't the width of the button be 60dp - since i've set the width of the button to match-parent - and it's set to 60dp in the layout. It's actually taking up the full width of the parent view - not layout. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

