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
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
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
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
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
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
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
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
8 matches
Mail list logo