Android : How avoid that my activity restar when i back to the main menu? (Android)

on Wednesday, July 9, 2014


I'm new programming in android, Recently i have making a proyect with android studio. In my app, i create a activity with two opcion for the user with two toggle buttons.


The user can chose if the buttons make sound or vibrate.


The toggle button work perfectly, but when the user return to the Main Activity and come again to the opcions the toggle button don´t save the settings that the user chose.


Example:


(Main Activity) ====> (Go to Opcions)/ in Opcions the user chose Sound/off & Vibrate/off ====> back to (Mains Activity) ====>(GO to Opcions Again) The settings are restar Sound/on & Vibrate/on


I hope someone can help me with this problem!


0 comments:

Post a Comment