Android 无模式弹出窗口
我似乎无法在 Android 中创建无模式弹出窗口。我可以很好地创建一个弹出窗口,它会接收事件。但是,我需要的是它接收事件,并且如果用户在弹出窗口之外单击,则活动将按正常方式接收事件。
我真的不想使用对话框,我正在寻找弹出控件的外观,用户可以选择单击该控件或选择单击活动中的其他内容。
我一直在阅读有关 FLAG_NOT_TOUCH_MODAL 的内容,但我似乎无法使用弹出窗口来实现此功能。
有什么想法吗?
I can't seem to create a modeless popupwindow in Android. I can create a popupwindow just fine, and it will receive events. However, what I need is for it to receive its events, and if the user clicks outside the popup window, the activity receives events as per normal.
I don't really want to use a dialog, and I'm looking for a look where a control pops up, and the user can choose to click on that or choose to click on something else in the activity.
I've been reading about FLAG_NOT_TOUCH_MODAL, but I can't seem to get this wot work with a popupwindow.
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看一下这个示例/库
https://github.com/lupidan/PopoverView
另一个选项我在我的项目中使用的是:
并使用 onActivityResult(...) 捕获用户选择
Take a look at this example/library
https://github.com/lupidan/PopoverView
An other option that i use in my projects is:
and catch the user selections with onActivityResult(...)