Fix feed layoutmanager
This commit is contained in:
@@ -29,7 +29,7 @@ class FitHeightGridLayoutManager : GridLayoutManager {
|
||||
if (orientation == RecyclerView.VERTICAL && child.layoutParams.height == LayoutParams.MATCH_PARENT) {
|
||||
val parentBottom = height - paddingBottom
|
||||
val offset = parentBottom - bottom
|
||||
super.layoutDecoratedWithMargins(child, left, top + offset, right, bottom + offset)
|
||||
super.layoutDecoratedWithMargins(child, left, top, right, bottom + offset)
|
||||
} else {
|
||||
super.layoutDecoratedWithMargins(child, left, top, right, bottom)
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ class FitHeightLinearLayoutManager : LinearLayoutManager {
|
||||
if (orientation == RecyclerView.VERTICAL && child.layoutParams.height == LayoutParams.MATCH_PARENT) {
|
||||
val parentBottom = height - paddingBottom
|
||||
val offset = parentBottom - bottom
|
||||
super.layoutDecoratedWithMargins(child, left, top + offset, right, bottom + offset)
|
||||
super.layoutDecoratedWithMargins(child, left, top, right, bottom + offset)
|
||||
} else {
|
||||
super.layoutDecoratedWithMargins(child, left, top, right, bottom)
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
android:orientation="vertical"
|
||||
android:paddingVertical="@dimen/list_spacing_normal"
|
||||
app:bubbleSize="small"
|
||||
app:layoutManager=".core.ui.list.FitHeightLinearLayoutManager"
|
||||
app:layoutManager="org.koitharu.kotatsu.core.ui.list.FitHeightLinearLayoutManager"
|
||||
tools:listitem="@layout/item_feed" />
|
||||
|
||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||
|
||||
Reference in New Issue
Block a user