本文整理汇总了Java中com.github.amlcurran.showcaseview.targets.Target类的典型用法代码示例。如果您正苦于以下问题:Java Target类的具体用法?Java Target怎么用?Java Target使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Target类属于com.github.amlcurran.showcaseview.targets包,在下文中一共展示了Target类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setShowcase
import com.github.amlcurran.showcaseview.targets.Target; //导入依赖的package包/类
public void setShowcase(final Target target, final boolean animate) {
postDelayed(new Runnable() {
@Override
public void run() {
if (!shotStateStore.hasShot()) {
updateBitmap();
Point targetPoint = target.getPoint();
if (targetPoint != null) {
hasNoTarget = false;
if (animate) {
animationFactory.animateTargetToPoint(ShowcaseView.this, targetPoint);
} else {
setShowcasePosition(targetPoint);
}
} else {
hasNoTarget = true;
invalidate();
}
}
}
}, 100);
}
示例2: build
import com.github.amlcurran.showcaseview.targets.Target; //导入依赖的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);
}
示例3: initializingShowCaseView
import com.github.amlcurran.showcaseview.targets.Target; //导入依赖的package包/类
private void initializingShowCaseView(){
showcaseView = new ShowcaseView.Builder(this)
.setTarget(Target.NONE)
.setOnClickListener(this)
.setContentTitle(getString(R.string.tutorialOption))
.setContentText(R.string.initialMessageTutorial)
.setStyle(R.style.Transparency)
.build();
showcaseView.setButtonText(getString(R.string.next));
}
示例4: addShowcase
import com.github.amlcurran.showcaseview.targets.Target; //导入依赖的package包/类
protected void addShowcase(Target target, int titleId, int textId) {
if (target == null) {
Log.i(tag(), "addShowcase: NULL target!");
return;
}
ShowcaseStep step = new ShowcaseStep();
step.target = target;
step.title = titleId;
step.text = textId;
showcaseSteps.add(step);
}
示例5: createViewTarget
import com.github.amlcurran.showcaseview.targets.Target; //导入依赖的package包/类
public static ShowcaseHelpPageModel.TargetWrapper createViewTarget(final Activity activity, final int viewId) {
return new ShowcaseHelpPageModel.TargetWrapper() {
@Override
public Target getTarget() {
return new ViewTarget(activity.findViewById(viewId));
}
};
}
示例6: createActionViewTarget
import com.github.amlcurran.showcaseview.targets.Target; //导入依赖的package包/类
public static ShowcaseHelpPageModel.TargetWrapper createActionViewTarget(final Activity activity, final ActionViewTarget.Type actionViewTargetType) {
return new ShowcaseHelpPageModel.TargetWrapper() {
@Override
public Target getTarget() {
return new ActionViewTarget(activity, actionViewTargetType);
}
};
}
示例7: ShowcaseHolder
import com.github.amlcurran.showcaseview.targets.Target; //导入依赖的package包/类
public ShowcaseHolder(Target target, String text, int btnPosition) {
this.target = target;
this.text = text;
this.btnPosition = btnPosition;
}
示例8: getTarget
import com.github.amlcurran.showcaseview.targets.Target; //导入依赖的package包/类
public Target getTarget() {
return target;
}
示例9: moveShowCaseCircle
import com.github.amlcurran.showcaseview.targets.Target; //导入依赖的package包/类
private void moveShowCaseCircle(Target currentTarget,String title,String text, int position){
showcaseView.forceTextPosition(position);
showcaseView.setShowcase(currentTarget,true);
showcaseView.setContentTitle(title);
showcaseView.setContentText(text);
}
示例10: setupShowcaseView
import com.github.amlcurran.showcaseview.targets.Target; //导入依赖的package包/类
private void setupShowcaseView() {
if (showcaseView == null) return;
if (showcaseView.getShowcaseTag() != SHOWCASE_ID_ONBOARDING) return;
switch(showcaseCounter) {
case 0:
showcaseView.setShowcase(Target.NONE, true);
showcaseView.setContentTitle(mContext.getString(R.string.welcome_screen_title1));
showcaseView.setContentText(mContext.getString(R.string.welcome_screen_text1));
showcaseView.setBlockAllTouches(true);
showcaseView.showButton();
break;
case 1:
showcaseView.setShowcase(new ViewTarget(menuIcon), true);
showcaseView.setContentTitle(mContext.getString(R.string.welcome_screen_title2));
showcaseView.setContentText(mContext.getString(R.string.welcome_screen_text2));
showcaseView.setBlockAllTouches(false);
showcaseView.setBlocksTouches(true);
showcaseView.showButton();
break;
case 2:
Point size = utility.getDisplaySize();
showcaseView.setShowcase(new PointTarget(size.x/2, 20), true);
showcaseView.setBlockAllTouches(false);
showcaseView.setContentTitle(mContext.getString(R.string.welcome_screen_title3));
showcaseView.setContentText(mContext.getString(R.string.welcome_screen_text3));
showcaseView.showButton();
break;
case 3:
setAlpha(clockLayout, 1.f, 500);
showcaseView.setShowcase(new ViewTarget(clockLayout), true);
showcaseView.setContentTitle(mContext.getString(R.string.welcome_screen_title4));
showcaseView.setContentText(mContext.getString(R.string.welcome_screen_text4));
showcaseView.setBlockAllTouches(false);
showcaseView.setBlocksTouches(true);
//showcaseView.setBlockAllTouches(true);
showcaseView.showButton();
break;
default:
showcaseView.hide();
break;
}
}
示例11: setTarget
import com.github.amlcurran.showcaseview.targets.Target; //导入依赖的package包/类
public void setTarget(final Target target) {
setShowcase(target, false);
}
示例12: Builder
import com.github.amlcurran.showcaseview.targets.Target; //导入依赖的package包/类
public Builder(Activity activity, boolean useNewStyle) {
this.activity = activity;
this.showcaseView = new ShowcaseView(activity, useNewStyle);
this.showcaseView.setTarget(Target.NONE);
}
示例13: setContentTextForView
import com.github.amlcurran.showcaseview.targets.Target; //导入依赖的package包/类
@Override
public void setContentTextForView(String contentText, Target view) {
showcaseView.setContentText(contentText);
showcaseView.setTarget(view);
}
示例14: setContentTextForView
import com.github.amlcurran.showcaseview.targets.Target; //导入依赖的package包/类
@Override
public void setContentTextForView(String contentTitle, Target viewTarget) {
viewsTargeted.add(viewTarget);
contentTitles.add(contentTitle);
}
示例15: createToolbarTarget
import com.github.amlcurran.showcaseview.targets.Target; //导入依赖的package包/类
@Override
public Target createToolbarTarget(android.support.v7.widget.Toolbar toolbar, int targetId) {
return new FakeToolbarTarget(toolbar, targetId);
}