简体   繁体   English

类似 IOS 的 Android 弹出窗口

[英]Android popup like IOS

I need to implement popup dialog like in iOS, and show above some view (map point in this case), but don't know how to implement it.我需要像在 iOS 中一样实现弹出对话框,并在一些视图(在这种情况下为地图点)上方显示,但不知道如何实现它。 A screenshot is attached.附上截图。 Will be glad to read any proposals.将很高兴阅读任何建议。

在此处输入图片说明

Use this example使用这个例子

Just call this when you want to open that dialog当你想打开那个对话框时调用它

 MyCustomDialog dialog = new MyCustomDialog(buttonView);
 dialog.show();

Looks like you are adding it inside a mapview as from above image:看起来您是将它添加到地图视图中,如上图所示:

use this and change the features according to your requirement使用它并根据您的要求更改功能

static final LatLng MELBOURNE = new LatLng(-37.81319, 144.96298);
Marker melbourne = mMap.addMarker(new MarkerOptions()
                          .position(MELBOURNE)
                          .title("Melbourne")
                          .snippet("Population: 4,137,400"));

Refer this link: link参考这个链接: link

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

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