Q: Why doesn’t Android automatically store every instance variable automatically? Why do I have to write all of that code myself?Ī: You might not want every instance variable stored. Also, if the user changed their locale, you might want to recreate the UI in the local language. If your code in onCreate() depended upon the screen configuration (for example, if you had different layouts for landscape and portrait), then you would want onCreate() to be called every time the configuration changed. Q: Why does Android want to recreate an activity just because I rotated the screen?Ī: The onCreate() method is normally used to set up the screen.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |