mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-22 09:25:49 +03:00
Fixes recents background color not matching app bar
This commit is contained in:
parent
b37996e4c3
commit
ad49b4513c
2 changed files with 7 additions and 1 deletions
|
@ -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
|
||||
|
@ -66,6 +68,10 @@ class RecentRoomCarouselController @Inject constructor(
|
|||
0,
|
||||
host.itemSpacing)
|
||||
)
|
||||
onBind { _, view, _ ->
|
||||
val colorSurface = MaterialColors.getColor(view, R.attr.colorSurface)
|
||||
view.setBackgroundColor(colorSurface)
|
||||
}
|
||||
withModelsFrom(data) { roomSummary ->
|
||||
val onClick = host.listener?.let { it::onRoomClicked }
|
||||
val onLongClick = host.listener?.let { it::onRoomLongClicked }
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
android:id="@+id/recentRoot"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?android:colorBackground"
|
||||
android:background="?colorSurface"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:foreground="?attr/selectableItemBackground"
|
||||
|
|
Loading…
Reference in a new issue