我有以下活动XML设计:
<android.support.v4.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<!-- The main content view -->
<FrameLayout
android:id="@+id/content_frame"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<!-- The navigation drawer -->
<ListView android:id="@+id/left_drawer"
style="@style/leftdrawerStyle" />
<ExpandableListView android:id="@+id/right_drawer"
style="@style/rightdrawerStyle" >
</ExpandableListView>
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/MyGmap"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:name="com.google.android.gms.maps.MapFragment"/>
<android.support.v4.view.ViewPager
android:id="@+id/follow_mode_slider"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</android.support.v4.widget.DrawerLayout>
我想将屏幕划分为两个相同的视图:
1.视图寻呼机。
2.其他地图片段。
注意:两个抽屉在开始时都不会显示,直到您向右交换。即使有办法以编程方式执行此操作,这也是完美的。