Android设置使用PopupWindow查看隐藏而不调用PopupWindow的onDismiss

时间:2022-12-01 23:07:00

In my app I'm trying to set a view containint a popupwindow to invisible and after some time to visible. My popup contains images and text and I want the whole view with the popup and it's content to be shown and not shown based on some logic. My problem is that setting it to invisible causing the popupwindow'sdismiss() to be called.

在我的应用程序中,我正在尝试将一个视图containsint一个弹出窗口设置为不可见,并在一段时间后可见。我的弹出窗口包含图像和文本,我想要弹出窗口的整个视图,它的内容将显示,而不是基于某些逻辑显示。我的问题是将其设置为不可见,导致调用popupwindow的dismiss()。

Any way to change that?

有什么方法可以改变吗?

1 个解决方案

#1


you could set the view's alpha to 0 for invisible and 1 for visible.

您可以将视图的alpha设置为0表示不可见,1表示可见。

#1


you could set the view's alpha to 0 for invisible and 1 for visible.

您可以将视图的alpha设置为0表示不可见,1表示可见。