Update room category as per design

This commit is contained in:
Valere 2020-06-22 17:01:15 +02:00
parent df1bd62f47
commit c1260dcb9b
4 changed files with 11 additions and 12 deletions

View File

@ -43,7 +43,7 @@ abstract class RoomCategoryItem : VectorEpoxyModel<RoomCategoryItem.Holder>() {
DrawableCompat.setTint(it, tintColor) DrawableCompat.setTint(it, tintColor)
} }
holder.unreadCounterBadgeView.render(UnreadCounterBadgeView.State(unreadNotificationCount, showHighlighted)) holder.unreadCounterBadgeView.render(UnreadCounterBadgeView.State(unreadNotificationCount, showHighlighted))
holder.titleView.setCompoundDrawablesWithIntrinsicBounds(expandedArrowDrawable, null, null, null) holder.titleView.setCompoundDrawablesWithIntrinsicBounds(null, null, expandedArrowDrawable, null)
holder.titleView.text = title holder.titleView.text = title
holder.rootView.setOnClickListener { listener?.invoke() } holder.rootView.setOnClickListener { listener?.invoke() }
} }

View File

@ -141,7 +141,7 @@ class RoomSummaryController @Inject constructor(private val stringProvider: Stri
val showHighlighted = summaries.any { it.highlightCount > 0 } val showHighlighted = summaries.any { it.highlightCount > 0 }
roomCategoryItem { roomCategoryItem {
id(titleRes) id(titleRes)
title(stringProvider.getString(titleRes).toUpperCase()) title(stringProvider.getString(titleRes))
expanded(isExpanded) expanded(isExpanded)
unreadNotificationCount(unreadCount) unreadNotificationCount(unreadCount)
showHighlighted(showHighlighted) showHighlighted(showHighlighted)

View File

@ -4,33 +4,32 @@
android:id="@+id/roomCategoryRootView" android:id="@+id/roomCategoryRootView"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?riotx_header_panel_background" android:background="?riotx_background"
android:clickable="true" android:clickable="true"
android:focusable="true" android:focusable="true"
android:foreground="?attr/selectableItemBackground"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal" android:orientation="horizontal"
android:paddingStart="@dimen/layout_horizontal_margin" android:paddingStart="8dp"
android:paddingLeft="@dimen/layout_horizontal_margin" android:paddingLeft="8dp"
android:paddingTop="@dimen/layout_vertical_margin" android:paddingTop="12dp"
android:paddingEnd="@dimen/layout_horizontal_margin" android:paddingEnd="@dimen/layout_horizontal_margin"
android:foreground="?attr/selectableItemBackground"
android:paddingRight="@dimen/layout_horizontal_margin" android:paddingRight="@dimen/layout_horizontal_margin"
android:paddingBottom="8dp"> android:paddingBottom="4dp">
<im.vector.riotx.core.platform.EllipsizingTextView <im.vector.riotx.core.platform.EllipsizingTextView
android:id="@+id/roomCategoryTitleView" android:id="@+id/roomCategoryTitleView"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="8dp" android:layout_marginEnd="8dp"
android:layout_marginRight="8dp" tools:drawableEnd="@drawable/ic_expand_more_white"
android:drawableStart="@drawable/ic_expand_more_white"
android:drawableLeft="@drawable/ic_expand_more_white"
android:drawableTint="?riotx_text_secondary" android:drawableTint="?riotx_text_secondary"
android:ellipsize="end" android:ellipsize="end"
android:gravity="center_vertical" android:gravity="center_vertical"
android:maxLines="1" android:maxLines="1"
android:textColor="?riotx_text_secondary" android:textColor="?riotx_text_secondary"
android:textSize="14sp" android:textSize="14sp"
android:textStyle="bold"
tools:text="@string/room_participants_header_direct_chats" /> tools:text="@string/room_participants_header_direct_chats" />
<im.vector.riotx.features.home.room.list.UnreadCounterBadgeView <im.vector.riotx.features.home.room.list.UnreadCounterBadgeView

View File

@ -461,7 +461,7 @@
<string name="room_participants_header_admin_tools">ADMIN TOOLS</string> <string name="room_participants_header_admin_tools">ADMIN TOOLS</string>
<string name="room_participants_header_call">CALL</string> <string name="room_participants_header_call">CALL</string>
<string name="room_participants_header_direct_chats">DIRECT CHATS</string> <string name="room_participants_header_direct_chats">Direct Messages</string>
<string name="room_participants_header_devices">SESSIONS</string> <string name="room_participants_header_devices">SESSIONS</string>
<string name="room_participants_action_invite">Invite</string> <string name="room_participants_action_invite">Invite</string>