This repository has been archived by the owner on Jul 15, 2024. It is now read-only.
Add configuration change, to prevent state loss #2
Labels
enhancement
New feature or request
good first issue
Good for newcomers
help wanted
Extra attention is needed
Milestone
Issue Guidelines
Before opening a new issue, please take a moment to review our community guidelines to make the contribution process easy and effective for everyone involved.
You may find an answer in already closed issues:
https://github.com/anitrend/material-multi-search/issues?q=is%3Aissue+is%3Aclosed
Feature Information
Current the library will clear all search items when the device configuration is changed. It would be handy to have some sort of saved instance state when this happens so that the library retains state in such cases.
Solution Information
We could use override
onSaveInstanceState
andonRestoreInstanceState
in ourMutliSearch
class, in addition to this we might need to introduce a data class to hold information about search terms and last selected index (this would be what we will put in bundles) which we would use to restore state fromThe text was updated successfully, but these errors were encountered: