Changes

Jump to: navigation, search

Saving and Restoring Activity State in Android Studio

6 bytes removed, 08:09, 28 January 2016
m
Text replacement - "<google>BUY_ANDROID_STUDIO</google>" to "<htmlet>androidstudio_a6</htmlet>"
<googlehtmlet>BUY_ANDROID_STUDIOandroidstudio_a6</googlehtmlet>
<googlehtmlet>BUY_ANDROID_STUDIOandroidstudio_a6</googlehtmlet>
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:
<googlehtmlet>BUY_ANDROID_STUDIOandroidstudio_a6</googlehtmlet>

Navigation menu