透明的谷歌地图上PopupWindow?
我在 PopupWindow
使用谷歌地图(V2),当我运行应用程序,将不显示地图。即使它应该是该地区是完全透明的,我可以透过它看到下面的 PopupWindow
活动。
I have used a Google Maps (V2) in a PopupWindow
and when I run the application, the map is not displayed. Even the area where it should be is fully transparent and I can see the activity below the PopupWindow
through it.
任何想法,这是为什么?
Any idea why this is?
里面的片段popup_window.xml
<fragment
android:id="@+id/popup_alert_map"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/popup_alert_description"
android:layout_marginTop="10dp"
class="com.google.android.gms.maps.SupportMapFragment" />
我该如何证明它里面Popup.java
SupportMapFragment supportMapFragment = (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.popup_alert_map);
locationMap = supportMapFragment.getMap();
locationMap.setMyLocationEnabled(true);
locationMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);
我有另一个活动
与地图它和它的是的显示器很好。
I have another Activity
with a map it it and that displays nicely.
任何帮助非常AP preciated ...
Any help greatly appreciated...
这似乎是一个错误,无论是在Android或在 MapFragment
/ SupportMapFragment
。我想同样的事情(添加在谷歌地图片段 PopupWindow
),并在谷歌Nexus 10采用Android 4.4,并在地图上出现了 PopupWindow
不错,但较旧的设备采用Android 4.0.3这表明透明度的问题上。
It seems to be a bug, either in Android or in the MapFragment
/SupportMapFragment
. I tried the same thing (adding the Google Map fragment in a PopupWindow
) and on a Google Nexus 10 with Android 4.4, and the map appeared on the PopupWindow
just fine, but on an older device with Android 4.0.3 it showed the transparency problem.
最后,我所做的只是将其移动到另一个活动
。我找了尽可能多的方式,我可以修复它,但是这一切似乎是一个死胡同,特别是考虑到它适用于Android的最新版本没有任何问题的事实。
Eventually what I did was just move it to another Activity
. I looked for as many ways as I could to fix it but it all seems like a dead end, especially given the fact that it works on the newest version of Android without any problems.