Exemple #1
0
  /** On first load, show some functionality hints */
  private void showcaseDrawer() {
    if (alreadyShowcased) {
      return;
    }
    final ConfigOptions options = new ConfigOptions();
    options.shotType = ShowcaseView.TYPE_NO_LIMIT;
    options.block = true;
    // Used in saving state
    options.showcaseId = 1;
    final int vertDp = ViewsHelper.convertDip2Pixels(this, 200);
    final int horDp = ViewsHelper.convertDip2Pixels(this, 200);
    sv =
        ShowcaseView.insertShowcaseViewWithType(
            ShowcaseView.ITEM_ACTION_HOME,
            android.R.id.home,
            this,
            R.string.showcase_main_title,
            R.string.showcase_main_msg,
            options);
    sv.animateGesture(0, vertDp, horDp, vertDp);

    PreferenceManager.getDefaultSharedPreferences(this)
        .edit()
        .putBoolean(SHOWCASED_MAIN, true)
        .commit();
    alreadyShowcased = true;
  }