Tabnine Logo
ShowcaseView
Code IndexAdd Tabnine to your IDE (free)

How to use
ShowcaseView
in
com.github.amlcurran.showcaseview

Best Java code snippets using com.github.amlcurran.showcaseview.ShowcaseView (Showing top 20 results out of 315)

origin: k9mail/k-9

  private void hideShowcaseView() {
    if (showcaseView != null && showcaseView.isShowing()) {
      showcaseView.hide();
    }
    showcaseView = null;
  }
}
origin: k9mail/k-9

protected void highlightViewInBackground() {
  if (!getArguments().containsKey(ARG_HIGHLIGHT_VIEW)) {
    return;
  }
  Activity activity = getActivity();
  if (activity == null) {
    throw new IllegalStateException("fragment must be attached to set highlight!");
  }
  boolean alreadyShowing = showcaseView != null && showcaseView.isShowing();
  if (alreadyShowing) {
    return;
  }
  int highlightedView = getArguments().getInt(ARG_HIGHLIGHT_VIEW);
  showcaseView = new Builder(activity)
      .setTarget(new ViewTarget(highlightedView, activity))
      .hideOnTouchOutside()
      .blockAllTouches()
      .withMaterialShowcase()
      .setStyle(R.style.ShowcaseTheme)
      .build();
  showcaseView.hideButton();
}
origin: NightscoutFoundation/xDrip

      .build();
myShowcase.setTag(which);
myShowcase.setBackgroundColor(Color.TRANSPARENT);
myShowcase.setShouldCentreText(false);
myShowcase.setOnShowcaseEventListener(new OnShowcaseEventListener() {
                     @Override
                     public void onShowcaseViewHide(ShowcaseView showcaseView) {
params.addRule(RelativeLayout.ALIGN_PARENT_LEFT);
params.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
myShowcase.setButtonPosition(params);
myShowcase.show();
origin: NightscoutFoundation/xDrip

private synchronized void showcasemenu(int option) {
  if ((myShowcase != null) && (myShowcase.isShowing())) return;
  if (ShotStateStore.hasShot(option)) return;
  try {
    ProfileViewTarget target = null;
    String title = "";
    String message = "";
    switch (option) {
      case SHOWCASE_PROFILE_SPLIT:
        target = new ProfileViewTarget(R.id.profile_recycler_view, this, 40, 40);
        title = getString(R.string.long_press_to_split_or_delete);
        message = getString(R.string.press_and_hold_on_the_background_to_split_or_delete);
        break;
    }
    if (target != null) {
      myShowcase = new ShowcaseView.Builder(this)
          .setTarget(target)
          .setStyle(R.style.CustomShowcaseTheme2)
          .setContentTitle(title)
          .setContentText("\n" + message)
          .setShowcaseDrawer(new JamorhamShowcaseDrawer(getResources(), getTheme(), 90, 14))
          .singleShot(oneshot ? option : -1)
          .build();
      myShowcase.setBackgroundColor(Color.TRANSPARENT);
      myShowcase.show();
    }
  } catch (Exception e) {
    Log.e(TAG, "Exception in showcase: " + e.toString());
  }
}
origin: DaxiaK/MyDiary

switch (oobeCount) {
  case 0:
    sv.setButtonPosition(centerParams);
    sv.setShowcase(new CustomViewTarget(RecyclerView_topic, 4, 4), true);
    sv.setContentTitle(getString(R.string.oobe_main_topic_list_title));
    sv.setContentText(getString(R.string.oobe_main_topic_list_content));
    break;
  case 1:
    sv.setButtonPosition(leftParams);
    sv.setShowcase(new ViewTarget(EDT_main_topic_search), true);
    sv.setContentTitle(getString(R.string.oobe_main_search_title));
    sv.setContentText(getString(R.string.oobe_main_search_content));
    break;
  case 2:
    sv.setButtonPosition(centerParams);
    sv.setShowcase(new ViewTarget(IV_main_setting), true);
    sv.setContentTitle(getString(R.string.oobe_main_adv_setting_title));
    sv.setContentText(getString(R.string.oobe_main_adv_setting_content));
    break;
  case 3:
    sv.setButtonPosition(centerParams);
    sv.setTarget(Target.NONE);
    sv.setContentTitle(getString(R.string.oobe_main_mydiary_title));
    sv.setContentText(getString(R.string.oobe_main_mydiary_content));
    sv.setButtonText(getString(R.string.dialog_button_ok));
    break;
  case 4:
    sv.hide();
    break;
origin: NightscoutFoundation/xDrip

      .build();
  myShowcase.setBackgroundColor(Color.TRANSPARENT);
  myShowcase.show();
  showcased_undo = true;
} else {
        .build();
    myShowcase.setBackgroundColor(Color.TRANSPARENT);
    myShowcase.show();
    showcased_newline = true;
  } else {
origin: NightscoutFoundation/xDrip

  @Override
  public void run() {
    final ShowcaseView myShowcase = new ShowcaseView.Builder(activity)
        .setTarget(target)
        .setStyle(R.style.CustomShowcaseTheme2)
        .setContentTitle(title)
        .setContentText("\n" + message)
        .setShowcaseDrawer(new JamorhamShowcaseDrawer(activity.getResources(), activity.getTheme(), size1, size2, 255))
        .singleShot(oneshot ? option : -1)
        .build();
    myShowcase.setBackgroundColor(Color.TRANSPARENT);
    myShowcase.setShouldCentreText(false);
    myShowcase.setBlocksTouches(true);
    myShowcase.show();
  }
}
origin: powerpoint45/Lucid-Browser

boolean isShowcasing(){
  return showcase.isShowing();
}
origin: DaxiaK/MyDiary

    .setOnClickListener(showcaseViewOnClickListener)
    .build();
sv.setButtonText(getString(R.string.oobe_next_button));
sv.setButtonPosition(leftParams);
origin: powerpoint45/Lucid-Browser

private void startShowcase(){
  Log.d("LL","startShowcase");
  activity.drawerLayout.openDrawer(activity.browserListView);
  showcase = new ShowcaseView.Builder(activity)
      .setContentTitle(activity.getResources().getString(R.string.step_browser_sidebar_title))
      .setContentText(activity.getResources().getString(R.string.step_browser_sidebar_summary))
      .setShowcaseEventListener(showcaseEventListener)
      .setOnClickListener(showcaseClick)
      .setStyle(R.style.CustomShowcaseTheme2)
      .build();
  showcase.setButtonPosition(getButtonLP());
  showcase.setOnClickListener(showcaseClick);
}
origin: brainysoon/cyberCar

  private void showcaseView() {

    RelativeLayout.LayoutParams lps = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
    lps.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
    lps.addRule(RelativeLayout.ALIGN_PARENT_LEFT);
    int margin = ((Number) (getResources().getDisplayMetrics().density * 12)).intValue();
    lps.setMargins(margin, margin, margin, margin);

    ViewTarget target = new ViewTarget(R.id.activity_main_boommenubutton_menu, this);
    ShowcaseView sv = new ShowcaseView.Builder(this)
        .withMaterialShowcase()
        .setTarget(target)
        .setContentTitle("主菜单")
        .setContentText("点击这个,然后可以看到主菜单.")
        .setStyle(R.style.CustomShowcaseTheme2)
        .setShowcaseEventListener(this)
//                .replaceEndButton(R.layout.view_custom_button)
        .build();
    sv.setButtonPosition(lps);
  }

origin: powerpoint45/Lucid-Browser

  @Override
  public void onClick(View v) {
    activity.drawerLayout.closeDrawer(activity.browserListView);
    uncolorBars();
    showcase.hide();
    MainActivity.globalPrefs.edit().putBoolean("showcased",true).commit();
    Log.d("LB","DONESHOWCASE");
  }
};
origin: jamorham/xDrip-plus

      .build();
myShowcase.setTag(which);
myShowcase.setBackgroundColor(Color.TRANSPARENT);
myShowcase.setShouldCentreText(false);
myShowcase.setOnShowcaseEventListener(new OnShowcaseEventListener() {
                     @Override
                     public void onShowcaseViewHide(ShowcaseView showcaseView) {
params.addRule(RelativeLayout.ALIGN_PARENT_LEFT);
params.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
myShowcase.setButtonPosition(params);
myShowcase.show();
origin: jamorham/xDrip-plus

private synchronized void showcasemenu(int option) {
  if ((myShowcase != null) && (myShowcase.isShowing())) return;
  if (ShotStateStore.hasShot(option)) return;
  try {
    ProfileViewTarget target = null;
    String title = "";
    String message = "";
    switch (option) {
      case SHOWCASE_PROFILE_SPLIT:
        target = new ProfileViewTarget(R.id.profile_recycler_view, this, 40, 40);
        title = getString(R.string.long_press_to_split_or_delete);
        message = getString(R.string.press_and_hold_on_the_background_to_split_or_delete);
        break;
    }
    if (target != null) {
      myShowcase = new ShowcaseView.Builder(this)
          .setTarget(target)
          .setStyle(R.style.CustomShowcaseTheme2)
          .setContentTitle(title)
          .setContentText("\n" + message)
          .setShowcaseDrawer(new JamorhamShowcaseDrawer(getResources(), getTheme(), 90, 14))
          .singleShot(oneshot ? option : -1)
          .build();
      myShowcase.setBackgroundColor(Color.TRANSPARENT);
      myShowcase.show();
    }
  } catch (Exception e) {
    Log.e(TAG, "Exception in showcase: " + e.toString());
  }
}
origin: jamorham/xDrip-plus

      .build();
  myShowcase.setBackgroundColor(Color.TRANSPARENT);
  myShowcase.show();
  showcased_undo = true;
} else {
        .build();
    myShowcase.setBackgroundColor(Color.TRANSPARENT);
    myShowcase.show();
    showcased_newline = true;
  } else {
origin: jamorham/xDrip-plus

  @Override
  public void run() {
    final ShowcaseView myShowcase = new ShowcaseView.Builder(activity)
        .setTarget(target)
        .setStyle(R.style.CustomShowcaseTheme2)
        .setContentTitle(title)
        .setContentText("\n" + message)
        .setShowcaseDrawer(new JamorhamShowcaseDrawer(activity.getResources(), activity.getTheme(), size1, size2, 255))
        .singleShot(oneshot ? option : -1)
        .build();
    myShowcase.setBackgroundColor(Color.TRANSPARENT);
    myShowcase.setShouldCentreText(false);
    myShowcase.setBlocksTouches(true);
    myShowcase.show();
  }
}
origin: NightscoutFoundation/xDrip

private synchronized void showcasemenu(final int option) {
  if ((myShowcase != null) && (myShowcase.isShowing())) return;
  if (ShotStateStore.hasShot(option)) return;
  if (!JoH.ratelimit("language-showcase", 2)) return;
origin: NightscoutFoundation/xDrip

private synchronized void showcasemenu(int option) {
  if ((myShowcase != null) && (myShowcase.isShowing())) return;
  if (ShotStateStore.hasShot(option)) return;
          .build();
      myShowcase.setBackgroundColor(Color.TRANSPARENT);
      myShowcase.show();
origin: GrapeCity/DebugRank

  private void hideShowcase()
  {
    if (compileShowcaseView != null && compileShowcaseView.isShowing())
    {
      compileShowcaseView.hide();
    }
  }
}
origin: NightscoutFoundation/xDrip

  @Override
  public void run() {
    final ShowcaseView myShowcase = new ShowcaseView.Builder(activity)
        .setTarget(target)
        .setStyle(R.style.CustomShowcaseTheme2)
        .setContentTitle(title)
        .setContentText("\n" + message)
        .setShowcaseDrawer(new JamorhamShowcaseDrawer(getResources(), getTheme(), size1, size2, 255))
        .singleShot(oneshot ? option : -1)
        .build();
    myShowcase.setBackgroundColor(Color.TRANSPARENT);
    myShowcase.show();
  }
}
com.github.amlcurran.showcaseviewShowcaseView

Most used methods

  • isShowing
  • setButtonPosition
  • hide
  • setBackgroundColor
  • setBlocksTouches
  • setOnShowcaseEventListener
  • setShouldCentreText
  • setTag
  • show
  • hideButton
  • postDelayed
  • setButtonText
  • postDelayed,
  • setButtonText,
  • setContentText,
  • setContentTitle,
  • setOnClickListener,
  • setShowcase,
  • setTarget,
  • setVisibility

Popular in Java

  • Making http requests using okhttp
  • startActivity (Activity)
  • putExtra (Intent)
  • onCreateOptionsMenu (Activity)
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • JComboBox (javax.swing)
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now