mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-23 20:01:53 +01:00
Fix scroll views for tabbed bottom sheets
This commit is contained in:
parent
e28a12161a
commit
4999231dfc
@ -44,6 +44,11 @@ abstract class TabbedBottomSheetDialog(private val activity: Activity) :
|
|||||||
super.onStart()
|
super.onStart()
|
||||||
sheetBehavior.skipCollapsed = true
|
sheetBehavior.skipCollapsed = true
|
||||||
sheetBehavior.expand()
|
sheetBehavior.expand()
|
||||||
|
getTabViews().forEachIndexed { index, nestedScrollView ->
|
||||||
|
val view = nestedScrollView as? NestedScrollView
|
||||||
|
view?.isNestedScrollingEnabled = binding.pager.currentItem == index
|
||||||
|
view?.requestLayout()
|
||||||
|
}
|
||||||
binding.tabs.addOnTabSelectedListener(object : TabLayout.OnTabSelectedListener {
|
binding.tabs.addOnTabSelectedListener(object : TabLayout.OnTabSelectedListener {
|
||||||
override fun onTabSelected(tab: TabLayout.Tab?) {
|
override fun onTabSelected(tab: TabLayout.Tab?) {
|
||||||
val view = getTabViews()[tab?.position ?: 0] as? NestedScrollView
|
val view = getTabViews()[tab?.position ?: 0] as? NestedScrollView
|
||||||
|
Loading…
Reference in New Issue
Block a user