add bottom margin for cover only grid

like compact's
This commit is contained in:
Jays2Kings 2022-04-24 23:22:19 -04:00
parent c3275e63c4
commit 6a14859046

View file

@ -74,6 +74,11 @@ class LibraryItem(
} }
} else if (libraryLayout >= LAYOUT_COMFORTABLE_GRID) { } else if (libraryLayout >= LAYOUT_COMFORTABLE_GRID) {
binding.textLayout.isVisible = libraryLayout == LAYOUT_COMFORTABLE_GRID binding.textLayout.isVisible = libraryLayout == LAYOUT_COMFORTABLE_GRID
if (libraryLayout >= LAYOUT_COVER_ONLY_GRID) {
binding.card.updateLayoutParams<ConstraintLayout.LayoutParams> {
bottomMargin = 6.dpToPx
}
}
binding.constraintLayout.background = context.contextCompatDrawable( binding.constraintLayout.background = context.contextCompatDrawable(
R.drawable.library_comfortable_grid_selector R.drawable.library_comfortable_grid_selector
) )