Yeah, I was wondering whether the Adapter (or whatever) internally creates some container to put the item layout into. But just using merge (without the include approach you mentioned) does not work.
While using the merge-via-include approach may be useful to some, it doesn't help in my particular situation because that RelativeLayout is exactly the sort of thing I'm trying to eliminate :( On Apr 17, 3:50 pm, Mark Murphy <[email protected]> wrote: > westmeadboy wrote: > > Is it possible use the merge tag in the layout XML for a List item? In > > particular, when using a SimpleCursorAdapter? > > Let's say that you are using R.layout.row with your SimpleCursorAdapter. > > If res/layout/row.xml were to look like: > > <merge> > <!-- stuff here --> > </merge> > > that probably will not work, since there is no container for the row's > widgets. > > But, if res/layout/row.xml were to look like: > > <RelativeLayout> > <include layout="@layout/more_stuff" /> > <!-- whatever --> > </RelativeLayout> > > and if res/layout/more_stuff.xml were to look like: > > <merge> > <!-- stuff here --> > </merge> > > that should be OK. > > I have not tried this, so what I have written is an educated guess. > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://twitter.com/commonsguy > > _Beginning Android 2_ from Apress Now Available! > > -- > 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 > athttp://groups.google.com/group/android-developers?hl=en -- 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

