在Google Maps v1中重新定位“我的位置”按钮

时间:2014-02-25 10:32:44

标签: android google-maps

我知道谷歌地图v1已被弃用,但我必须对使用v1的现有应用程序进行一些小改动。 MapView在右上角显示“我的位置”按钮。我想将按钮移动到左下角,但无法找到有关更改文档中位置的任何信息。是否有可能更改此按钮的位置?

编辑:我使用的是Google地图 V1 ,而不是V2。

1 个答案:

答案 0 :(得分:0)

我觉得你做得很好,但根据我的理解,我给你一个布局。使用以下布局:

<FrameLayout
android:id="@+id/mapFrame"
android:layout_width="match_parent"
android:layout_height="match_parent" >



<{ your map(v1) with package name and set proprty}
    android:id="@+id/mapFragment"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"/>

<Button
    android:id="@+id/myMapLocationButton"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="top|left"
    android:text="My Location" />

我认为这会有所帮助。