Open akankshapaul048 opened 2 years ago
When adapter is notified all image fit to a single line instead of stretching by image size
val layoutManager = FlexboxLayoutManager(mContext).apply { flexWrap = FlexWrap.WRAP flexDirection = FlexDirection.ROW alignItems = AlignItems.STRETCH }
val layoutManager = FlexboxLayoutManager(mContext).apply {
flexWrap = FlexWrap.WRAP
flexDirection = FlexDirection.ROW
alignItems = AlignItems.STRETCH
}
val lp = ivGallery?.layoutParams if (lp is FlexboxLayoutManager.LayoutParams) { lp.flexGrow = 1f }
val lp = ivGallery?.layoutParams
if (lp is FlexboxLayoutManager.LayoutParams) {
lp.flexGrow = 1f
When adapter is notified all image fit to a single line instead of stretching by image size
val layoutManager = FlexboxLayoutManager(mContext).apply {
flexWrap = FlexWrap.WRAP
flexDirection = FlexDirection.ROW
alignItems = AlignItems.STRETCH
}
val lp = ivGallery?.layoutParams
if (lp is FlexboxLayoutManager.LayoutParams) {
lp.flexGrow = 1f
}