在android中使用map API V2在地图上添加搜索栏
我正在开发一个应用程序,我正在使用Google Map Api V2,地图已成功加载,我也在地图上添加了标记,但现在当我尝试在地图上添加搜索栏时,它没有显示在地图表面上,实际上我想提供一个功能,用户可以使用搜索栏增加和减少圆的半径,但当我通过XML添加搜索栏时,它并没有显示搜索栏 我的XML是这样的:-在android中使用map API V2在地图上添加搜索栏,android,google-maps-api-2,google-maps-android-api-2,Android,Google Maps Api 2,Google Maps Android Api 2,我正在开发一个应用程序,我正在使用Google Map Api V2,地图已成功加载,我也在地图上添加了标记,但现在当我尝试在地图上添加搜索栏时,它没有显示在地图表面上,实际上我想提供一个功能,用户可以使用搜索栏增加和减少圆的半径,但当我通过XML添加搜索栏时,它并没有显示搜索栏 我的XML是这样的:- <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="ht
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity" >
<RadioGroup
android:id="@+id/rg_views"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<RadioButton
android:id="@+id/rb_normal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="true"
android:text="StreetView" />
<RadioButton
android:id="@+id/rb_satellite"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Satellite" />
<RadioButton
android:id="@+id/rb_terrain"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Terrian" />
</RadioGroup>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/rg_views" >
<fragment
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent"
class="com.google.android.gms.maps.SupportMapFragment" />
<SeekBar
android:id="@+id/bar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:layout_marginRight="-30dp"
android:max="400"
android:minWidth="100dp"
android:progress="100"
android:rotation="270" />
</RelativeLayout>
</RelativeLayout>
若有人知道如何放置按钮,那个么请在地图表面上搜索栏,然后帮助我
谢谢SeekBar是水平的。旋转它会使它在不修改代码的情况下正确显示。您可以尝试垂直SeekBar实现的示例,但其中没有一个对我很有效
尝试上传XML文件内容,这将有助于找到问题的根源。Hi@Noloxs,我已经添加了我的XML,请回复……我想这是轮换的问题。我尝试了不同的实现,但从未使其垂直工作。尝试不旋转,看看它是否显示。@Doctoror Drive是的,它工作正常,谢谢,但为什么它在垂直方向时不显示,我看不到它背后的任何逻辑……现在u可以@Doctoror Drive。。。。。。。。。。。。