本文整理了Java中com.github.amlcurran.showcaseview.targets.ViewTarget
类的一些代码示例,展示了ViewTarget
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ViewTarget
类的具体详情如下:
包路径:com.github.amlcurran.showcaseview.targets.ViewTarget
类名称:ViewTarget
暂无
代码示例来源:origin: k9mail/k-9
protected void highlightViewInBackground() {
if (!getArguments().containsKey(ARG_HIGHLIGHT_VIEW)) {
return;
}
Activity activity = getActivity();
if (activity == null) {
throw new IllegalStateException("fragment must be attached to set highlight!");
}
boolean alreadyShowing = showcaseView != null && showcaseView.isShowing();
if (alreadyShowing) {
return;
}
int highlightedView = getArguments().getInt(ARG_HIGHLIGHT_VIEW);
showcaseView = new Builder(activity)
.setTarget(new ViewTarget(highlightedView, activity))
.hideOnTouchOutside()
.blockAllTouches()
.withMaterialShowcase()
.setStyle(R.style.ShowcaseTheme)
.build();
showcaseView.hideButton();
}
代码示例来源:origin: NightscoutFoundation/xDrip
@Override
public Point getPoint() {
return new ViewTarget(toolbar.findViewById(menuItemId)).getPoint();
}
代码示例来源:origin: jamorham/xDrip-plus
@Override
public Point getPoint() {
return new ViewTarget(toolbar.findViewById(menuItemId)).getPoint();
}
代码示例来源:origin: seven332/EhViewer
.withMaterialShowcase()
.setStyle(R.style.Guide)
.setTarget(new ViewTarget(((DownloadHolder) holder).thumb))
.blockAllTouches()
.setContentTitle(R.string.guide_download_thumb_title)
代码示例来源:origin: DaxiaK/MyDiary
case 1:
sv.setButtonPosition(leftParams);
sv.setShowcase(new ViewTarget(EDT_main_topic_search), true);
sv.setContentTitle(getString(R.string.oobe_main_search_title));
sv.setContentText(getString(R.string.oobe_main_search_content));
case 2:
sv.setButtonPosition(centerParams);
sv.setShowcase(new ViewTarget(IV_main_setting), true);
sv.setContentTitle(getString(R.string.oobe_main_adv_setting_title));
sv.setContentText(getString(R.string.oobe_main_adv_setting_content));
Target viewTarget = new ViewTarget(IV_main_profile_picture);
sv = new ShowcaseView.Builder(this)
.withMaterialShowcase()
代码示例来源:origin: GrapeCity/DebugRank
@Override
public void showTutorial()
{
//presenter will tell view that tutorial must be shown
showShowcase(new ViewTarget(R.id.fab, this), R.string.showcase_step1_title, R.string.showcase_step1_desc);
}
代码示例来源:origin: DaxiaK/MyDiary
case 1:
sv.setButtonPosition(leftParams);
sv.setShowcase(new ViewTarget(EDT_main_topic_search), true);
sv.setContentTitle(getString(R.string.oobe_main_search_title));
sv.setContentText(getString(R.string.oobe_main_search_content));
case 2:
sv.setButtonPosition(centerParams);
sv.setShowcase(new ViewTarget(IV_main_setting), true);
sv.setContentTitle(getString(R.string.oobe_main_adv_setting_title));
sv.setContentText(getString(R.string.oobe_main_adv_setting_content));
代码示例来源:origin: GrapeCity/DebugRank
private void showcaseStep2()
{
if(compileShowcaseView != null)
{
final View compileTab = ((ViewGroup) tabLayout.getChildAt(0)).getChildAt(1);
compileTab.setOnClickListener(new View.OnClickListener()
{
@Override
public void onClick(View v)
{
compileTab.setOnClickListener(null);
showcaseStep2Clicked();
}
});
showShowcase(new ViewTarget(compileTab), R.string.showcase_step2_title, R.string.showcase_step2_desc);
}
}
代码示例来源:origin: GrapeCity/DebugRank
private void showcaseStep3()
{
final View codeTab = ((ViewGroup) tabLayout.getChildAt(0)).getChildAt(0);
codeTab.setOnClickListener(new View.OnClickListener()
{
@Override
public void onClick(View v)
{
codeTab.setOnClickListener(null);
hideShowcase();
compileShowcaseView = null;
}
});
showShowcase(new ViewTarget(codeTab), R.string.showcase_step3_title, R.string.showcase_step3_desc);
}
代码示例来源:origin: NightscoutFoundation/xDrip
private void startupInfo() {
final boolean oneshot = true;
final int option = Home.SHOWCASE_MEGASTATUS;
if ((oneshot) && (ShotStateStore.hasShot(option))) return;
// This could do with being in a utility static method also used in Home
final int size1 = 300;
final int size2 = 130;
final String title = "Swipe for Different Pages";
final String message = "Swipe left and right to see different status tabs.\n\n";
final ViewTarget target = new ViewTarget(R.id.pager_title_strip, this);
final Activity activity = this;
JoH.runOnUiThreadDelayed(new Runnable() {
@Override
public void run() {
final ShowcaseView myShowcase = new ShowcaseView.Builder(activity)
.setTarget(target)
.setStyle(R.style.CustomShowcaseTheme2)
.setContentTitle(title)
.setContentText("\n" + message)
.setShowcaseDrawer(new JamorhamShowcaseDrawer(getResources(), getTheme(), size1, size2, 255))
.singleShot(oneshot ? option : -1)
.build();
myShowcase.setBackgroundColor(Color.TRANSPARENT);
myShowcase.show();
}
}
, 1500);
}
代码示例来源:origin: jamorham/xDrip-plus
private void startupInfo() {
final boolean oneshot = true;
final int option = Home.SHOWCASE_MEGASTATUS;
if ((oneshot) && (ShotStateStore.hasShot(option))) return;
// This could do with being in a utility static method also used in Home
final int size1 = 300;
final int size2 = 130;
final String title = "Swipe for Different Pages";
final String message = "Swipe left and right to see different status tabs.\n\n";
final ViewTarget target = new ViewTarget(R.id.pager_title_strip, this);
final Activity activity = this;
JoH.runOnUiThreadDelayed(new Runnable() {
@Override
public void run() {
final ShowcaseView myShowcase = new ShowcaseView.Builder(activity)
.setTarget(target)
.setStyle(R.style.CustomShowcaseTheme2)
.setContentTitle(title)
.setContentText("\n" + message)
.setShowcaseDrawer(new JamorhamShowcaseDrawer(getResources(), getTheme(), size1, size2, 255))
.singleShot(oneshot ? option : -1)
.build();
myShowcase.setBackgroundColor(Color.TRANSPARENT);
myShowcase.show();
}
}
, 1500);
}
代码示例来源:origin: NightscoutFoundation/xDrip
final String title = "Swipe for Different Reports";
final String message = "Swipe left and right to see different report tabs.\n\nChoose time period for Today, Yesterday, 7 Days etc.\n\nFull screen mode, print colors and Sharing are supported from the butttons and 3 dot menu.";
final ViewTarget target = new ViewTarget(R.id.button_stats_7d, this);
final Activity activity = this;
代码示例来源:origin: jamorham/xDrip-plus
final String title = "Swipe for Different Reports";
final String message = "Swipe left and right to see different report tabs.\n\nChoose time period for Today, Yesterday, 7 Days etc.\n\nFull screen mode, print colors and Sharing are supported from the butttons and 3 dot menu.";
final ViewTarget target = new ViewTarget(R.id.button_stats_7d, this);
final Activity activity = this;
代码示例来源:origin: NightscoutFoundation/xDrip
target = new ViewTarget(R.id.fab, activity);
title = xdrip.getAppContext().getString(R.string.title_You_have_no_reminders_yet);
message = xdrip.getAppContext().getString(R.string.message_reminders_explanation);
target = new ViewTarget(R.id.imageButton5, activity);
title = xdrip.getAppContext().getString(R.string.title_reminder_snooze_undo);
message = xdrip.getAppContext().getString(R.string.message_snooze_explanaition_undo);
target = new ViewTarget(R.id.reminderTrashButton, activity);
title = xdrip.getAppContext().getString(R.string.title_snooze_trash);
message = xdrip.getAppContext().getString(R.string.message_snooze_trash);
target = new ViewTarget(R.id.imageButton7, activity);
title = xdrip.getAppContext().getString(R.string.title_snooze_hide);
message = xdrip.getAppContext().getString(R.string.message_snooze_hide);
target = new ViewTarget(R.id.button5, activity);
title = xdrip.getAppContext().getString(R.string.title_snooze_times);
message = xdrip.getAppContext().getString(R.string.message_snooze_times);
代码示例来源:origin: jamorham/xDrip-plus
target = new ViewTarget(R.id.fab, activity);
title = xdrip.getAppContext().getString(R.string.title_You_have_no_reminders_yet);
message = xdrip.getAppContext().getString(R.string.message_reminders_explanation);
target = new ViewTarget(R.id.imageButton5, activity);
title = xdrip.getAppContext().getString(R.string.title_reminder_snooze_undo);
message = xdrip.getAppContext().getString(R.string.message_snooze_explanaition_undo);
target = new ViewTarget(R.id.reminderTrashButton, activity);
title = xdrip.getAppContext().getString(R.string.title_snooze_trash);
message = xdrip.getAppContext().getString(R.string.message_snooze_trash);
target = new ViewTarget(R.id.imageButton7, activity);
title = xdrip.getAppContext().getString(R.string.title_snooze_hide);
message = xdrip.getAppContext().getString(R.string.message_snooze_hide);
target = new ViewTarget(R.id.button5, activity);
title = xdrip.getAppContext().getString(R.string.title_snooze_times);
message = xdrip.getAppContext().getString(R.string.message_snooze_times);
代码示例来源:origin: brainysoon/cyberCar
private void showcaseView() {
RelativeLayout.LayoutParams lps = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
lps.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
lps.addRule(RelativeLayout.ALIGN_PARENT_LEFT);
int margin = ((Number) (getResources().getDisplayMetrics().density * 12)).intValue();
lps.setMargins(margin, margin, margin, margin);
ViewTarget target = new ViewTarget(R.id.activity_main_boommenubutton_menu, this);
ShowcaseView sv = new ShowcaseView.Builder(this)
.withMaterialShowcase()
.setTarget(target)
.setContentTitle("主菜单")
.setContentText("点击这个,然后可以看到主菜单.")
.setStyle(R.style.CustomShowcaseTheme2)
.setShowcaseEventListener(this)
// .replaceEndButton(R.layout.view_custom_button)
.build();
sv.setButtonPosition(lps);
}
代码示例来源:origin: NightscoutFoundation/xDrip
final String title = "Tap to add or remove";
final String message = "Devices discovered on the local network can be added or removed as collectors by tapping on them.";
final ViewTarget target = new ViewTarget(MegaStatus.runnableView);
final Activity activity = (Activity) context;
代码示例来源:origin: jamorham/xDrip-plus
final String title = "Tap to add or remove";
final String message = "Devices discovered on the local network can be added or removed as collectors by tapping on them.";
final ViewTarget target = new ViewTarget(MegaStatus.runnableView);
final Activity activity = (Activity) context;
代码示例来源:origin: NightscoutFoundation/xDrip
target = new ViewTarget(R.id.btnNote, this); // dummy
size1 = 0;
size2 = 0;
target = new ViewTarget(R.id.btnNote, this); // dummy
size1 = 0;
size2 = 0;
target = new ViewTarget(R.id.btnNote, this);
title = getString(R.string.note_button);
message = getString(R.string.showcase_note_long);
break;
case SHOWCASE_REDO:
target = new ViewTarget(R.id.btnRedo, this);
title = getString(R.string.redo_button);
message = getString(R.string.showcase_redo);
break;
case SHOWCASE_UNDO:
target = new ViewTarget(R.id.btnUndo, this);
title = getString(R.string.undo_button);
message = getString(R.string.showcase_undo);
break;
case 3:
target = new ViewTarget(R.id.btnTreatment, this);
break;
target = new ViewTarget(view);
break;
代码示例来源:origin: jamorham/xDrip-plus
target = new ViewTarget(R.id.btnNote, this); // dummy
size1 = 0;
size2 = 0;
target = new ViewTarget(R.id.btnNote, this); // dummy
size1 = 0;
size2 = 0;
target = new ViewTarget(R.id.btnNote, this);
title = getString(R.string.note_button);
message = getString(R.string.showcase_note_long);
break;
case SHOWCASE_REDO:
target = new ViewTarget(R.id.btnRedo, this);
title = getString(R.string.redo_button);
message = getString(R.string.showcase_redo);
break;
case SHOWCASE_UNDO:
target = new ViewTarget(R.id.btnUndo, this);
title = getString(R.string.undo_button);
message = getString(R.string.showcase_undo);
break;
case 3:
target = new ViewTarget(R.id.btnTreatment, this);
break;
target = new ViewTarget(view);
break;
内容来源于网络,如有侵权,请联系作者删除!