问题标签 [supportmapfragment]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
android - 在 App 中使用两个 google map v2 对象
我正在尝试在我的应用程序中使用两个地图,其中只有一个活动和几个片段显示在不同的选项卡中。我有一个片段,其中地图覆盖整个布局,另一个片段仅位于布局的一小部分。
第一个工作正常,但添加第二个地图会导致我的应用程序崩溃,出现通货膨胀异常。
这是xml布局。
拳头 xml 1
XML 2
使用两张地图的过程是否与使用一张地图的过程相同,还是我需要做一些不同的事情。
xamarin.android - SupportMapFragment 导致方向更改异常
以下代码在单一方向上工作正常,但一旦方向改变,就会导致异常:
如果我在 OnCreate 中注释掉 InitMapFragment,则地图会正确加载并旋转,因此它似乎与 SupportMapFragment 有关。
布局文件包含:
调试输出只显示“发生未处理的异常”。但设备日志显示:
android - SupportMapFragment 上的 NPE
我使用 android maps v2 成功构建了一个地图片段,它在我的智能手机上运行良好。现在我插入了我的平板电脑,当我尝试启动地图活动时我得到了一个 NPE。我现在完全一无所知;甚至不知道错误的来源可能是什么。谁能帮忙?谢谢
地图活动的 OnCreate:
customer_map_activity.xml:
日志猫:
编辑: 在手机上它只在纵向上运行。在平板电脑上,它被迫使用横向。
android - Maps Android V2: java.lang.noclassdeffounderror: com.google.android.gms.R$styleable
As many I get the following error: java.lang.noclassdeffounderror: com.google.android.gms.R$styleable
when trying to implement Maps for Android V2.
Somehow I must be missing what I exactly am doing wrong, since it's not working. What I tried first is to copy the google-play-services.lib into the lib folder, but I saw somewhere I shouldn't do this.
Then I tried to import addon-google_apis-google-8 as a project, but the project gives the error The import com.google cannot be resolved.
I'm following the Vogella Tutorial:
Activity:
#xA;Manifest:
#xA;I retrieved a_real_api_key by entering the SHA1 retrieved by installing the keytool plugin.. http://keytool.sourceforge.net/update fingerprint;com.testmap.test in the google console.
And xml:
#xA;I have the feeling I need to import the google-play-services library, can somebody tell me step by step how to do this in Eclipse, I've followed many answers, but I seem to do something wrong every time.
gradle - 在 Android Studio 中使用 Robolectric 问题进行 Android 测试
首先,我想声明我对 Android 缺乏适当的测试基础设施感到沮丧......或者我可能是智障,我不知道......
我最终设法设置了android-test-plugin并且我写了一个对包含在其布局中的活动的几个测试 aCustomMapFragment
这是我编写的扩展类SupportMapFragment
。
我所有尝试使用以下方法获取此活动实例的测试:
失败:
java.lang.NoClassDefFoundError: com/google/android/gms/maps/GoogleMap$OnInfoWindowClickListener
在活动的setContentView
。
活动的xml如下:
是否有解决方法/解决方案?任何帮助,将不胜感激。
android - 在 DialogFragment 中显示 MapFragment
我是android开发的新手,我正在开发一个应用程序,我需要使用谷歌地图来选择事件位置,我需要像弹出窗口一样显示这个地图,我看到了这篇文章:
我在帖子中列出了同样的问题,但我不明白如何做到这一点
她就是我所做的:
XML 布局
在点击按钮上:
谢谢你的帮助
android - Android GoogleMap 或 SupportMapFragment - 空指针异常
在我的应用程序中,我在片段中显示了谷歌地图版本 2。但我得到空指针异常
mMap = ((SupportMapFragment) getFragmentManager().findFragmentById(R.id.map)).getMap();
这是我的完整代码:
xml:
清单 xml:
整只原木猫:
android - Android - 第二次打开时显示 Google 地图 v2 或 SupportMapFragment 时出错
在我的应用程序中,我在片段中使用 Google 地图版本 2。我的应用程序选项卡主机带有片段(总共四个选项卡)。地图用法在Tab1->Searchome(fragment class)->fragment2(fragment class)->SearchResultMap(fragment class)。
我的问题是我第一次在 SearchResultMap 类中访问它显示地图但第二次它崩溃了Caused by: java.lang.IllegalArgumentException: Binary XML file line #62: Duplicate id 0x7f050043, tag null, or parent id 0x0 with another fragment for com.google.android.gms.maps.SupportMapFragment
我的带有布局 xml 的完整代码:
SearchResultMap.java:
map_layout.xml:
全日志猫:
android - 双击打开全屏 SupportMapFragment
我正在使用 Google Maps Android API v2,我希望能够在点击(或双击)时全屏打开小地图(= 我认为的 SupportMapFragment)。
这在技术上可行吗?如果是,如何实现?
提前致谢。
android-viewpager - FragmentStatePagerAdapter 上的 SupportMapFragment。我只能看到前一个和第一个地图片段
我正在研究 googlemap carousel (pager) 项目,需要在复杂的布局中显示 google map,但每次移动寻呼机时,mapfragment 都不会加载。如果我向后翻转,地图会突然出现。这是我的代码:
和 main.xml
和 ttt.xml 我有片段的地方:
还有我的 Mainfest.xml
我放这个视频是为了更好地理解。
希望您能够帮助我。