In the activation code, I have the following code:

<!--ITEMS--> <LinearLayout android:id="@+id/linearLayout_rating" android:orientation="vertical" android:layout_above="@+id/button_facebook_invite" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="41dp" android:background="@color/colorBackgroundGrey"> <include android:id="@+id/firstItem" layout="@layout/invite_item"/> <include android:id="@+id/secondItem" layout="@layout/invite_item"/> </LinearLayout> 

And the element itself include which I do:

 <RelativeLayout android:layout_width="match_parent" android:layout_height="@dimen/list_item_height" android:background="@color/colorWhite" xmlns:android="http://schemas.android.com/apk/res/android" android:layout_marginBottom="1dp" android:layout_marginTop="1dp"> <TextView android:id="@+id/title" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Партнерство" android:textColor="@color/colorFontBlue" android:textSize="@dimen/item_title_text_font_size" android:textStyle="normal" android:layout_alignParentLeft="true" android:layout_alignParentStart="true" android:layout_marginTop="20dp" android:layout_marginLeft="24dp" /> <TextView android:id="@+id/description" android:layout_width="200dp" android:layout_height="wrap_content" android:singleLine="false" android:text="Сооснователи, создание компаний" android:textColor="#535353" android:textSize="@dimen/item_description_text_font_size" android:textStyle="normal" android:layout_below="@+id/title" android:layout_alignParentLeft="true" android:layout_alignParentStart="true" android:layout_marginTop="13dp" android:layout_marginLeft="24dp" /> </RelativeLayout> 

How do I correctly inflate the same item? And in general, is it possible to do so?

    1 answer 1

    If I understood correctly, then so

      View firstItem = findViewById(R.id.firstItem); TextView title = firstItem.findViewById(R.id.title);