Merge pull request #1528 from vector-im/feature/tabs_design

Update room category as per design
This commit is contained in:
Benoit Marty 2020-06-22 17:39:45 +02:00 committed by GitHub
commit af9295723c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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)
}
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.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 }
roomCategoryItem {
id(titleRes)
title(stringProvider.getString(titleRes).toUpperCase())
title(stringProvider.getString(titleRes))
expanded(isExpanded)
unreadNotificationCount(unreadCount)
showHighlighted(showHighlighted)

View File

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

View File

@ -477,7 +477,7 @@
<string name="room_participants_header_admin_tools">ADMIN TOOLS</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_action_invite">Invite</string>