Skip to content

Commit

Permalink
Use LinearLayout to fix roomstate icons not showing correctly
Browse files Browse the repository at this point in the history
Better solution than 762887c
  • Loading branch information
t0pu authored and samfundev committed Dec 18, 2021
1 parent 94d0944 commit 5aa6ba3
Showing 1 changed file with 7 additions and 23 deletions.
30 changes: 7 additions & 23 deletions app/src/main/res/layout/fragment_chat.xml
Original file line number Diff line number Diff line change
Expand Up @@ -153,52 +153,36 @@
android:text="@string/chat_status_connecting"
android:textColor="?attr/chatStatusBarTextColor" />

<RelativeLayout
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="horizontal"
android:layout_gravity="end">

<View
android:id="@+id/roomstate_anchor"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_centerVertical="true" />

<ImageView
android:id="@+id/slowmode_ic"
android:id="@+id/subsonly_ic"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_centerVertical="true"
android:layout_toStartOf="@id/roomstate_anchor"
android:layout_toLeftOf="@id/roomstate_anchor"
android:visibility="gone"
app:srcCompat="@drawable/ic_roomstate_slowmode"
app:srcCompat="@drawable/ic_roomstate_subsonly"
app:tint="?attr/chatRoomstateIconColor" />

<ImageView
android:id="@+id/r9k_ic"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_centerVertical="true"
android:layout_toStartOf="@id/slowmode_ic"
android:layout_toLeftOf="@id/slowmode_ic"
android:visibility="gone"
app:srcCompat="@drawable/ic_roomstate_r9k"
app:tint="?attr/chatRoomstateIconColor" />

<ImageView
android:id="@+id/subsonly_ic"
android:id="@+id/slowmode_ic"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_centerVertical="true"
android:layout_toStartOf="@id/r9k_ic"
android:layout_toLeftOf="@id/r9k_ic"
android:visibility="gone"
app:srcCompat="@drawable/ic_roomstate_subsonly"
app:srcCompat="@drawable/ic_roomstate_slowmode"
app:tint="?attr/chatRoomstateIconColor" />
</RelativeLayout>
</LinearLayout>
</FrameLayout>

<FrameLayout
Expand Down

0 comments on commit 5aa6ba3

Please sign in to comment.