![](/img/trans.png)
[英]When does touching the screen outside an AlertDialog cancel the AlertDialog?
[英]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();
這是我的代碼,當將Showcaseview附加到recyclerview第一項目時。 盡管動畫似乎有些遲鈍,但我不知道為什么,但它仍然有效,而且問題出在我觸摸外部或按下“確定”按鈕時。 相反,Showerview視圖不會隱藏,我必須按幾次“確定”或“觸摸”數次“四次”以使其完全消失。 我想念什么嗎?
我正在使用這個https://github.com/amlcurran/ShowcaseView庫。
我嘗試給它一個onClickListener並調用removeAllViews(),但它使應用程序崩潰。
我找到了一個解決方案,我要做的是直接在recyclerview的適配器中啟動整個過程,並將其保持在防止其彈出不止一次的狀態。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.