
I have added the following code in the sharedpreferencesmanager. How do I make the spinner remember the last selection irrespective of the item added or removed from the menu list through the menu button. Now,everytime I select an item in the spinner say "germany" and then I click on the menu button and add or remove any item above or below germany, the position shifts on the spinner too, to the previously selected item or to the next item. On the side I have a menu button from where I can add or remove the items to be displayed in each of these 3 categories. Each section has a dynamic list consisting of items say topnews has europe/asia/germany/frontnews etc. Currently I have 3 sections, topnews/mynews and breakingviews. SpinnerMultiSelectDialogFragment.I need to save the selected items in the spinner. SpinnerMultiSelectDialogFragment.showDescription( true) MATCH_PARENT) // for dynamic height you can use Integer.dp e.g setDialogHeight(500.dp) or _CONTENT One by declaring an array and defining the items in it. SpinnerMultiSelectDialogFragment.showSearchBar = true To add items to the Spinner, there are two possible ways to provide it with a set of options. SpinnerMultiSelectDialogFragment.themeColorResId = resources.getColor( R.color.material_pink500) SpinnerMultiSelectDialogFragment.buttonText = "SAVE " Using optional features for multi select dialog SpinnerSingleSelectDialogFragment.showImage( true) SpinnerSingleSelectDialogFragment.showDescription( true) Build a Relative Layout App in Android Studio 5. Build a Linear Layout App in Android Studio 4. Build a Persistent Storage App in Android Studio 3. Build a Simple App in Android Studio with Java 2. MATCH_PARENT) // for dynamic height you can use Integer.dp e.g setDialogHeight(500.dp) or _CONTENT You will upload an APK of the app to a website called Appetize.io to test the app. SpinnerSingleSelectDialogFragment.showSearchBar = true SpinnerSingleSelectDialogFragment.themeColorResId = resources.getColor( R.color.material_pink500) SpinnerSingleSelectDialogFragment.buttonText = "SAVE " Using optional features for single select dialog Class MainActivity : AppCompatActivity()
