Make sure you call inflate() by passing a parent. inflate(R.layout.myLayout, myRelativeLayout, true);
Specifying true at the end will automatically do the addView() as well. If you don't pass a parent, the layout params are not generated and we default to wrap_content. On Wed, Mar 3, 2010 at 7:06 PM, Ozymandias <[email protected]> wrote: > I have a RelativeLayout as my content view. If I place this inside of > it: > > <?xml version="1.0" encoding="UTF-8"?> > <LinearLayout xmlns:android="http://schemas.android.com/apk/res/ > android" > android:id="@+id/root" > android:orientation="vertical" > android:layout_width="fill_parent" > android:layout_height="fill_parent" > android:padding="10dp" > android:background="#DAAA" > > > </LinearLayout> > > It fills the parent as expected. If I use a layout inflater and > addView to put it in the same place, it will always just wrap_content. > I've tried calling requestLayout on the parent and child to no effect. > Does anyone have any ideas? > > -- > 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 > -- Romain Guy Android framework engineer [email protected] Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them -- 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

