简体   繁体   English

触摸外部时,ShowCaseView不会隐藏

[英]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.

相关问题 什么时候触摸AlertDialog外部的屏幕会取消AlertDialog? - When does touching the screen outside an AlertDialog cancel the AlertDialog? 如何禁用外部触摸以隐藏DialogPreference - How to disable outside touching to hide DialogPreference 在触摸外部编辑文本区域时隐藏android中的键盘 - Hide keypad in android while touching outside Edit Text Area 为什么在触摸Android屏幕时却什么也没做? - Why, when touching the Android screen it does nothing? 触摸滑动抽屉(片段)外部时,关闭打开的滑动抽屉 - close a opened slidingdrawer when touching outside of the slidingdrawer (fragment) Android:如何在触摸外部时关闭 DatePicker DialogFragment? - Android: how to dismiss a DatePicker DialogFragment when touching outside? 在Android Studio中触摸EditText时如何隐藏键盘 - How to hide keyboard when touching on the EditText in Android Studio 触摸片段内的按钮时隐藏/显示TextView - Hide/Show TextView when touching button inside a Fragment 每次显示片段时都会出现Showcaseview - Showcaseview appear every time when fragment shown 为什么触摸屏幕时性能会提高? - Why does my performance increase when touching the screen?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM