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 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 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(); }