[android-developers] Re: using INCLUDE layouts

2013-01-31 Thread dashman
Little dense...make sure i understand. You're saying first to a findById on the root layout id and then do another one on the control within that - right? On Wednesday, January 30, 2013 9:42:31 AM UTC-5, skink wrote: dashman wrote: if i refer to a textview inside a TextView as

[android-developers] Re: using INCLUDE layouts

2013-01-31 Thread skink
dashman wrote: Little dense...make sure i understand. You're saying first to a findById on the root layout id and then do another one on the control within that - right? right, from your example: layout.xml textview id=@+id/textView1/ textview id=@+id/textView2/ and in the container

[android-developers] Re: using INCLUDE layouts

2013-01-31 Thread kj
If there is a layout you want to include that has a lot of components, it can be easier to make a View class for that layout and simply use that class in your layouts. The easier approach to this is to extend and existing ViewGroup class and simply inflate your desired layout in the

[android-developers] Re: using INCLUDE layouts

2013-01-30 Thread dashman
So this means that the same layout cannot be INCLUDEd more than once? -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email

[android-developers] Re: using INCLUDE layouts

2013-01-30 Thread skink
dashman wrote: So this means that the same layout cannot be INCLUDEd more than once? no, it can be included as many times as you wish. pskink -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to

[android-developers] Re: using INCLUDE layouts

2013-01-30 Thread dashman
if i refer to a textview inside a TextView as findViewById(R.id.textView1); how do i refer the the textView in the second and subsequent INCLUDEd layout. they all have the same id. On Wednesday, January 30, 2013 7:53:22 AM UTC-5, skink wrote: dashman wrote: So this means that the

[android-developers] Re: using INCLUDE layouts

2013-01-30 Thread skink
dashman wrote: if i refer to a textview inside a TextView as findViewById(R.id.textView1); how do i refer the the textView in the second and subsequent INCLUDEd layout. they all have the same id. hint: use View.findViewById pskink -- -- You received this message because you are

[android-developers] Re: using INCLUDE layouts

2013-01-29 Thread Peter Stacey
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