We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi Mike,
Question is in the title : how can I have only one expandable item expanded at one time? I have two expandable items (ids 2 and 3).
I tried this in onDrawerItemClickListener :
2L -> { //dictionnaries item val itemBackup: IDrawerItem<*>? = binding?.slider?.getDrawerItem(3L) if ((itemBackup != null) && itemBackup.isExpanded) { val positionItemBackup: Int = binding?.slider?.itemAdapter!!.getAdapterPosition(3) binding?.slider?.expandableExtension!!.collapse(positionItemBackup, true) } } 3L -> { //backups item val itemDico: IDrawerItem<*>? = binding?.slider?.getDrawerItem(2L) if ((itemDico != null) && itemDico.isExpanded) { val positionItemDico: Int = binding?.slider?.itemAdapter!!.getAdapterPosition(2) binding?.slider?.expandableExtension!!.collapse(positionItemDico, true) } }
or this :
binding?.slider?.apply { addItems( alarmDrawerItem, dicoDrawerItem, backupDrawerItem, settingsDrawerItem ) expandableExtension.isOnlyOneExpandedItem = true setSavedInstance(savedInstanceState) }
but it doesn't work !
The text was updated successfully, but these errors were encountered:
You can retrieve the adapter from the MaterialDrawerSlidingView which exposes a expandableExtension API:
adapter
MaterialDrawerSlidingView
expandableExtension
adapter.expandableExtension { isOnlyOneExpandedItem = true }
Sorry, something went wrong.
mikepenz
No branches or pull requests
About this issue
Hi Mike,
Question is in the title : how can I have only one expandable item expanded at one time?
I have two expandable items (ids 2 and 3).
I tried this in onDrawerItemClickListener :
or this :
but it doesn't work !
Details
Checklist
The text was updated successfully, but these errors were encountered: