Is it possible to find a view by id if it’s an ?:
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<include
android:id="@+id/foo"
layout="@layout/test" />
...
View view = findViewById(R.id.foo);
What is “view” in this case? Is it a view? Does it resolve to whatever the top-level element of “layout/test” is?
Thanks
You’re essentially overwriting the ID of the top-parent view in the layout your including, so what you’ll get is the top-view of the entire layout and it’s contents. The
<include>tag is, in effect, a copy-and-paste of the contained layout. You can override theidtag and any attribute withlayout_.