I'm trying to build this view in xml file in android that express a list item in a recyclerview
but I get this view instead
here's my code
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/white"
android:orientation="horizontal"
android:padding="5dp">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:orientation="vertical">
<ImageView
android:id="@+id/image_news"
android:layout_width="100dp"
android:layout_height="100dp"
app:srcCompat="@drawable/ic_perm_identity_grey_400_48dp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="left"
android:orientation="horizontal"
android:padding="10dp">
<TextView
android:id="@+id/txt_news_name"
android:layout_width="135dp"
android:layout_height="wrap_content"
android:layout_marginRight="5dp"
android:text="Mohamed Alaa"
android:textColor="@android:color/black"
android:textSize="18sp" />
<TextView
android:id="@+id/txt_news_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="added a new photo to the album"
android:textSize="16sp" />
</LinearLayout>
</LinearLayout>
How can I improve my code to get the Desired result?
Please I want any answer to be applied in xml files only without writing java code