如何在Android上的谷歌地图上制作这个图像滑块(如状态栏)?

发布于 2024-12-28 11:40:18 字数 349 浏览 1 评论 0原文

嗨,大家好!这是我第一次在android中的谷歌地图上看到像状态栏这样的图像滑块,我不知道该怎么做,我真的需要快速完成它,我尝试用谷歌搜索它,我发现的只是地图上的吐司或者点击地图时在地图上弹出一些消息,但这我不知道,也许他们是用 jQuery 制作的,因为我发现了许多滑块或制作了一些东西...请帮助

这里是地图图像的链接: http://s.joomeo.com/4f199b65d2760

我想知道它是否可以像某种纯文本一样,当点击时在地图上将地图视图可见性设置为 false

谢谢,任何帮助将不胜感激

Hi Guys! It's the first time I see an image slider like status bar over google maps in android, I don't know how to do it and I really need to do it quickly, I have tried to google it and all I found was toast on map or some message popup on map while clicking on map but this I don't know, maybe they made it in jQuery as I found many sliders in or made something ...plz help

here is link of map image :
http://s.joomeo.com/4f199b65d2760

i wonder if it can be like somehow plaintext and when clicking on map it set mapview visiblity to false

thanks and any help 'll be appreciated

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

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

发布评论

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

评论(3

顾忌 2025-01-04 11:40:18

MapView 是一个具有布局参数并允许您嵌入任何所需控件的 ViewController。您应该能够构建一个基本的滑块控件并将其嵌入到地图视图中,就像将其嵌入到 ListView 中一样。

The MapView is a ViewController that has layout parameters and lets you embed any controls you want. You should be able to build a basic slider control and embed that on your mapview the same way as you would embed it on a ListView for example.

第几種人 2025-01-04 11:40:18

您必须创建自定义Overlays才能在地图中获取该视图,假设您想在单击地图中的某些内容时显示粉红色视图。你可以谷歌一下如何做。

You have to create custom Overlays to get that view in your map, assuming that you want to bring up that pink view, when you say, click on something in the map. You can google on how to do it.

初见你 2025-01-04 11:40:18

我花了很长时间才找到这个问题的解决方案,因为我还是 android 的初学者>>这个名为弹出窗口的滑块

这里是代码

  LayoutInflater in=(LayoutInflater) Map.this.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
            View layout=in.inflate(R.layout.mapslider, (ViewGroup) findViewById(R.id.popupwindow));
            pw=new PopupWindow(layout,500,300,true);


and in xml file which called mapslider **you should put any id to main layout for example "popupwindow"**

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:id="@+id/popupwindow"
android:paddingTop="30dp"
 >

it takes me long time to find the solution for this problem as i'm still beginner in android >>>this slider called popup window

here's the code

  LayoutInflater in=(LayoutInflater) Map.this.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
            View layout=in.inflate(R.layout.mapslider, (ViewGroup) findViewById(R.id.popupwindow));
            pw=new PopupWindow(layout,500,300,true);


and in xml file which called mapslider **you should put any id to main layout for example "popupwindow"**

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:id="@+id/popupwindow"
android:paddingTop="30dp"
 >

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