Hi all,

What I want to do is to create reusable layout elements through xml only. I 
want to be able to access the internal elements of an imported  layout (for 
example a TextView) and change its contents.

This is an example of what I want. I will only put the meaningfull 
attributes, ignoring others (like the width of the layout).

layout name item.xml
<merge>
<TextView android:id="@+id/header"/>
<TextView android:id="@+id/content"/>
</merge>

layout name several_items.xml

<LinearLayout>
<include layout="@layout/item"
  android:id="@+id/tem1"
  header.text = "item 1 header"
  content.text = "item 1 content" />

<include layout="@layout/item" 
  android:id="@+id/item2"
  header.text = "item 2 header"
  content.text = "item 2 content" />
</LinearLayout>

What is marked in red is what I want to get. I don't want to use it on Java 
code.

Thanks in advance.

Best regards,

Javier

-- 
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].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/7e771cc5-db07-4ab7-86f1-aa82db17d280%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to