private void guideQuickSearch() { Activity activity = getActivity2(); if (null == activity || !Settings.getGuideQuickSearch()) { return; } Display display = activity.getWindowManager().getDefaultDisplay(); Point point = new Point(); display.getSize(point); mShowcaseView = new ShowcaseView.Builder(activity) .withMaterialShowcase() .setStyle(R.style.Guide) .setTarget(new PointTarget(point.x, point.y / 3)) .blockAllTouches() .setContentTitle(R.string.guide_quick_search_title) .setContentText(R.string.guide_quick_search_text) .replaceEndButton(R.layout.button_guide) .setShowcaseEventListener(new SimpleShowcaseEventListener() { @Override public void onShowcaseViewDidHide(ShowcaseView showcaseView) { mShowcaseView = null; ViewUtils.removeFromParent(showcaseView); Settings.putGuideQuickSearch(false); openDrawer(Gravity.RIGHT); } }).build(); }
private void guideCollections() { Activity activity = getActivity2(); if (null == activity || !Settings.getGuideCollections()) { return; } Display display = activity.getWindowManager().getDefaultDisplay(); Point point = new Point(); display.getSize(point); mShowcaseView = new ShowcaseView.Builder(activity) .withMaterialShowcase() .setStyle(R.style.Guide) .setTarget(new PointTarget(point.x, point.y / 3)) .blockAllTouches() .setContentTitle(R.string.guide_collections_title) .setContentText(R.string.guide_collections_text) .replaceEndButton(R.layout.button_guide) .setShowcaseEventListener(new SimpleShowcaseEventListener() { @Override public void onShowcaseViewDidHide(ShowcaseView showcaseView) { mShowcaseView = null; ViewUtils.removeFromParent(showcaseView); Settings.putGuideCollections(false); openDrawer(Gravity.RIGHT); } }).build(); }
private void guideDownloadLabels() { MainActivity activity = getActivity2(); if (null == activity || !Settings.getGuideDownloadLabels()) { return; } Display display = activity.getWindowManager().getDefaultDisplay(); Point point = new Point(); display.getSize(point); mShowcaseView = new ShowcaseView.Builder(activity) .withMaterialShowcase() .setStyle(R.style.Guide) .setTarget(new PointTarget(point.x, point.y / 3)) .blockAllTouches() .setContentTitle(R.string.guide_download_labels_title) .setContentText(R.string.guide_download_labels_text) .replaceEndButton(R.layout.button_guide) .setShowcaseEventListener(new SimpleShowcaseEventListener() { @Override public void onShowcaseViewDidHide(ShowcaseView showcaseView) { mShowcaseView = null; ViewUtils.removeFromParent(showcaseView); Settings.puttGuideDownloadLabels(false); openDrawer(Gravity.RIGHT); } }).build(); }
private void descriptionHint() { Button button = new Button(this); button.setBackgroundColor(0); // transparent new ShowcaseView.Builder(this) .withNewStyleShowcase() .setStyle(R.style.ShowcaseViewStyle) .setTarget(new ViewTarget(R.id.description_glyphGame, this)) .setContentText(R.string.description_showView) .replaceEndButton(button) .hideOnTouchOutside() .singleShot(4242) // don't care about an ID, because this is the only ShowcaseView .build(); } }
private void showShowcase(ViewTarget viewTarget, @StringRes int titleResId, @StringRes int descriptionResId) { Button button = new Button(this); button.setVisibility(View.GONE); compileShowcaseView = new ShowcaseView.Builder(this) .withNewStyleShowcase() .setStyle(R.style.CustomShowcaseTheme2) .setTarget(viewTarget) .setContentTitle(titleResId) .setContentText(descriptionResId) .replaceEndButton(button) .build(); }
.setStyle(R.style.OOBEShowcaseTheme) .singleShot(OOBE.MAIN_PAGE) .replaceEndButton(new MyDiaryButton(this)) .setOnClickListener(showcaseViewOnClickListener) .build();
.setContentTitle(R.string.guide_download_thumb_title) .setContentText(R.string.guide_download_thumb_text) .replaceEndButton(R.layout.button_guide) .setShowcaseEventListener(new SimpleShowcaseEventListener() { @Override