Search in sources :

Example 1 with PointTarget

use of com.github.amlcurran.showcaseview.targets.PointTarget in project EhViewer by seven332.

the class DownloadsScene method guideDownloadLabels.

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();
}
Also used : SimpleShowcaseEventListener(com.github.amlcurran.showcaseview.SimpleShowcaseEventListener) CheckBoxDialogBuilder(com.hippo.app.CheckBoxDialogBuilder) PointTarget(com.github.amlcurran.showcaseview.targets.PointTarget) MainActivity(com.hippo.ehviewer.ui.MainActivity) Point(android.graphics.Point) ShowcaseView(com.github.amlcurran.showcaseview.ShowcaseView) Display(android.view.Display)

Example 2 with PointTarget

use of com.github.amlcurran.showcaseview.targets.PointTarget in project EhViewer by seven332.

the class FavoritesScene method guideCollections.

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();
}
Also used : SimpleShowcaseEventListener(com.github.amlcurran.showcaseview.SimpleShowcaseEventListener) EditTextDialogBuilder(com.hippo.app.EditTextDialogBuilder) SpannableStringBuilder(android.text.SpannableStringBuilder) FavListUrlBuilder(com.hippo.ehviewer.client.data.FavListUrlBuilder) MainActivity(com.hippo.ehviewer.ui.MainActivity) Activity(android.app.Activity) PointTarget(com.github.amlcurran.showcaseview.targets.PointTarget) Point(android.graphics.Point) ShowcaseView(com.github.amlcurran.showcaseview.ShowcaseView) Display(android.view.Display)

Example 3 with PointTarget

use of com.github.amlcurran.showcaseview.targets.PointTarget in project EhViewer by seven332.

the class GalleryListScene method guideQuickSearch.

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();
}
Also used : SimpleShowcaseEventListener(com.github.amlcurran.showcaseview.SimpleShowcaseEventListener) EditTextDialogBuilder(com.hippo.app.EditTextDialogBuilder) CheckBoxDialogBuilder(com.hippo.app.CheckBoxDialogBuilder) SpannableStringBuilder(android.text.SpannableStringBuilder) ListUrlBuilder(com.hippo.ehviewer.client.data.ListUrlBuilder) GalleryActivity(com.hippo.ehviewer.ui.GalleryActivity) MainActivity(com.hippo.ehviewer.ui.MainActivity) Activity(android.app.Activity) PointTarget(com.github.amlcurran.showcaseview.targets.PointTarget) Point(android.graphics.Point) ShowcaseView(com.github.amlcurran.showcaseview.ShowcaseView) Display(android.view.Display)

Aggregations

Point (android.graphics.Point)3 Display (android.view.Display)3 ShowcaseView (com.github.amlcurran.showcaseview.ShowcaseView)3 SimpleShowcaseEventListener (com.github.amlcurran.showcaseview.SimpleShowcaseEventListener)3 PointTarget (com.github.amlcurran.showcaseview.targets.PointTarget)3 MainActivity (com.hippo.ehviewer.ui.MainActivity)3 Activity (android.app.Activity)2 SpannableStringBuilder (android.text.SpannableStringBuilder)2 CheckBoxDialogBuilder (com.hippo.app.CheckBoxDialogBuilder)2 EditTextDialogBuilder (com.hippo.app.EditTextDialogBuilder)2 FavListUrlBuilder (com.hippo.ehviewer.client.data.FavListUrlBuilder)1 ListUrlBuilder (com.hippo.ehviewer.client.data.ListUrlBuilder)1 GalleryActivity (com.hippo.ehviewer.ui.GalleryActivity)1