Chore: Change proxy grid layout to 3

This commit is contained in:
djoeni 2022-06-22 19:03:59 +07:00
parent fcbeec95e4
commit 53f3fad499
4 changed files with 9 additions and 9 deletions

@ -1 +1 @@
Subproject commit 0bed1760afe30fbce3da7ed07bf4e3b3df1dd369
Subproject commit f067af9cd516c4a46f558663fe15024f049a249f

View File

@ -32,10 +32,10 @@ class ProxyPageFactory(private val config: ProxyViewConfig) {
root.addView(recyclerView)
recyclerView.apply {
layoutManager = GridLayoutManager(config.context, 2).apply {
layoutManager = GridLayoutManager(config.context, 3).apply {
spanSizeLookup = object : GridLayoutManager.SpanSizeLookup() {
override fun getSpanSize(position: Int): Int {
return if (config.singleLine) 2 else 1
return if (config.singleLine) 3 else 1
}
}
}

View File

@ -40,9 +40,9 @@ class ProxyView(
}
val textHeight = state.rect.height()
val exceptHeight = (state.config.layoutPadding * 2 +
val exceptHeight = (state.config.layoutPadding * 4 +
state.config.contentPadding * 2 +
textHeight * 2 +
textHeight * 4 +
state.config.textMargin).toInt()
val height = when (MeasureSpec.getMode(heightMeasureSpec)) {

View File

@ -64,10 +64,10 @@
<dimen name="main_top_banner_height">90dp</dimen>
<!-- Proxy Design -->
<dimen name="proxy_layout_padding">5dp</dimen>
<dimen name="proxy_content_padding">15dp</dimen>
<dimen name="proxy_text_margin">10dp</dimen>
<dimen name="proxy_text_size">12sp</dimen>
<dimen name="proxy_layout_padding">3dp</dimen>
<dimen name="proxy_content_padding">6dp</dimen>
<dimen name="proxy_text_margin">5dp</dimen>
<dimen name="proxy_text_size">11sp</dimen>
<dimen name="proxy_card_radius">5dp</dimen>
<dimen name="proxy_card_offset">0dp</dimen>