本文整理汇总了Java中uk.co.deanwild.materialshowcaseview.MaterialShowcaseView类的典型用法代码示例。如果您正苦于以下问题:Java MaterialShowcaseView类的具体用法?Java MaterialShowcaseView怎么用?Java MaterialShowcaseView使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MaterialShowcaseView类属于uk.co.deanwild.materialshowcaseview包,在下文中一共展示了MaterialShowcaseView类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: showTutorial
import uk.co.deanwild.materialshowcaseview.MaterialShowcaseView; //导入依赖的package包/类
private void showTutorial() {
ShowcaseConfig config = new ShowcaseConfig();
config.setDelay(500);
MaterialShowcaseSequence sequence = new MaterialShowcaseSequence(this);
sequence.setConfig(config);
sequence.addSequenceItem(new MaterialShowcaseView.Builder(this)
.setTarget(fab)
.singleUse("fab")
.setDismissText("NEXT")
.setMaskColour(ContextCompat.getColor(this, R.color.tutorialBackground))
.setDismissTextColor(ContextCompat.getColor(this, R.color.tutorialDismiss))
.setShapePadding(0)
.setContentText("Add new shows using this button.")
.build());
sequence.addSequenceItem(new MaterialShowcaseView.Builder(this)
.setTarget(mTabLayout)
.singleUse("tabs")
.setDismissText("GOT IT")
.setMaskColour(ContextCompat.getColor(this, R.color.tutorialBackground))
.setDismissTextColor(ContextCompat.getColor(this, R.color.tutorialDismiss))
.withRectangleShape()
.setShapePadding(0)
.setContentText("Swipe to see Aired and Upcoming episodes.")
.build());
sequence.start();
}
开发者ID:chashmeetsingh,项目名称:TrackIt-Android,代码行数:27,代码来源:MainActivity.java
示例2: onOptionsItemSelected
import uk.co.deanwild.materialshowcaseview.MaterialShowcaseView; //导入依赖的package包/类
@Override
public boolean onOptionsItemSelected(MenuItem item) {
if (item.getItemId() == R.id.menu_sample_action) {
View view = findViewById(R.id.menu_sample_action);
new MaterialShowcaseView.Builder(this)
.setTarget(view)
.setShapePadding(96)
.setDismissText("GOT IT")
.setContentText("Example of how to setup a MaterialShowcaseView for menu items in action bar.")
.setContentTextColor(getResources().getColor(R.color.green))
.setMaskColour(getResources().getColor(R.color.purple))
.show();
}
return super.onOptionsItemSelected(item);
}
开发者ID:deano2390,项目名称:MaterialShowcaseView,代码行数:18,代码来源:CustomExample.java
示例3: showTutorial
import uk.co.deanwild.materialshowcaseview.MaterialShowcaseView; //导入依赖的package包/类
private void showTutorial() {
if (recyclerView != null && recyclerView.getChildCount() > 0) {
new MaterialShowcaseView.Builder(getActivity())
.setTarget(recyclerView.getChildAt(0))
.singleUse("tab2delete")
.withRectangleShape()
.setContentText("Long press on a show to delete it.")
.setDismissText("GOT IT")
.setShapePadding(0)
.setMaskColour(ContextCompat.getColor(getActivity(), R.color.tutorialBackground))
.setDismissTextColor(ContextCompat.getColor(getActivity(), R.color.tutorialDismiss))
.show();
}
}
开发者ID:chashmeetsingh,项目名称:TrackIt-Android,代码行数:15,代码来源:Tab2.java
示例4: showTutorial
import uk.co.deanwild.materialshowcaseview.MaterialShowcaseView; //导入依赖的package包/类
private void showTutorial() {
if (recyclerView != null && recyclerView.getChildCount() > 0) {
ShowcaseConfig config = new ShowcaseConfig();
config.setDelay(100);
MaterialShowcaseSequence sequence = new MaterialShowcaseSequence(getActivity());
sequence.setConfig(config);
sequence.addSequenceItem(new MaterialShowcaseView.Builder(getActivity())
.setTarget(recyclerView.getChildAt(0))
.singleUse("tab1")
.withRectangleShape()
.setContentText("Tap on the right side to set the episode as watched.")
.setDismissText("NEXT")
.setMaskColour(ContextCompat.getColor(getActivity(), R.color.tutorialBackground))
.setDismissTextColor(ContextCompat.getColor(getActivity(), R.color.tutorialDismiss))
.build());
sequence.addSequenceItem(new MaterialShowcaseView.Builder(getActivity())
.setTarget(recyclerView.getChildAt(0).findViewById(R.id.watched_indicator))
.singleUse("tab1indicator")
.setContentText("This indicates whether an episode is watched or not.")
.setDismissText("GOT IT")
.setShapePadding(15)
.setMaskColour(ContextCompat.getColor(getActivity(), R.color.tutorialBackground))
.setDismissTextColor(ContextCompat.getColor(getActivity(), R.color.tutorialDismiss))
.build());
sequence.start();
}
}
开发者ID:chashmeetsingh,项目名称:TrackIt-Android,代码行数:28,代码来源:Tab1.java
示例5: showTutorial
import uk.co.deanwild.materialshowcaseview.MaterialShowcaseView; //导入依赖的package包/类
private void showTutorial() {
new MaterialShowcaseView.Builder(this)
.setTarget(mSlidingUpPanel)
.singleUse("slideuppanel")
.setDismissText("GOT IT")
.setDelay(800)
.setShapePadding(0)
.setMaskColour(ContextCompat.getColor(this, R.color.tutorialBackground))
.setDismissTextColor(ContextCompat.getColor(this, R.color.tutorialDismiss))
.withRectangleShape()
.setContentText("Swipe up or tap the bottom bar to view more information.")
.show();
}
开发者ID:chashmeetsingh,项目名称:TrackIt-Android,代码行数:14,代码来源:AddShowActivity.java
示例6: handleShowCase
import uk.co.deanwild.materialshowcaseview.MaterialShowcaseView; //导入依赖的package包/类
private void handleShowCase(){
if(ac.getSharedPreferences("material_showcaseview_prefs", 0).getInt("status_BACKUP_WALLET", SEQUENCE_NEVER_STARTED) != PrefsManager.SEQUENCE_FINISHED
&& ac.getSharedPreferences("material_showcaseview_prefs", 0).getInt("status_GENERATE_WALLET", SEQUENCE_NEVER_STARTED) == PrefsManager.SEQUENCE_FINISHED
&& recyclerView != null && recyclerView.getChildCount() > 0) {
ac.setSelectedPage(1);
new MaterialShowcaseView.Builder(ac)
.setTarget(recyclerView.getChildAt(0))
.setDismissText(getString(R.string.showcase_got_it))
.setContentText(getString(R.string.show_case_backup))
.setDelay(150)
.setDismissOnTargetTouch(true)
.setDismissOnTouch(true)
.setShape(new RectangleShape(new Rect(), true))
.singleUse("BACKUP_WALLET")
.show();
}
if(ac.getSharedPreferences("material_showcaseview_prefs", 0).getInt("status_GENERATE_WALLET", SEQUENCE_NEVER_STARTED) != PrefsManager.SEQUENCE_FINISHED) {
ac.setSelectedPage(1);
fabmenu.open(true);
new MaterialShowcaseView.Builder(ac)
.setTarget(gen_fab)
.setDismissText(getString(R.string.showcase_got_it))
.setContentText(getString(R.string.show_case_wallet_gen_text))
.setDelay(150)
.setDismissOnTargetTouch(true)
.setDismissOnTouch(true)
.singleUse("GENERATE_WALLET")
.show();
}
}
开发者ID:manuelsc,项目名称:Lunary-Ethereum-Wallet,代码行数:32,代码来源:FragmentWalletsAbstract.java
示例7: showCardViewIntro
import uk.co.deanwild.materialshowcaseview.MaterialShowcaseView; //导入依赖的package包/类
private void showCardViewIntro(View view) {
new MaterialShowcaseView.Builder(this)
.setDismissText(getResources().getString(R.string.gotit))
.setDelay(1000) // optional but starting animations immediately in onCreate can make them choppy
.setContentText(getResources().getString(R.string.introview))
.setTarget(fab)
.singleUse("intro_fab_button")
.show();
}
开发者ID:JonathanImperato,项目名称:Service-Notes,代码行数:10,代码来源:MainActivity.java
示例8: createShowcaseForNearbySettings
import uk.co.deanwild.materialshowcaseview.MaterialShowcaseView; //导入依赖的package包/类
private void createShowcaseForNearbySettings(){
if(((MainActivity)mContext).getTabPosition() == 0)
new MaterialShowcaseView.Builder(getActivity())
.setTarget(mNearbySettings)
.setDismissText(getString(R.string.got_it))
.setContentText(getString(R.string.nearby_Settings_showcase))
.setDelay(1000)
.singleUse(NEARBY_SETTINGS_HELP)
.show();
}
开发者ID:NordicSemiconductor,项目名称:Android-nRF-Beacon-for-Eddystone,代码行数:11,代码来源:BeaconsFragment.java
示例9: buildShowcaseView
import uk.co.deanwild.materialshowcaseview.MaterialShowcaseView; //导入依赖的package包/类
/**
* Helper function to build a custom ShowcaseView for a sequence.
*
* @param target: the target view that will be highlighted.
* @param shape: the type of shape.
* @param contentText: the text to be displayed.
*/
private MaterialShowcaseView buildShowcaseView(View target, uk.co.deanwild.materialshowcaseview.shape.Shape shape, String contentText) {
return new MaterialShowcaseView.Builder(getActivity())
.setTarget(target)
.setShape(shape)
.setMaskColour(Color.parseColor("#1A6C9D"))
.setContentText(contentText)
.setDismissText("GOT IT")
.build();
}
开发者ID:christarazi,项目名称:random-restaurant-generator,代码行数:17,代码来源:MainActivityFragment.java
示例10: showTutorial
import uk.co.deanwild.materialshowcaseview.MaterialShowcaseView; //导入依赖的package包/类
private void showTutorial() {
new MaterialShowcaseView.Builder(getActivity())
.setTarget(fab)
.setUseAutoRadius(false)
.setRadius(64 * 3)
.setDismissOnTouch(true)
.setDismissText(getString(R.string.tutorial__got_it))
.setContentText(getString(R.string.tutorial__backup_explanation))
.singleUse(TutorialConstants.BACKUP_KEY)
.setDelay(500)
.show();
}
开发者ID:Power-Switch,项目名称:PowerSwitch_Android,代码行数:13,代码来源:BackupFragment.java
示例11: showTutorial
import uk.co.deanwild.materialshowcaseview.MaterialShowcaseView; //导入依赖的package包/类
private void showTutorial() {
new MaterialShowcaseView.Builder(getActivity())
.setTarget(addTimerFAB)
.setUseAutoRadius(true)
.setDismissOnTouch(true)
.setDismissText(getString(R.string.tutorial__got_it))
.setContentText(getString(R.string.tutorial__timer_explanation))
.singleUse(TutorialConstants.TIMERS_KEY)
.setDelay(500)
.show();
}
开发者ID:Power-Switch,项目名称:PowerSwitch_Android,代码行数:12,代码来源:TimersFragment.java
示例12: showTutorial
import uk.co.deanwild.materialshowcaseview.MaterialShowcaseView; //导入依赖的package包/类
private void showTutorial(int tabIndex) {
ArrayList<View> views = new ArrayList<>();
tabLayout.findViewsWithText(views, customTabAdapter.getPageTitle(tabIndex), View.FIND_VIEWS_WITH_TEXT);
View dummyView;
if (views.size() > 0) {
dummyView = views.get(0);
} else {
dummyView = new View(getContext());
}
String showcaseKey = TutorialHelper.getMainTabKey(customTabAdapter.getPageTitle(tabIndex).toString());
String contentText;
switch (tabIndex) {
case GeofenceConstants.APARTMENTS_TAB_INDEX:
contentText = getString(R.string.tutorial__geofences_apartment_explanation);
break;
case GeofenceConstants.CUSTOM_TAB_INDEX:
contentText = getString(R.string.tutorial__geofences_custom_explanation);
break;
default:
return;
}
new MaterialShowcaseView.Builder(getActivity())
.setTarget(dummyView)
.setUseAutoRadius(false)
.setRadius(64 * 3)
.setDismissOnTouch(true)
.setDismissText(getString(R.string.tutorial__got_it))
.setContentText(contentText)
.singleUse(showcaseKey)
.setDelay(500)
.show();
}
开发者ID:Power-Switch,项目名称:PowerSwitch_Android,代码行数:38,代码来源:GeofencesTabFragment.java
示例13: showTutorial
import uk.co.deanwild.materialshowcaseview.MaterialShowcaseView; //导入依赖的package包/类
private void showTutorial(int tabIndex) {
ArrayList<View> views = new ArrayList<>();
tabLayout.findViewsWithText(views, customTabAdapter.getPageTitle(tabIndex), View.FIND_VIEWS_WITH_TEXT);
View dummyView;
if (views.size() > 0) {
dummyView = views.get(0);
} else {
dummyView = new View(getContext());
}
String showcaseKey = TutorialHelper.getMainTabKey(customTabAdapter.getPageTitle(tabIndex).toString());
String contentText;
switch (tabIndex) {
case SettingsConstants.ROOMS_TAB_INDEX:
contentText = getString(R.string.tutorial__room_explanation);
break;
case SettingsConstants.SCENES_TAB_INDEX:
contentText = getString(R.string.tutorial__scene_explanation);
break;
default:
return;
}
new MaterialShowcaseView.Builder(getActivity())
.setTarget(dummyView)
.setUseAutoRadius(false)
.setRadius(64 * 3)
.setDismissOnTouch(true)
.setDismissText(getString(R.string.tutorial__got_it))
.setContentText(contentText)
.singleUse(showcaseKey)
.setDelay(500)
.show();
}
开发者ID:Power-Switch,项目名称:PowerSwitch_Android,代码行数:37,代码来源:RoomSceneTabFragment.java
示例14: showTutorial
import uk.co.deanwild.materialshowcaseview.MaterialShowcaseView; //导入依赖的package包/类
private void showTutorial() {
new MaterialShowcaseView.Builder(getActivity())
.setTarget(buttonWriteTag)
.setUseAutoRadius(false)
.setRadius(64 * 3)
.setDismissOnTouch(true)
.setDismissText(getString(R.string.tutorial__got_it))
.setContentText(getString(R.string.tutorial__nfc_explanation))
.singleUse(TutorialConstants.NFC_KEY)
.setDelay(500)
.show();
}
开发者ID:Power-Switch,项目名称:PowerSwitch_Android,代码行数:13,代码来源:NfcFragment.java
示例15: showTutorial
import uk.co.deanwild.materialshowcaseview.MaterialShowcaseView; //导入依赖的package包/类
private void showTutorial(int tabIndex) {
ArrayList<View> views = new ArrayList<>();
tabLayout.findViewsWithText(views, customTabAdapter.getPageTitle(tabIndex), View.FIND_VIEWS_WITH_TEXT);
View dummyView;
if (views.size() > 0) {
dummyView = views.get(0);
} else {
dummyView = new View(getContext());
}
String showcaseKey = TutorialHelper.getAlarmClockTabKey(customTabAdapter.getPageTitle(tabIndex).toString());
String contentText;
switch (tabIndex) {
case AlarmClockConstants.STOCK_TAB_INDEX:
contentText = getString(R.string.tutorial__stock_alarm_clock_explanation);
break;
case AlarmClockConstants.SAA_TAB_INDEX:
contentText = getString(R.string.tutorial__sleep_as_android_explanation);
break;
default:
return;
}
new MaterialShowcaseView.Builder(getActivity())
.setTarget(dummyView)
.setUseAutoRadius(false)
.setRadius(64 * 3)
.setDismissOnTouch(true)
.setDismissText(getString(R.string.tutorial__got_it))
.setContentText(contentText)
.singleUse(showcaseKey)
.setDelay(500)
.show();
}
开发者ID:Power-Switch,项目名称:PowerSwitch_Android,代码行数:37,代码来源:AlarmClockTabFragment.java
示例16: showTutorial
import uk.co.deanwild.materialshowcaseview.MaterialShowcaseView; //导入依赖的package包/类
private void showTutorial() {
new MaterialShowcaseView.Builder(getActivity())
.setTarget(fab)
.setUseAutoRadius(false)
.setRadius(64 * 3)
.setDismissOnTouch(true)
.setDismissText(getString(R.string.tutorial__got_it))
.setContentText(getString(R.string.tutorial__apartment_explanation))
.singleUse(TutorialConstants.APARTMENT_KEY)
.setDelay(500)
.show();
}
开发者ID:Power-Switch,项目名称:PowerSwitch_Android,代码行数:13,代码来源:ApartmentFragment.java
示例17: showTutorial
import uk.co.deanwild.materialshowcaseview.MaterialShowcaseView; //导入依赖的package包/类
private void showTutorial(int tabIndex) {
ArrayList<View> views = new ArrayList<>();
tabLayout.findViewsWithText(views, customTabAdapter.getPageTitle(tabIndex), View.FIND_VIEWS_WITH_TEXT);
View dummyView;
if (views.size() > 0) {
dummyView = views.get(0);
} else {
dummyView = new View(getContext());
}
String showcaseKey = TutorialHelper.getPhoneTabKey(customTabAdapter.getPageTitle(tabIndex).toString());
String contentText;
switch (tabIndex) {
case PhoneConstants.CALL_TAB_INDEX:
contentText = getString(R.string.tutorial__phone_call_explanation);
break;
case PhoneConstants.SMS_TAB_INDEX:
contentText = getString(R.string.tutorial__phone_sms_explanation);
break;
default:
return;
}
new MaterialShowcaseView.Builder(getActivity())
.setTarget(dummyView)
.setUseAutoRadius(false)
.setRadius(64 * 3)
.setDismissOnTouch(true)
.setDismissText(getString(R.string.tutorial__got_it))
.setContentText(contentText)
.singleUse(showcaseKey)
.setDelay(500)
.show();
}
开发者ID:Power-Switch,项目名称:PowerSwitch_Android,代码行数:38,代码来源:PhoneTabFragment.java
示例18: presentShowcaseSequence
import uk.co.deanwild.materialshowcaseview.MaterialShowcaseView; //导入依赖的package包/类
private void presentShowcaseSequence() {
ShowcaseConfig config = new ShowcaseConfig();
config.setDelay(500); // half second between each showcase view
MaterialShowcaseSequence sequence = new MaterialShowcaseSequence(this, SHOWCASE_ID);
sequence.setOnItemShownListener(new MaterialShowcaseSequence.OnSequenceItemShownListener() {
@Override
public void onShow(MaterialShowcaseView itemView, int position) {
Toast.makeText(itemView.getContext(), "Item #" + position, Toast.LENGTH_SHORT).show();
}
});
sequence.setConfig(config);
sequence.addSequenceItem(mButtonOne, "This is button one", "GOT IT");
sequence.addSequenceItem(
new MaterialShowcaseView.Builder(this)
.setTarget(mButtonTwo)
.setDismissText("GOT IT")
.setContentText("This is button two")
.withRectangleShape(true)
.build()
);
sequence.addSequenceItem(
new MaterialShowcaseView.Builder(this)
.setTarget(mButtonThree)
.setDismissText("GOT IT")
.setContentText("This is button three")
.withRectangleShape()
.build()
);
sequence.start();
}
开发者ID:deano2390,项目名称:MaterialShowcaseView,代码行数:40,代码来源:SequenceExample.java
示例19: presentShowcaseView
import uk.co.deanwild.materialshowcaseview.MaterialShowcaseView; //导入依赖的package包/类
private void presentShowcaseView(int withDelay) {
new MaterialShowcaseView.Builder(this)
.setTarget(mButtonShow)
.setTitleText("Hello")
.setDismissText("GOT IT")
.setContentText("This is some amazing feature you should know about")
.setDelay(withDelay) // optional but starting animations immediately in onCreate can make them choppy
.singleUse(SHOWCASE_ID) // provide a unique ID used to ensure it is only shown once
// .useFadeAnimation() // remove comment if you want to use fade animations for Lollipop & up
.show();
}
开发者ID:deano2390,项目名称:MaterialShowcaseView,代码行数:12,代码来源:SimpleSingleExample.java
示例20: presentShowcaseView
import uk.co.deanwild.materialshowcaseview.MaterialShowcaseView; //导入依赖的package包/类
private void presentShowcaseView(int withDelay) {
new MaterialShowcaseView.Builder(this)
.setTarget(mButtonShow)
.setContentText("This is some amazing feature you should know about")
.setDismissOnTouch(true)
.setContentTextColor(getResources().getColor(R.color.green))
.setMaskColour(getResources().getColor(R.color.purple))
.setDelay(withDelay) // optional but starting animations immediately in onCreate can make them choppy
.singleUse(SHOWCASE_ID) // provide a unique ID used to ensure it is only shown once
.show();
}
开发者ID:deano2390,项目名称:MaterialShowcaseView,代码行数:12,代码来源:CustomExample.java
注:本文中的uk.co.deanwild.materialshowcaseview.MaterialShowcaseView类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论