Back to Browse

Android Activity Lifecycle 02 layout

1.1K views
Feb 24, 2019
4:06

Go to http://StudyCoding.org to subscribe to the full list of courses and get source code for projects. This demo app shows the seven methods that are used in an activity lifecycle which are onCreate, onStart, onPause, onResume, onStop, onDestroy and onRestart. This lesson will help solve the problem of activity settings being lost when the app is turned sideways or placed into the background and suspended by the operating system. It demonstrates the use of onSaveInstanceState and onRestoreInstanceState. In this part (2 of 3) of the lesson, we will create a simple counter app to demonstrate a textview holding a value that is lost whenever the app is turned sideways.

Download

1 formats

Video Formats

360pmp48.0 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

Android Activity Lifecycle 02 layout | NatokHD