mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-10 12:47:26 +01:00
Apply navigation bar insets to fast scroller and settings search list (#6015)
This commit is contained in:
parent
e22825d818
commit
4af578e310
@ -281,11 +281,6 @@ class MangaController :
|
|||||||
scroller.updateLayoutParams<ViewGroup.MarginLayoutParams> {
|
scroller.updateLayoutParams<ViewGroup.MarginLayoutParams> {
|
||||||
topMargin = getMainAppBarHeight()
|
topMargin = getMainAppBarHeight()
|
||||||
}
|
}
|
||||||
scroller.applyInsetter {
|
|
||||||
type(navigationBars = true) {
|
|
||||||
margin()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.swipeRefresh.doOnLayout { swipeRefresh ->
|
binding.swipeRefresh.doOnLayout { swipeRefresh ->
|
||||||
|
@ -8,6 +8,7 @@ import android.view.MenuItem
|
|||||||
import android.view.View
|
import android.view.View
|
||||||
import androidx.appcompat.widget.SearchView
|
import androidx.appcompat.widget.SearchView
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
|
import dev.chrisbanes.insetter.applyInsetter
|
||||||
import eu.kanade.tachiyomi.R
|
import eu.kanade.tachiyomi.R
|
||||||
import eu.kanade.tachiyomi.databinding.SettingsSearchControllerBinding
|
import eu.kanade.tachiyomi.databinding.SettingsSearchControllerBinding
|
||||||
import eu.kanade.tachiyomi.ui.base.controller.NucleusController
|
import eu.kanade.tachiyomi.ui.base.controller.NucleusController
|
||||||
@ -56,6 +57,12 @@ class SettingsSearchController :
|
|||||||
override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) {
|
override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) {
|
||||||
inflater.inflate(R.menu.settings_main, menu)
|
inflater.inflate(R.menu.settings_main, menu)
|
||||||
|
|
||||||
|
binding.recycler.applyInsetter {
|
||||||
|
type(navigationBars = true) {
|
||||||
|
padding()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Initialize search menu
|
// Initialize search menu
|
||||||
val searchItem = menu.findItem(R.id.action_search)
|
val searchItem = menu.findItem(R.id.action_search)
|
||||||
searchView = searchItem.actionView as SearchView
|
searchView = searchItem.actionView as SearchView
|
||||||
|
@ -5,6 +5,7 @@ import android.content.Context
|
|||||||
import android.util.AttributeSet
|
import android.util.AttributeSet
|
||||||
import android.view.MotionEvent
|
import android.view.MotionEvent
|
||||||
import androidx.core.view.ViewCompat
|
import androidx.core.view.ViewCompat
|
||||||
|
import dev.chrisbanes.insetter.applyInsetter
|
||||||
import eu.davidea.fastscroller.FastScroller
|
import eu.davidea.fastscroller.FastScroller
|
||||||
import eu.kanade.tachiyomi.R
|
import eu.kanade.tachiyomi.R
|
||||||
import eu.kanade.tachiyomi.util.system.dpToPxEnd
|
import eu.kanade.tachiyomi.util.system.dpToPxEnd
|
||||||
@ -21,6 +22,12 @@ class MaterialFastScroll @JvmOverloads constructor(context: Context, attrs: Attr
|
|||||||
)
|
)
|
||||||
autoHideEnabled = true
|
autoHideEnabled = true
|
||||||
ignoreTouchesOutsideHandle = true
|
ignoreTouchesOutsideHandle = true
|
||||||
|
|
||||||
|
applyInsetter {
|
||||||
|
type(navigationBars = true) {
|
||||||
|
margin()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Overridden to handle RTL
|
// Overridden to handle RTL
|
||||||
|
Loading…
Reference in New Issue
Block a user