发现页按钮布局不一致 #188
This commit is contained in:
@@ -79,6 +79,7 @@ class ExploreAdapter(
|
|||||||
}.onFinally {
|
}.onFinally {
|
||||||
rotateLoading.gone()
|
rotateLoading.gone()
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
ivStatus.isChecked = false
|
ivStatus.isChecked = false
|
||||||
recyclerFlexbox(flexbox)
|
recyclerFlexbox(flexbox)
|
||||||
@@ -116,11 +117,21 @@ class ExploreAdapter(
|
|||||||
|
|
||||||
@Synchronized
|
@Synchronized
|
||||||
private fun getFlexboxChild(flexbox: FlexboxLayout): MaterialCardView {
|
private fun getFlexboxChild(flexbox: FlexboxLayout): MaterialCardView {
|
||||||
return if (recycler.isEmpty()) {
|
val cardView = if (recycler.isEmpty()) {
|
||||||
ItemFilletTextBinding.inflate(inflater, flexbox, false).root
|
ItemFilletTextBinding.inflate(inflater, flexbox, false).root
|
||||||
} else {
|
} else {
|
||||||
recycler.removeLastElement() as MaterialCardView
|
recycler.removeLastElement() as MaterialCardView
|
||||||
}
|
}
|
||||||
|
val lp = FlexboxLayout.LayoutParams(
|
||||||
|
ViewGroup.LayoutParams.WRAP_CONTENT,
|
||||||
|
ViewGroup.LayoutParams.WRAP_CONTENT
|
||||||
|
)
|
||||||
|
cardView.layoutParams = lp
|
||||||
|
cardView.forceLayout()
|
||||||
|
val tv = cardView.findViewById<TextView>(R.id.text_view)
|
||||||
|
tv.text = ""
|
||||||
|
tv.requestLayout()
|
||||||
|
return cardView
|
||||||
}
|
}
|
||||||
|
|
||||||
@Synchronized
|
@Synchronized
|
||||||
|
|||||||
Reference in New Issue
Block a user