简体   繁体   English

如何在Android中显示弹出窗口并且仍然能够单击片段

[英]How to show a pop up in Android and still be able to click on fragment

I'm trying to create a pop up that will notify the user if they got the correct answer, the user can then click the continue button to the next question. 我正在尝试创建一个弹出窗口,该弹出窗口将通知用户是否得到正确答案,然后用户可以单击“继续”按钮进入下一个问题。 The pic below from the Duolingo app shows exactly what I want. 下面来自Duolingo应用程序的图片正好显示了我想要的。

图片1图片2

What class can be used to do this? 什么班级可以用来做到这一点?

Use the PopupWindow class. 使用PopupWindow类。 It does exactly what you want. 它正是您想要的。 That's what has been used in the screenshot you posted above. 这就是您上面发布的屏幕截图中使用的内容。

Here's an example: How to Implement Popup Window in Android . 这是一个示例: 如何在Android中实现弹出窗口

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM