从底部拉出 View like Google Maps
Pull from bottom View like Google Maps
我正在尝试制作类似 google 地图中的上拉菜单(见图片)的布局,我可以在其中上拉并从底部查看地图上某个点的更多详细信息屏幕。
我目前正在使用 DrawerLayout 拉侧视图,
但我会使用与 google 地图相同的布局。这是一些图片:
http://imgur.com/a/kuSKu#0
此外,这是我现在在主 activity 中使用的代码:
<android.support.v4.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MapActivity"
tools:ignore="MergeRootFrame">
<fragment
android:id="@+id/main_fragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:name="neocom.dealerbook.MapFragment"
tools:layout="@layout/fragment_map" />
<fragment android:id="@+id/side_panel"
android:layout_width="240dp"
android:layout_height="match_parent"
android:layout_gravity="start"
android:choiceMode="singleChoice"
android:dividerHeight="0dp"
android:name="neocom.dealerbook.SideBarFragment"
tools:layout="@layout/side_bar"/>
</android.support.v4.widget.DrawerLayout>
这一个做了我需要的一切AndroidSlidingUpPanel
现在我们可以使用 Android 支持库 23.2 中的 Design Support Library: Bottom Sheets !
我正在尝试制作类似 google 地图中的上拉菜单(见图片)的布局,我可以在其中上拉并从底部查看地图上某个点的更多详细信息屏幕。
我目前正在使用 DrawerLayout 拉侧视图,
但我会使用与 google 地图相同的布局。这是一些图片: http://imgur.com/a/kuSKu#0
此外,这是我现在在主 activity 中使用的代码:
<android.support.v4.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MapActivity"
tools:ignore="MergeRootFrame">
<fragment
android:id="@+id/main_fragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:name="neocom.dealerbook.MapFragment"
tools:layout="@layout/fragment_map" />
<fragment android:id="@+id/side_panel"
android:layout_width="240dp"
android:layout_height="match_parent"
android:layout_gravity="start"
android:choiceMode="singleChoice"
android:dividerHeight="0dp"
android:name="neocom.dealerbook.SideBarFragment"
tools:layout="@layout/side_bar"/>
</android.support.v4.widget.DrawerLayout>
这一个做了我需要的一切AndroidSlidingUpPanel
现在我们可以使用 Android 支持库 23.2 中的 Design Support Library: Bottom Sheets !