【问题标题】:Blank screen on SlidingMenu when using with Fragment (GMap)与 Fragment (GMap) 一起使用时 SlidingMenu 上的空白屏幕
【发布时间】:2013-06-06 16:51:31
【问题描述】:
所以我在我的应用程序中使用带有 FragmentActivity 的 SlidingMenu 库。
布局中有一个谷歌地图,左侧有一个包含一些内容的菜单。
当我拉菜单查看它时,那里有一个黑色的大矩形,覆盖了我的滑动菜单内容。我点击一次后,它就消失了。
有人对此有什么想说的吗?
【问题讨论】:
标签:
android
google-maps
android-fragmentactivity
android-maps-v2
android-sliding
【解决方案2】:
片段黑屏问题
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent" >
<android.support.v4.view.ViewPager
android:id="@+id/fragment_container"
android:layout_width="match_parent"
android:layout_height="match_parent" >
</android.support.v4.view.ViewPager>
<!-- hack to fix ugly black artefact with maps v2 -->
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/transparent" />
</FrameLayout>
【解决方案4】:
我知道这个问题太老了,但由于我偶然来到这里,发现没有公认的答案,我会回答这个问题。希望有一天它对某人有所帮助。
我的解决方案是在您的“Shopradar”布局上方添加一个带有透明背景的浅色布局(大约 1dp)。这对我有用,希望它也对你有用;)