app/src/main/res/layout/item_post_recto.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="375dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:elevation="10dp"
android:background="@drawable/rounded_bg"
android:orientation="vertical">
<!-- First section -->
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="12dp">
<de.hdodenhof.circleimageview.CircleImageView
android:id="@+id/profile_picture"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:src="@drawable/basic_profile_picture" />
<TextView
android:id="@+id/username"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@id/profile_picture"
android:layout_alignParentTop="true"
android:layout_marginStart="5dp"
android:layout_toEndOf="@id/profile_picture"
android:fontFamily="@font/poppins"
android:text="@string/username"
android:textColor="@color/black"
android:textSize="16sp" />
<TextView
android:id="@+id/location"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true"
android:layout_alignParentBottom="true"
android:fontFamily="@font/poppins_extralight"
android:text="@string/location"
android:textColor="@color/colorPrimary"
android:textSize="12sp" />
</RelativeLayout>
<!-- Second section -->
<ImageView
android:id="@+id/image_view"
android:layout_width="match_parent"
android:layout_height="400dp"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:src="@drawable/joconde" />
<!-- Third section -->
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:padding="12dp">
<TextView
android:id="@+id/title"
android:layout_width="250dp"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_alignParentBottom="true"
android:layout_marginEnd="8dp"
android:layout_marginBottom="-1dp"
android:fontFamily="@font/poppins_bold"
android:text="@string/image_name"
android:textColor="@color/black"
android:textAlignment="textStart"
android:textSize="16sp"/>
<ImageView
android:id="@+id/like_button"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_alignParentEnd="true"
android:gravity="center_horizontal"
android:src="@drawable/like_empty" />
<TextView
android:id="@+id/like_count"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_marginEnd="40dp"
android:fontFamily="@font/poppins_bold"
android:gravity="center"
android:text="@string/like_count"
android:textAlignment="center"
android:textColor="@color/colorPrimary"
android:textSize="14sp" />
<ImageView
android:id="@+id/delete_button"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true"
android:gravity="center"
android:src="@drawable/delete"
android:visibility="gone" />
</RelativeLayout>
</LinearLayout>