當前位置: 首頁>>代碼示例>>Java>>正文


Java ShowcaseView類代碼示例

本文整理匯總了Java中com.github.amlcurran.showcaseview.ShowcaseView的典型用法代碼示例。如果您正苦於以下問題:Java ShowcaseView類的具體用法?Java ShowcaseView怎麽用?Java ShowcaseView使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ShowcaseView類屬於com.github.amlcurran.showcaseview包,在下文中一共展示了ShowcaseView類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: _runShowcase

import com.github.amlcurran.showcaseview.ShowcaseView; //導入依賴的package包/類
private void _runShowcase(final List<ShowcaseStep> scl) {
    if (scl.isEmpty())
        return;
    ShowcaseStep step = scl.remove(0);
    new ShowcaseView.Builder(this)
            .withMaterialShowcase()
            .setStyle(R.style.CustomShowcaseTheme)
            .setTarget(step.target)
            .setContentTitle(step.title)
            .setContentText(step.text)
            .setShowcaseEventListener(new SimpleShowcaseEventListener() {
                @Override
                public void onShowcaseViewDidHide(ShowcaseView showcaseView) {
                    _runShowcase(scl);
                }
            })
            .build();
}
 
開發者ID:tarzasai,項目名稱:Uoccin,代碼行數:19,代碼來源:BaseActivity.java

示例2: showMenuButtonTutorialOnce

import com.github.amlcurran.showcaseview.ShowcaseView; //導入依賴的package包/類
public void showMenuButtonTutorialOnce() {
    if (Build.VERSION.SDK_INT >= 11 && oneSheeldLogo != null) {
        ViewTarget target = new ViewTarget(oneSheeldLogo);
        if (!getThisApplication().getAppPreferences().getBoolean(IS_CONTEXT_MENU_BUTTON_TUTORIAL_SHOWN_SP, false)) {
            new ShowcaseView.Builder(this)
                    .setTarget(target)
                    .withMaterialShowcase()
                    .setContentTitle(getString(R.string.context_menu_tutorial_open_context_menu))
                    .setContentText(getString(R.string.context_menu_tutorial_upgrade_the_firmware_clear_the_automatic_connection_and_see_the_tutorial_again_after_opening_the_context_menu_by_clicking_on_1sheeld_logo))
                    .setStyle(R.style.CustomShowcaseTheme)
                    .hideOnTouchOutside()
                    .build().hideButton();
            getThisApplication().getAppPreferences().edit().putBoolean(IS_CONTEXT_MENU_BUTTON_TUTORIAL_SHOWN_SP, true).commit();
        }
    }
}
 
開發者ID:Dnet3,項目名稱:CustomAndroidOneSheeld,代碼行數:17,代碼來源:MainActivity.java

示例3: showNewFeatureTips

import com.github.amlcurran.showcaseview.ShowcaseView; //導入依賴的package包/類
private void showNewFeatureTips() {
    boolean showTips = MainApp.PREF_UTIL.getBoolean(Constant.SHOW_EXPAND_STORY_TIPS, true);
    if (showTips) {
        View container = findViewById(R.id.container);
        try {
            showcaseView = new ShowcaseView.Builder(this)
                    .withNewStyleShowcase()
                    .setTarget(new PointTarget(DensityUtil.screenWidthInPix(this) / 2,
                            (int) container.getY() + DensityUtil.dip2px(this, 56)))
                    .setContentTitle(R.string.tips_expand_story)
                    .setStyle(R.style.ShowcaseTheme)
                    .hideOnTouchOutside()
                    .setOnClickListener(new View.OnClickListener() {
                        @Override
                        public void onClick(View view) {
                            hideNewFeatureTips();
                        }
                    })
                    .build();
            showcaseView.hideButton();
            MainApp.PREF_UTIL.putBoolean(Constant.SHOW_EXPAND_STORY_TIPS, false);
        } catch (Exception e) {

        }
    }
}
 
開發者ID:jianliaoim,項目名稱:talk-android,代碼行數:27,代碼來源:ChatActivity.java

示例4: showNewFeatureTips

import com.github.amlcurran.showcaseview.ShowcaseView; //導入依賴的package包/類
private void showNewFeatureTips() {
    boolean showTips = MainApp.PREF_UTIL.getBoolean(Constant.SHOW_STORY_USER_MGR_TIPS, true);
    if (showTips) {
        try {
            showcaseView = new ShowcaseView.Builder(this)
                    .withNewStyleShowcase()
                    .setTarget(new PointTarget(DensityUtil.screenWidthInPix(this) - DensityUtil.dip2px(this, 112),
                            DensityUtil.dip2px(this, 56)))
                    .setContentTitle(R.string.tips_manage_story_member)
                    .setStyle(R.style.ShowcaseTheme)
                    .hideOnTouchOutside()
                    .setOnClickListener(new View.OnClickListener() {
                        @Override
                        public void onClick(View view) {
                            hideNewFeatureTips();
                        }
                    })
                    .build();
            showcaseView.hideButton();
            MainApp.PREF_UTIL.putBoolean(Constant.SHOW_STORY_USER_MGR_TIPS, false);
        } catch (Exception e) {

        }
    }
}
 
開發者ID:jianliaoim,項目名稱:talk-android,代碼行數:26,代碼來源:StorySettingActivity.java

示例5: showNewFeatureTips

import com.github.amlcurran.showcaseview.ShowcaseView; //導入依賴的package包/類
private void showNewFeatureTips() {
    boolean showStartTalkTips = MainApp.PREF_UTIL.getBoolean(Constant.SHOW_START_TALK_TIPS, true);
    if (showStartTalkTips) {
        try {
            showcaseView = new ShowcaseView.Builder(this)
                    .withNewStyleShowcase()
                    .setTarget(new ViewTarget(R.id.show_case_anchor, this))
                    .setContentTitle(R.string.tips_start_chat)
                    .setStyle(R.style.ShowcaseTheme)
                    .hideOnTouchOutside()
                    .build();
            showcaseView.hideButton();
            MainApp.PREF_UTIL.putBoolean(Constant.SHOW_START_TALK_TIPS, false);
        } catch (Exception e) {

        }
    }
}
 
開發者ID:jianliaoim,項目名稱:talk-android,代碼行數:19,代碼來源:HomeActivity.java

示例6: onShowcaseViewDidHide

import com.github.amlcurran.showcaseview.ShowcaseView; //導入依賴的package包/類
@Override
public void onShowcaseViewDidHide(ShowcaseView showcaseView) {
    sv = null;
    itemsShown ++;
    if (itemsShown < caseHolders.size()) {
        sv =  new ShowcaseView.Builder(context)
                .withMaterialShowcase()
                .setStyle(R.style.CustomShowcaseTheme2)
                .setTarget(caseHolders.get(itemsShown).getTarget())
                .setShowcaseEventListener(this)
                .setContentText(caseHolders.get(itemsShown).getText())
                .build();
        if (caseHolders.get(itemsShown).getBtnPosition() == Constants.TUTORIAL_BTN_LEFT) {
            sv.setButtonPosition(positionButtonLeft());
        }
    }
}
 
開發者ID:smartufpa,項目名稱:SmartUFPA,代碼行數:18,代碼來源:AppTutorial.java

示例7: warnUserDesconnected

import com.github.amlcurran.showcaseview.ShowcaseView; //導入依賴的package包/類
@Override
public void warnUserDesconnected() {
    textViewGoogleSignIn.setVisibility(View.VISIBLE);
    linearLayoutUser.setVisibility(View.GONE);
    MenuItem menuItemDiscovery = navigationView.getMenu().getItem(1);
    menuItemDiscovery.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
        @Override
        public boolean onMenuItemClick(final MenuItem item) {
            new ShowcaseView.Builder(HomeActivity.this)
                    .setTarget(new ViewTarget(navigationView.getHeaderView(0).findViewById(R.id.textview_signingoogle)))
                    .setStyle(R.style.CustomShowcaseTheme)
                    .setContentTitle(getString(R.string.homeactivity_discovermoviestitle))
                    .setContentText(getString(R.string.homeactivity_discovermoviesdetails))
                    .hideOnTouchOutside()
                    .build();
            return true;
        }
    });
    SpannableString spannableString = new SpannableString(getString(R.string.discoveryactivity_title));
    spannableString.setSpan(new ForegroundColorSpan(getResources().getColor(R.color.gray_light)), 0, spannableString.length(), 0);
    menuItemDiscovery.setTitle(spannableString);
}
 
開發者ID:tassioauad,項目名稱:Movie-Check,代碼行數:23,代碼來源:HomeActivity.java

示例8: firstRunCheck

import com.github.amlcurran.showcaseview.ShowcaseView; //導入依賴的package包/類
private void firstRunCheck() {
    boolean isFirstRun = sharedPreferences.getBoolean("isFirstRun", true);
    if(isFirstRun) {
        ShowcaseView showcaseView = new ShowcaseView.Builder(this)
                .setTarget(new ViewTarget(fab))
                .setContentTitle("Add!")
                .setContentText("Add new text clips here - they will be automatically synchronized with Android Wear device.")
                .hideOnTouchOutside()
                .setStyle(R.style.CustomShowcaseTheme)
                .singleShot(234342)
                .build();
        showcaseView.hideButton();
        showcaseView.show();

        createStory("Sample note", MainActivity.this.getResources().getString(R.string.samuel_speech));
        readStories();

        sharedPreferences.edit().putBoolean("isFirstRun", false).apply();
    }
}
 
開發者ID:tajchert,項目名稱:SpritzerWear,代碼行數:21,代碼來源:MainActivity.java

示例9: onShowcaseViewHide

import com.github.amlcurran.showcaseview.ShowcaseView; //導入依賴的package包/類
@Override
public void onShowcaseViewHide(ShowcaseView showcaseView) {
    if (n == 1) {
        n = 0;
        mSV = new ShowcaseView.Builder(this)
                .setContentTitle(R.string.showcase_vr_mode)
                .setContentText(R.string.showcase_vr_mode_description)
                .setTarget(new ViewTarget(mPointer))
                .setStyle(com.github.amlcurran.showcaseview.R.style.ShowcaseButton)
                .hideOnTouchOutside()
                .doNotBlockTouches()
                .setShowcaseEventListener(this)
                .build();
        mSV.hideButton();
    }
}
 
開發者ID:saryana,項目名稱:TraceRoute,代碼行數:17,代碼來源:OpenGLActivity.java

示例10: setupShowcaseForScreenLock

import com.github.amlcurran.showcaseview.ShowcaseView; //導入依賴的package包/類
private void setupShowcaseForScreenLock() {
    if ( showcaseView != null || daydreamMode) {
        return;
    }

    if ( this.locked ) {
        showcaseView = new ShowcaseView.Builder((Activity) mContext)
            .setTarget(new ViewTarget(menuIcon))
            .hideOnTouchOutside()
            .setContentTitle(mContext.getString(R.string.showcase_title_screen_lock))
            .setContentText(mContext.getString(R.string.showcase_text_screen_lock))
            .setShowcaseEventListener(showcaseViewEventListener)
            .singleShot(SHOWCASE_ID_SCREEN_LOCK)
            .build();
        showcaseView.hideButton();
        showShowcase();
    }

}
 
開發者ID:firebirdberlin,項目名稱:nightdream,代碼行數:20,代碼來源:NightDreamUI.java

示例11: build

import com.github.amlcurran.showcaseview.ShowcaseView; //導入依賴的package包/類
public static AutolaunchingQuestionViewShowcaser build(Activity activity, AndroidQuestionView questionView) {
    ShowcaseView showcaseView = new ShowcaseView.Builder(activity)
            .setStyle(R.style.CustomShowcaseTheme)
            .singleShot((long)R.id.question_activity_showcase_id)
            .build();
    showcaseView.setDetailTextAlignment(Layout.Alignment.ALIGN_CENTER);
    AutolaunchingQuestionViewShowcaser.ToolbarTargetFactory toolbarTargetFactory = new AutolaunchingQuestionViewShowcaser.ToolbarTargetFactory() {
        @Override
        public Target createToolbarTarget(Toolbar toolbar, int targetId) {
            return new QuestionActivity.ToolbarActionItemTarget(toolbar, targetId);
        }
    };
    AutolaunchingQuestionViewShowcaser.ViewTargetFactory viewTargetFactory = new AutolaunchingQuestionViewShowcaser.ViewTargetFactory() {
        @Override
        public Target createTarget(View targetView) {
            return new ViewTarget(targetView);
        }
    };
    return new AutolaunchingQuestionViewShowcaser(activity.getApplicationContext(), toolbarTargetFactory, viewTargetFactory, new AMLShowcaseViewAdapter(showcaseView), questionView);
}
 
開發者ID:etp404,項目名稱:frenchverbinator,代碼行數:21,代碼來源:QuestionActivityShowcaserBuilder.java

示例12: onCreate

import com.github.amlcurran.showcaseview.ShowcaseView; //導入依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(org.ema.R.layout.activity_admin_form);
    realm = Realm.getDefaultInstance();
    showcaseView = new ShowcaseView.Builder(this)
            .withNewStyleShowcase()
            .setTarget(new ViewTarget(R.id.imageView, this))
            .setContentTitle(R.string.tutorial_admin_form1)
            .setContentText(R.string.tutorial_admin_form2)
            .setOnClickListener(this)
            .build();
    showcaseView.setDetailTextAlignment(Layout.Alignment.ALIGN_CENTER);
    showcaseView.setBackgroundColor(ContextCompat.getColor(this, R.color.blue));
    showcaseView.setTitleTextAlignment(Layout.Alignment.ALIGN_CENTER);
}
 
開發者ID:samuelyuri,項目名稱:E-MobileActivities,代碼行數:17,代碼來源:AdminFormActivity.java

示例13: showHelp

import com.github.amlcurran.showcaseview.ShowcaseView; //導入依賴的package包/類
public void showHelp() {
	MyLog.entry();

	if (mHelpPages.size() > 0) {
		mCounter = 0;
		mShowcaseView = new ShowcaseView.Builder(mActivity, true).build();

		showPage();
		mShowcaseView.overrideButtonClick(new View.OnClickListener() {
			@Override
			public void onClick(View view) {
				MyLog.entry();
				mCounter++;

				if (mCounter < mHelpPages.size()) {
					showPage();
				} else {
					closeHelp();
				}
				MyLog.exit();
			}
		});
	}

	MyLog.exit();
}
 
開發者ID:Neraud,項目名稱:PADListener,代碼行數:27,代碼來源:ShowcaseViewHelper.java

示例14: onCreate

import com.github.amlcurran.showcaseview.ShowcaseView; //導入依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_active_nudges);

    //setup ShowcaseView for first time instructions
    final ShowcaseView nudgeButtonShowcase = initializeShowcaseView();
    findViewById(newNudgeButton).setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            nudgeButtonShowcase.hide();
            Intent intent = new Intent(ActiveNudgesActivity.this, MessageFormActivity.class);
            startActivity(intent);
            finish();
        }
    });
}
 
開發者ID:kwhite17,項目名稱:Nudge,代碼行數:18,代碼來源:ActiveNudgesActivity.java

示例15: startTutorial

import com.github.amlcurran.showcaseview.ShowcaseView; //導入依賴的package包/類
/**
 * Starts the tutorial and sets up tutorial showcase with starting values
 */
public void startTutorial() {
    showcase = new ShowcaseView.Builder(activity)
            .withNewStyleShowcase()
            .setTarget(refreshGlobal)
            .setStyle(R.style.TutorialTheme)
            .setContentTitle(activity.getString(R.string.tutorial_global_refresh_title))
            .setContentText(activity.getString(R.string.tutorial_global_refresh_text))
            .setOnClickListener(this)
            .build();
    position++;
}
 
開發者ID:jthomperoo,項目名稱:Forge,代碼行數:15,代碼來源:Tutorial.java


注:本文中的com.github.amlcurran.showcaseview.ShowcaseView類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。