• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps How can user rename TextView, and save it?

Anza87

Newbie
I've got a problem. I want to write a code, that user can rename some TextView in Activity and save it. So, when he close the app, and open it again, there must be TextView with his text.

I hope you understand my problem. Thank you for your help.
 
I don't know why to rename textview, but you can use Sharepreference in onPause to save text, after in onCreate, you can use it
 
For example, when user open an app, he can see: user1, user2, user3, etc..then he's got option, rename. Then he put new value in edit_text and click button, so when he close the app and open it again, he see John, Peter, user3, etc.
 
I download this example, but I get an error:
"The method onClick(View) of type new View.OnClickListener(){} must override a superclass method". I deleted @override before onClick (View arg0) and error has gone, but program crashed.

Please, help!
 
Back
Top Bottom