Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "Android Tutorial Team 3 Jerry Yu Mayank Mandava Mu Du Will Wangles."— Presentation transcript:

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

2 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:id="@+id/tutorial" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/tutorial”>

3 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"); }

4 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 @android:color/transpar ent @null true true false

5 Tutorial 2 – Transparent Overlay Includes Landscape Mode

6 Tutorial 3 - ShowcaseView Single Use @Override 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(); }

7 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++; }

8 Appendix ShowcaseView: https://github.com/amlcurran/ShowcaseViewhttps://github.com/amlcurran/ShowcaseView Transparent Activity: http://stackoverflow.com/questions/2176922/how-to-create- transparent-activity-in-android http://stackoverflow.com/questions/2176922/how-to-create- transparent-activity-in-android


Download ppt "Android Tutorial Team 3 Jerry Yu Mayank Mandava Mu Du Will Wangles."

Similar presentations


Ads by Google