mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-01-20 19:19:21 +01:00
hide Search, Sort and Filter menu buttons on Groups tab
This commit is contained in:
parent
1a54cefaf3
commit
de5b0f6825
@ -154,6 +154,12 @@ class MainActivity : SimpleActivity(), RefreshContactsListener {
|
||||
|
||||
override fun onCreateOptionsMenu(menu: Menu): Boolean {
|
||||
menuInflater.inflate(R.menu.menu, menu)
|
||||
val currentPage = viewpager?.currentItem
|
||||
menu.apply {
|
||||
findItem(R.id.search).isVisible = currentPage != LOCATION_GROUPS_TAB
|
||||
findItem(R.id.sort).isVisible = currentPage != LOCATION_GROUPS_TAB
|
||||
findItem(R.id.filter).isVisible = currentPage != LOCATION_GROUPS_TAB
|
||||
}
|
||||
setupSearch(menu)
|
||||
return true
|
||||
}
|
||||
|
@ -16,8 +16,9 @@ const val IS_PRIVATE = "is_private"
|
||||
const val GROUP = "group"
|
||||
const val FIRST_GROUP_ID = 10000
|
||||
|
||||
const val LOCATION_CONTACTS_TAB = 1
|
||||
const val LOCATION_FAVORITES_TAB = 2
|
||||
const val LOCATION_CONTACTS_TAB = 0
|
||||
const val LOCATION_FAVORITES_TAB = 1
|
||||
const val LOCATION_GROUPS_TAB = 2
|
||||
const val LOCATION_GROUP_CONTACTS = 3
|
||||
|
||||
const val CONTACTS_TAB_MASK = 1
|
||||
|
Loading…
Reference in New Issue
Block a user