如何复制这个android弹出窗口

发布于 2025-01-02 00:23:22 字数 214 浏览 3 评论 0原文

在此处输入图像描述

在此处输入图像描述

谁能告诉我什么控件或如何创建这些图像中使用的弹出效果来显示图例? 屏幕截图取自一款名为 FlyOKC 的应用程序。 非常感谢任何帮助,谢谢。

enter image description here

enter image description here

Can anyone tell me what control or how do you create the pop-up effect used in these images to display the legend?
The screenshots are taken from an app called FlyOKC.
Any help is greatly appreciated, thank you.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

束缚m 2025-01-09 00:23:22

这不完全是一个自定义对话框。但是,是的,它仍然是一个定制的视图。在android中它或多或少被称为快速操作对话框。我建议您按照下面的教程使用 Android 生成完全相同(甚至更好)的弹出窗口。还要检查屏幕截图。

This is not exactly a custom dialog. But, yes it is still a customized view. And it is more or less called Quick Action Dialog in android. I would suggest you to follow the tutorials below for generating an exactly same popover (or even better) with Android. Check the screenshot also.

enter image description here

故乡的云 2025-01-09 00:23:22

这当然是使用自定义版本的对话框。这个想法是在 xml 中实现布局并在对话框中展开它。有很多教程,请尝试那个

That's certainly using a custom version of a dialog. The idea is to implement your layout in a xml and inflate it in a dialog. There's a lot of tutorials around, try that one.

爱你不解释 2025-01-09 00:23:22

实际上,这可以通过使用RelativeLayout 并在按钮的点击处理程序中在View.VISIBLE 和View.GONE 之间切换图例视图的可见状态来实现。

要获得精确的动画,您需要跳一些圈。
以下是相关主题:

一个 Animate 布局属性如何视图组?

如何对 View.setVisibility(GONE) 进行动画处理

另外,我认为另一种(可能更简单)的方法是使用具有过渡效果的 Fragments API,在这种情况下,这是要读取的线程:

对片段之间的过渡进行动画处理

Actually, that can be achieved by using RelativeLayout and switching the legend view's visible state between View.VISIBLE and View.GONE in button's click handler.

To get the exact animation you'll need to jump some hoops.
Here are related threads:

How does one Animate Layout properties of ViewGroups?

How do I animate View.setVisibility(GONE)

Also, I think another (and possibly easier) way would be to use Fragments API with transition effects, in which case this is the thread to read:

Animate the transition between fragments

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文