开发者

How to remember form data in Android

I have a sort o开发者_如何学Gof calculator app I'm working on now where the user will fill in some data through EditTexts, click on a submit button, and then get the calculation. I'm currently switching between views for the input and the output by using setContentView rather than different activities.

What I'd like to have is for the user to be able to go back to the input page and have the values remembered. I'm still new to Android though and have tried some ways, but with no luck. I'm not sure what I need to be looking at to get this functionality. I'm also wondering if this is something that is solved more easily if I switch between the pages using Intents to switch between activities.

Thanks for any help you guys can offer.


Take a peek at Shared Preferences but for your problem you might just want to use static variables.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜