<include /> does not let you override random attributes at the moment. Only android:id is supported.
On Wed, Apr 14, 2010 at 10:08 PM, Kat Bradley <[email protected]> wrote: > Hey all, > > I'm trying to use some common formatting for a number of different > labels, all with different text. From > http://android-developers.blogspot.com/2009/02/android-layout-tricks-2-reusing-layouts.html > , it seems as though I should be able to do something like the > following: > > <include android:text="@string/description" layout="@layout/label"/> > > where, in label.xml, I have: > > <?xml version="1.0" encoding="utf-8"?> > <TextView > xmlns:android="http://schemas.android.com/apk/res/android" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > <!-- more detailed formatting to come later --> > /> > > For some reason, the text of the label is showing up empty when I do > this. But I can successfully add an ID in this fashion, and then > change the text of the label in my application code. For example: > > <include android:id="@+id/description_label" layout="@layout/label"/> > > I've tried googling for the answer, but haven't gotten anywhere. Any > insight into why this is happening would be much appreciated. > > ~Kat Bradley > > -- > 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 > > To unsubscribe, reply using "remove me" as the subject. > -- 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

