【发布时间】:2015-09-06 21:34:09
【问题描述】:
您好,我正在构建一个地图应用程序并尝试使用它,因此当您点击制造商时,它会打开滑动窗格。它按我想要的方式工作,但是当窗格关闭时,您仍然可以看到它有点悬垂。我想把它隐藏在屏幕之外,所以你看到的只是地图片段。
activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.SlidingPaneLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/sliding_layout"
android:layout_width="fill_parent"
android:layout_height="match_parent" >
<fragment
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/map"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:layout_margin="0dp"
class="com.google.android.gms.maps.SupportMapFragment" />
<fragment
android:id="@+id/photo"
android:name="com.example.mapapp.SliderFragment"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:layout_margin="0dp" />
</android.support.v4.widget.SlidingPaneLayout>
见下图
【问题讨论】:
-
我试图发布截图但没有代表。 :(
-
添加图片到本站并添加链接imgur.com
标签: android android-layout android-fragments android-sliding