gpt4 book ai didi

android - 从底部拉出 View like Google Maps

转载 作者:塔克拉玛干 更新时间:2023-11-02 07:58:10 25 4
gpt4 key购买 nike

我正在尝试制作类似于谷歌地图中的上拉菜单(见图片)的布局,我可以在其中从屏幕底部上拉并查看有关 map 上某个点的更多详细信息。

我目前正在使用 DrawerLayout 拉侧 View ,

但我会使用与谷歌地图相同的布局。这是一些图片: 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>

half closed

最佳答案

现在我们可以使用Design Support Library: Bottom Sheets来自 Android 支持库 23.2!

enter image description here

关于android - 从底部拉出 View like Google Maps,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28951736/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com