diff --git a/vector/src/main/java/im/vector/app/features/home/room/list/home/recent/RecentRoomCarouselController.kt b/vector/src/main/java/im/vector/app/features/home/room/list/home/recent/RecentRoomCarouselController.kt index ebec912779..0c5d9a3533 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/list/home/recent/RecentRoomCarouselController.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/list/home/recent/RecentRoomCarouselController.kt @@ -23,6 +23,8 @@ import com.airbnb.epoxy.CarouselModelBuilder import com.airbnb.epoxy.EpoxyController import com.airbnb.epoxy.EpoxyModel import com.airbnb.epoxy.carousel +import com.google.android.material.color.MaterialColors +import im.vector.app.R import im.vector.app.features.home.AvatarRenderer import im.vector.app.features.home.room.list.RoomListListener import org.matrix.android.sdk.api.session.room.model.RoomSummary @@ -43,6 +45,12 @@ class RecentRoomCarouselController @Inject constructor( resources.displayMetrics ).toInt() + private val topPadding = TypedValue.applyDimension( + TypedValue.COMPLEX_UNIT_DIP, + 12f, + resources.displayMetrics + ).toInt() + private val itemSpacing = TypedValue.applyDimension( TypedValue.COMPLEX_UNIT_DIP, 24f, @@ -61,11 +69,15 @@ class RecentRoomCarouselController @Inject constructor( id("recents_carousel") padding(Carousel.Padding( host.hPadding, - 0, + host.topPadding, host.hPadding, 0, host.itemSpacing) ) + onBind { _, view, _ -> + val colorSurface = MaterialColors.getColor(view, R.attr.vctr_toolbar_background) + view.setBackgroundColor(colorSurface) + } withModelsFrom(data) { roomSummary -> val onClick = host.listener?.let { it::onRoomClicked } val onLongClick = host.listener?.let { it::onRoomLongClicked } diff --git a/vector/src/main/res/layout/item_invites_count.xml b/vector/src/main/res/layout/item_invites_count.xml index 8a5c2b1222..8ec4eb0279 100644 --- a/vector/src/main/res/layout/item_invites_count.xml +++ b/vector/src/main/res/layout/item_invites_count.xml @@ -50,7 +50,7 @@ android:layout_height="1dp" android:layout_marginStart="22dp" android:layout_marginEnd="16dp" - android:background="?vctr_list_separator_system" + android:background="?vctr_list_separator" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" /> diff --git a/vector/src/main/res/layout/item_recent_room.xml b/vector/src/main/res/layout/item_recent_room.xml index 3e10d90e4e..2cd8ff49c5 100644 --- a/vector/src/main/res/layout/item_recent_room.xml +++ b/vector/src/main/res/layout/item_recent_room.xml @@ -5,7 +5,7 @@ android:id="@+id/recentRoot" android:layout_width="60dp" android:layout_height="wrap_content" - android:background="?android:colorBackground" + android:background="?vctr_toolbar_background" android:clickable="true" android:focusable="true" android:foreground="?attr/selectableItemBackground"