Android 如何多次运行ShowCase并将文本居中
嗨,我需要展示这里提供的展示: 我必须补充:Android 如何多次运行ShowCase并将文本居中,android,Android,嗨,我需要展示这里提供的展示: 我必须补充: new ShowcaseView.Builder(main) .setTarget(new TargetView(R.id.spinner, main)) .setContentTitle("ShowcaseView") .setContentText("This is highlighting the Home button") .hideOnTouchOutside() .build(); 我所做的是在构
new ShowcaseView.Builder(main)
.setTarget(new TargetView(R.id.spinner, main))
.setContentTitle("ShowcaseView")
.setContentText("This is highlighting the Home button")
.hideOnTouchOutside()
.build();
我所做的是在构建之后添加.setShowCaseViewListener,在onviewhide中,我添加了另一个,然后继续(非常嵌套)
如何对齐文本?我试着改变它的风格,但没有任何效果
<style name="CustomTitle2" parent="TextAppearance.ShowcaseView.Title">
<item name="android:layout_centerHorizontal">true</item>
<item name="android:textColor">#fa220909</item>
</style>
真的
#fa220909
要隐藏上一个Showcase视图,请尝试以下操作:
@Override
public void onShowcaseViewHide(ShowcaseView showcaseView) {
showcaseView.hide();
new ShowcaseView.Builder(main)...
}
我无法更改您的textAlign,但找到答案后我会告诉您
为了执行几个步骤,您必须手动隐藏上一个步骤,以防它本身无法执行。单击“确定”按钮将隐藏它,但如果您想在单击圆圈时隐藏showcaseView,它不会隐藏自己。对于这种情况,您只需将“onShowcaseViewHide”上的实现更改为“onShowcaseViewDidHide”,这应该可以工作
我希望我能帮助你。请记住,这是不推荐的。嗯,在他的位置上还有其他用途吗?没有,我找不到,我只是让你知道自述上的内容。主开发人员不再支持它了。谢谢你的回答,你知道如何添加多个,并且它们是按顺序进行的吗?我可以补充,但它们相互重叠=/
@Override
public void onShowcaseViewHide(ShowcaseView showcaseView) {
showcaseView.hide();
new ShowcaseView.Builder(main)...
}