简体   繁体   中英

How to save the current state when changing Activity on MonoDroid

The first Activity has two Radio Buttons and the user selects either one, and presses 'Next', which shows the second Activity. The second Activity has a 'Back' button, when I click that I go to the first Activity, but the Radio Buttons aren't selected. How can I make it so that the Radio Button that I selected stays selected when changing Activity. And how can I edit a TextView from, say, Activity1 when the Label is on Activity2, or the same with variables?

Thanks.

I think you should write handler for this in onSaveInstanceState function.

Use the discussion here: Saving Android Activity state using Save Instance State - to find an answer.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM