Android Tutorial Team 3 Jerry Yu Mayank Mandava Mu Du Will Wangles
Tutorial 1 – Hand drawn A new tutorial activity Background set to “Drawable” Image created externally with overlay Goes away on click <LinearLayout android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"
Tutorial 1 – Hand drawn Tutorial can be explicitly enabled/disabled if (PrefsMgr.getString(this, IS_TUTORIAL_ENABLED) == null) { // either first launch, or user has not disabled tutorial yet, so tutorial window opens by default Intent tutorialIntent = new Intent(MainActivity.this, TutorialActivity.class); startActivity(tutorialIntent); } else if (PrefsMgr.getString(this, IS_TUTORIAL_ENABLED).equalsIgnoreCase("true")) { Intent tutorialIntent = new Intent(MainActivity.this, TutorialActivity.class); startActivity(tutorialIntent); } private void disableTutorial() { PrefsMgr.setString(this, IS_TUTORIAL_ENABLED, "false"); } private void enableTutorial() { PrefsMgr.setString(this, IS_TUTORIAL_ENABLED, "true"); }
Tutorial 2 – Transparent Overlay New Activity on top of old one Background made semi- transparent Image consists of only arrows and text Launches first time, or manually. true true false
Tutorial 2 – Transparent Overlay Includes Landscape Mode
Tutorial 3 - ShowcaseView Single protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_single_shot); Target viewTarget = new ViewTarget(R.id.button, this); new ShowcaseView.Builder(this, true).setTarget(viewTarget).setContentTitle(R.string.title_single_shot).setContentText(R.string.R_string_desc_single_shot).singleShot(42).build(); }
Tutorial 3 – ShowcaseView Animations private ShowcaseView showcaseView; … public void onClick(View v) { switch (counter) { case 0: showcaseView.setShowcase(… break; case 1: showcaseView.setShowcase(.. break; case 2: showcaseView.setTarget(Targ.. break; case 3: showcaseView.hide(); setAlpha(1.0f, textView1, break; } counter++; }
Appendix ShowcaseView: Transparent Activity: transparent-activity-in-android transparent-activity-in-android