Assume we have a layout contains a TextView:
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView android:id="@+id/text1"
style="@style/text_style"/>
</LinearLayout>
and then include this layout several times:
<include android:id="@+id/info1" layout="@layout/myLayout" />
<include android:id="@+id/info2" layout="@layout/myLayout" />
<include android:id="@+id/info3" layout="@layout/myLayout" />
Is it possible to assign text into each TextView in the xml file which contains these layouts?
If not, then how to assign in runtime?
You can, For this you need to identify you layout
Then with this layout object you need to identify you TextView