Mercurial > dwindows
comparison android/DWindows.kt @ 2550:a8d90e2896bc
Android: For the moment disable swiping to change notebook pages.
Horizontal swipes conflict with other drag motions we use on some pages in
dwtest... like the horizontal sliders. So disable it completely for now.
It is a nice feature though for notebooks without controls it conflicts
with. So might add it back later with a flag.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Fri, 14 May 2021 19:12:39 +0000 |
parents | dbd15c13f5bb |
children | 127779860ac1 |
comparison
equal
deleted
inserted
replaced
2549:736282fddac5 | 2550:a8d90e2896bc |
---|---|
1300 params.addRule(RelativeLayout.BELOW, tabs.id) | 1300 params.addRule(RelativeLayout.BELOW, tabs.id) |
1301 } else { | 1301 } else { |
1302 params.addRule(RelativeLayout.ABOVE, tabs.id) | 1302 params.addRule(RelativeLayout.ABOVE, tabs.id) |
1303 } | 1303 } |
1304 notebook!!.addView(pager, params) | 1304 notebook!!.addView(pager, params) |
1305 // TODO: Not sure if we want this all the time... | |
1306 // Might want to make a flag for this | |
1307 pager.isUserInputEnabled = false | |
1305 tabs.addOnTabSelectedListener(object : OnTabSelectedListener { | 1308 tabs.addOnTabSelectedListener(object : OnTabSelectedListener { |
1306 override fun onTabSelected(tab: TabLayout.Tab) { | 1309 override fun onTabSelected(tab: TabLayout.Tab) { |
1307 val adapter = pager.adapter as DWTabViewPagerAdapter | 1310 val adapter = pager.adapter as DWTabViewPagerAdapter |
1308 | 1311 |
1309 pager.currentItem = tab.position | 1312 pager.currentItem = tab.position |