Итак, вот мой XML файл для моего пользовательского макета
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="15dp"
android:orientation="horizontal">
<de.hdodenhof.circleimageview.CircleImageView
android:id="@+id/users_profile_image"
android:layout_width="70dp"
android:layout_height="70dp"
android:src="@drawable/profile_image"
app:civ_border_color="#696969"
app:civ_border_width="1dp"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_gravity="center"
android:layout_marginLeft="5dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="20dp"
android:id="@+id/username_layout"
android:padding="5dp"
android:text="username"
android:textColor="#353758"
android:textStyle="bold"
/>
<ImageView
android:id="@+id/user_item_online"
android:layout_width="12dp"
android:layout_height="12dp"
android:layout_gravity="center_vertical"
android:src="@drawable/user_state"
android:visibility="visible"
/>
</LinearLayout>
</LinearLayout>
</RelativeLayout>
, и вот как это выглядит:
но я хочу это так же, как Facebook или мессенджер, я имею в виду, когда пользователь онлайн, точка прикреплена к его фотографии профиля.