[英]ShowCaseView does not hide when touching outside
new ShowcaseView.Builder(mainTabActivity)
.withHoloShowcase()
.setTarget(new ViewTarget(recyclerView.findViewHolderForAdapterPosition(0).itemView))
.setContentTitle(getString(R.string.tutorial_welcome))
.setContentText(getString(R.string.tutorial_cardview_add))
.hideOnTouchOutside()
.build();
This is my code when attaching the showcaseview onto the recyclerview first item. 这是我的代码,当将Showcaseview附加到recyclerview第一项目时。 It works although the animation seems to be laggy I don't know why, and also the problem is when I touch outside or press the "ok" button.
尽管动画似乎有些迟钝,但我不知道为什么,但它仍然有效,而且问题出在我触摸外部或按下“确定”按钮时。 The showcaseview does not hide instead I have to press the "ok" or touchoutside for a few times "four times" I think, to make it go away completely.
相反,Showerview视图不会隐藏,我必须按几次“确定”或“触摸”数次“四次”以使其完全消失。 Am I missing something?
我想念什么吗?
I am using this https://github.com/amlcurran/ShowcaseView library. 我正在使用这个https://github.com/amlcurran/ShowcaseView库。
I have tried giving it an onClickListener and calling removeAllViews() but it's crashing the app. 我尝试给它一个onClickListener并调用removeAllViews(),但它使应用程序崩溃。
我找到了一个解决方案,我要做的是直接在recyclerview的适配器中启动整个过程,并将其保持在防止其弹出不止一次的状态。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.