Merge pull request #7024 from vector-im/bugfix/eric/new-layout-recents-padding
New Layout - Fixes padding of recents item selectable background
This commit is contained in:
commit
80507dac00
|
@ -41,7 +41,7 @@ class RecentRoomCarouselController @Inject constructor(
|
||||||
|
|
||||||
private val hPadding = TypedValue.applyDimension(
|
private val hPadding = TypedValue.applyDimension(
|
||||||
TypedValue.COMPLEX_UNIT_DIP,
|
TypedValue.COMPLEX_UNIT_DIP,
|
||||||
16f,
|
4f,
|
||||||
resources.displayMetrics
|
resources.displayMetrics
|
||||||
).toInt()
|
).toInt()
|
||||||
|
|
||||||
|
@ -51,12 +51,6 @@ class RecentRoomCarouselController @Inject constructor(
|
||||||
resources.displayMetrics
|
resources.displayMetrics
|
||||||
).toInt()
|
).toInt()
|
||||||
|
|
||||||
private val itemSpacing = TypedValue.applyDimension(
|
|
||||||
TypedValue.COMPLEX_UNIT_DIP,
|
|
||||||
24f,
|
|
||||||
resources.displayMetrics
|
|
||||||
).toInt()
|
|
||||||
|
|
||||||
fun submitList(recentList: List<RoomSummary>) {
|
fun submitList(recentList: List<RoomSummary>) {
|
||||||
this.data = recentList
|
this.data = recentList
|
||||||
requestModelBuild()
|
requestModelBuild()
|
||||||
|
@ -72,7 +66,8 @@ class RecentRoomCarouselController @Inject constructor(
|
||||||
host.topPadding,
|
host.topPadding,
|
||||||
host.hPadding,
|
host.hPadding,
|
||||||
0,
|
0,
|
||||||
host.itemSpacing)
|
0,
|
||||||
|
)
|
||||||
)
|
)
|
||||||
onBind { _, view, _ ->
|
onBind { _, view, _ ->
|
||||||
val colorSurface = MaterialColors.getColor(view, R.attr.vctr_toolbar_background)
|
val colorSurface = MaterialColors.getColor(view, R.attr.vctr_toolbar_background)
|
||||||
|
|
|
@ -3,12 +3,13 @@
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/recentRoot"
|
android:id="@+id/recentRoot"
|
||||||
android:layout_width="60dp"
|
android:layout_width="84dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?vctr_toolbar_background"
|
android:background="?vctr_toolbar_background"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
android:foreground="?attr/selectableItemBackground"
|
android:foreground="?attr/selectableItemBackground"
|
||||||
|
android:paddingHorizontal="12dp"
|
||||||
tools:viewBindingIgnore="true">
|
tools:viewBindingIgnore="true">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
|
|
Loading…
Reference in New Issue