Android Tutorial Team 3 Jerry Yu Mayank Mandava

  • Slides: 8
Download presentation
Android Tutorial Team 3 Jerry Yu Mayank Mandava Mu Du Will Wangles

Android Tutorial Team 3 Jerry Yu Mayank Mandava Mu Du Will Wangles

Tutorial 1 – Hand drawn • • A new tutorial activity Background set to

Tutorial 1 – Hand drawn • • A new tutorial activity Background set to “Drawable” Image created externally with overlay Goes away on click <Linear. Layout android: orientation="vertical" android: id="@+id/tutorial" android: layout_width="match_parent" android: layout_height="match_parent" android: background="@drawable/tutorial”> </Linear. Layout>

Tutorial 1 – Hand drawn Tutorial can be explicitly enabled/disabled private void disable. Tutorial()

Tutorial 1 – Hand drawn Tutorial can be explicitly enabled/disabled private void disable. Tutorial() { Prefs. Mgr. set. String(this, IS_TUTORIAL_ENABLED, "false"); } private void enable. Tutorial() { Prefs. Mgr. set. String(this, IS_TUTORIAL_ENABLED, "true"); } if (Prefs. Mgr. get. String(this, IS_TUTORIAL_ENABLED) == null) { // either first launch, or user has not disabled tutorial yet, so tutorial window opens by default Intent tutorial. Intent = new Intent(Main. Activity. this, Tutorial. Activity. class); start. Activity(tutorial. Intent); } else if (Prefs. Mgr. get. String(this, IS_TUTORIAL_ENABLED). equals. Ignore. Case("true")) { Intent tutorial. Intent = new Intent(Main. Activity. this, Tutorial. Activity. class); start. Activity(tutorial. Intent); }

Tutorial 2 – Transparent Overlay • New Activity on top of old one •

Tutorial 2 – Transparent Overlay • New Activity on top of old one • Background made semitransparent • Image consists of only arrows and text • Launches first time, or manually. <style name="App. Theme. Transparent" parent="App. Theme"> <item name="android: window. Is. Translucent">true</item> <item name="android: window. Background">@android: color/transpar ent</item> <item name="android: window. Content. Overlay">@null</item> <item name="android: window. No. Title">true</item> <item name="android: window. Is. Floating">true</item> <item name="android: background. Dim. Enabled">false</item> </style>

Tutorial 2 – Transparent Overlay Includes Landscape Mode

Tutorial 2 – Transparent Overlay Includes Landscape Mode

Tutorial 3 - Showcase. View Single Use @Override protected void on. Create(Bundle saved. Instance.

Tutorial 3 - Showcase. View Single Use @Override protected void on. Create(Bundle saved. Instance. State) { super. on. Create(saved. Instance. State) ; set. Content. View(R. layout. activity_single_shot); Target view. Target = new View. Target(R. id. button, this); new Showcase. View. Builder(this, true). set. Target(view. Target). set. Content. Title(R. string. title_single_shot). set. Content. Text(R. string. R_string_desc_single_shot ). single. Shot( 42). build(); }

Tutorial 3 – Showcase. View Animations private Showcase. View showcase. View; … public void

Tutorial 3 – Showcase. View Animations private Showcase. View showcase. View; … public void on. Click(View v) { switch (counter) { case 0: showcase. View. set. Showcase(… break; case 1: showcase. View. set. Showcase(. . break; case 2: showcase. View. set. Target(Targ. . break; case 3: showcase. View. hide(); set. Alpha(1. 0 f, text. View 1, break; } counter++; }

Appendix • Showcase. View: https: //github. com/amlcurran/Showcase. View • Transparent Activity: http: //stackoverflow. com/questions/2176922/how-to-createtransparent-activity-in-android

Appendix • Showcase. View: https: //github. com/amlcurran/Showcase. View • Transparent Activity: http: //stackoverflow. com/questions/2176922/how-to-createtransparent-activity-in-android