COEN 268-TR, spring 2016 22 Activity vs AppCompactActivity •Android studio automatically uses AppCompactActivity –It gives the same material design look&feel on older Android versions –It also support ActionBar (will be covered later) •Recommendation –Stick with default AppCompactActivity –(Almost) all concepts related to Activity still apply public class MainActivity extends AppCompactActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);
COEN 268-TR, spring 2016 23 V7 Support Library •Designed to be used with Android 2.1 (API level 7) and higher •Key features: –ActionBar–AppCompatActivity–AppCompatDialog–ShareActionProvider•Gradle build script dependency –com.android.support:appcompat-v7:23.1.0 Reference :
COEN 268-TR, spring 2016 24 Homework •Review notes •Understand key state transitions and callbacks •Duplicate lifecycle demo –Can you re-create all the transitions?