【发布时间】:2016-12-26 07:46:50
【问题描述】:
我有一个使用谷歌地图的安卓应用,我想要一个看起来像安卓谷歌地图的搜索栏。下面是我的 XML 代码和我所拥有的图片。
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp">
<fragment
android:id="@+id/place_autocomplete_fragment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:name="com.google.android.gms.location.places.ui.PlaceAutocompleteFragment"/>
</android.support.v7.widget.CardView>
问题是我有一个导航抽屉,当您从左侧滑动时会打开。我想像谷歌地图一样将“三条水平线”添加到搜索栏,所以每当你点击它时,导航抽屉就会打开,如下所示。
那么如何将“放大镜”更改为“3 条水平线”并在点击时打开导航抽屉。谢谢!
【问题讨论】:
标签: android google-maps navigation-drawer