Kevin
08/24/2020, 7:05 AM<LinearLayout
android:id="@+id/linear_main"
xmlns:android="<http://schemas.android.com/apk/res/android>"
xmlns:tools="<http://schemas.android.com/tools>"
xmlns:app="<http://schemas.android.com/apk/res-auto>"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Hello World"
android:textColor="@color/Black01"
/>
/*insert some kind of tag in here to call the id of new_image element from second_file.xml*/
</LinearLayout>
second_file.xml
<LinearLayout
android:id="@+id/linear_second"
xmlns:android="<http://schemas.android.com/apk/res/android>"
xmlns:tools="<http://schemas.android.com/tools>"
xmlns:app="<http://schemas.android.com/apk/res-auto>"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
>
<ImageView
android:id="@+id/new_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:srcCompat="@drawable/button_image"
/>
</LinearLayout>
do note that the attached code in here is just an simple example code. as i would like to know, if it's possible or not to call only id of textview/imageview from the other xml file, into the main file.Julius
08/24/2020, 7:26 AMKevin
08/24/2020, 8:17 AMJulius
08/24/2020, 8:59 AMKevin
08/24/2020, 10:20 AM