Re-using layouts is described here:

http://developer.android.com/training/improving-layouts/reusing-layouts.html

After that, you would refer to the individual elements in the included 
layout, just the same as you would normally.

For example, in relation to your textviews, they would be referred to from 
the activity as:

TextView textView1 = (TextView) findViewById(R.id.textView1);
TextView textView2 = (TextView) findViewById(R.id.textView2);

Is that what you meant, or was the question something else?

On Wednesday, 30 January 2013 13:19:42 UTC+11, dashman wrote:
>
> I'd like to use INCLUDE layouts on 2 separate layouts.
>
> But how do I refer to controls by id that's inside the included
> layout.
>
> e.g. INCLUDED layout.xml
>
> <textview id="@+id/textView1/>
> <textview id="@+id/textView2/>
>
>
> and in the container layout
>
>
> <include id="@+id/container" layout="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/groups/opt_out.


Reply via email to