mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-11 16:10:48 +01:00
Set webtoon page padding on page bind
This commit is contained in:
parent
48d9ad00e1
commit
1afcf34829
1 changed files with 10 additions and 4 deletions
|
@ -113,10 +113,7 @@ class WebtoonPageHolder(
|
||||||
private var readImageHeaderSubscription: Subscription? = null
|
private var readImageHeaderSubscription: Subscription? = null
|
||||||
|
|
||||||
init {
|
init {
|
||||||
frame.layoutParams = FrameLayout.LayoutParams(MATCH_PARENT, WRAP_CONTENT)
|
refreshLayoutParams()
|
||||||
if (viewer.config.padPagesVert) {
|
|
||||||
frame.setPadding(0, 0, 0, 15.dpToPx)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -125,6 +122,15 @@ class WebtoonPageHolder(
|
||||||
fun bind(page: ReaderPage) {
|
fun bind(page: ReaderPage) {
|
||||||
this.page = page
|
this.page = page
|
||||||
observeStatus()
|
observeStatus()
|
||||||
|
refreshLayoutParams()
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun refreshLayoutParams() {
|
||||||
|
frame.layoutParams = FrameLayout.LayoutParams(MATCH_PARENT, WRAP_CONTENT).apply {
|
||||||
|
if (viewer.config.padPagesVert) {
|
||||||
|
bottomMargin = 15.dpToPx
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue