hide the viewpager tabs if only one is visible
This commit is contained in:
parent
e1d21a9ed4
commit
d8a26a87a6
1 changed files with 2 additions and 0 deletions
|
@ -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.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) {
|
private fun getTabIcon(position: Int) = resources.getDrawable(when (position) {
|
||||||
|
|
Loading…
Reference in a new issue