[android-developers] Re: How to save my custom view's state
The framework calls your application when it wants you to save or restore your state, so you do not call these methods. See step 7 in the Notepad tutorial: http://developer.android.com/guide/tutorials/notepad/notepad-ex3.html -- RichardC On Oct 20, 4:27 pm, fhucho fhu...@gmail.com wrote: Hi, I have a custom View, what is the proper way of saving / restoring it's state after orientation change. I know I should implement onSaveStateInstatnce() and onRestoreInstanceState() methods, but how exactly (with which argumets) and when I should call them? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to save my custom view's state
I tested it and the methods aren't called automatically. I was talking about View.onSaveStateInstatnce, not Activity.onSaveStateInstatnce(). On Oct 20, 8:53 pm, RichardC richard.crit...@googlemail.com wrote: The framework calls your application when it wants you to save or restore your state, so you do not call these methods. See step 7 in the Notepad tutorial:http://developer.android.com/guide/tutorials/notepad/notepad-ex3.html -- RichardC On Oct 20, 4:27 pm, fhucho fhu...@gmail.com wrote: Hi, I have a custom View, what is the proper way of saving / restoring it's state after orientation change. I know I should implement onSaveStateInstatnce() and onRestoreInstanceState() methods, but how exactly (with which argumets) and when I should call them? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to save my custom view's state
Probably the best way to do this is to call those methods from the Activity's methods onSavedStateInstance() and onRestoreInstanceState (). On Oct 20, 10:06 pm, fhucho fhu...@gmail.com wrote: I tested it and the methods aren't called automatically. I was talking about View.onSaveStateInstatnce, not Activity.onSaveStateInstatnce(). On Oct 20, 8:53 pm, RichardC richard.crit...@googlemail.com wrote: The framework calls your application when it wants you to save or restore your state, so you do not call these methods. See step 7 in the Notepad tutorial:http://developer.android.com/guide/tutorials/notepad/notepad-ex3.html -- RichardC On Oct 20, 4:27 pm, fhucho fhu...@gmail.com wrote: Hi, I have a custom View, what is the proper way of saving / restoring it's state after orientation change. I know I should implement onSaveStateInstatnce() and onRestoreInstanceState() methods, but how exactly (with which argumets) and when I should call them? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---