finish action mode on page change

This commit is contained in:
tibbi 2017-12-30 17:03:37 +01:00
parent a67cb33cdc
commit 0b360ec934
2 changed files with 6 additions and 0 deletions

View File

@ -141,6 +141,8 @@ class MainActivity : SimpleActivity() {
viewpager.adapter = ViewPagerAdapter(this)
viewpager.onPageChanged {
main_tabs_holder.getTabAt(it)?.select()
contacts_fragment?.finishActMode()
favorites_fragment?.finishActMode()
invalidateOptionsMenu()
}

View File

@ -141,6 +141,10 @@ abstract class MyViewPagerFragment(context: Context, attributeSet: AttributeSet)
updateViewStuff()
}
fun finishActMode() {
(fragment_list.adapter as? ContactsAdapter)?.finishActMode()
}
private fun updateViewStuff() {
context.updateTextColors(fragment_wrapper)
fragment_fastscroller.updateBubbleColors()