hide the viewpager tabs if only one is visible

This commit is contained in:
tibbi 2018-08-02 14:38:30 +02:00
parent e1d21a9ed4
commit d8a26a87a6
1 changed files with 2 additions and 0 deletions

View File

@ -327,6 +327,8 @@ class MainActivity : SimpleActivity(), RefreshContactsListener {
main_tabs_holder.addTab(main_tabs_holder.newTab().setIcon(getTabIcon(index)), index - skippedTabs, config.lastUsedViewPagerPage == index - skippedTabs)
}
}
main_tabs_holder.beVisibleIf(skippedTabs < 2)
}
private fun getTabIcon(position: Int) = resources.getDrawable(when (position) {