Changes

Jump to: navigation, search

Saving and Restoring Activity State in Android Studio

9 bytes removed, 09:07, 28 January 2016
no edit summary
<htmlet>androidstudio_a6androidstudio</htmlet>
<htmlet>androidstudio_a6androidstudio</htmlet>
As outlined in the chapter entitled The Anatomy of an Android Application, all of the resources that make up an application are compiled into a class named R. Amongst those resources are those that define layouts, including the layout for our current activity. Within the R class is a subclass named layout, which contains the layout resources, and within that subclass is our activity_state_change layout. With this knowledge, we can make a call to the findViewById() method of our activity object to get a reference to the editText object as follows:
<htmlet>androidstudio_a6androidstudio</htmlet>

Navigation menu