Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/218.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 谷歌地图应用程序中的中心标题_Android_Google Maps - Fatal编程技术网

Android 谷歌地图应用程序中的中心标题

Android 谷歌地图应用程序中的中心标题,android,google-maps,Android,Google Maps,我是android开发的新手。我有一个谷歌地图应用程序,我想把地图的标题放在中间。 我发现string.xml中的标题“Hi!”定义为 <string name="title_activity_maps">Hi!</string> 你好! 但我在我的布局中找不到它。所以我不确定我可以把代码放在这个标题的中心。这是我的活动_maps.xml <RelativeLayout xmlns:android="http://schemas.android.com/ap

我是android开发的新手。我有一个谷歌地图应用程序,我想把地图的标题放在中间。

我发现string.xml中的标题“Hi!”定义为

 <string name="title_activity_maps">Hi!</string>
你好! 但我在我的布局中找不到它。所以我不确定我可以把代码放在这个标题的中心。这是我的活动_maps.xml

<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">

<fragment
    android:id="@+id/map"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    class="com.google.android.gms.maps.SupportMapFragment"
    android:layout_above="@+id/latlongLocation" />

<TextView
    android:id="@+id/latlongLocation"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:gravity="bottom"
    android:layout_alignParentBottom="true"
    android:paddingTop="80dp"
    android:paddingBottom="5dp"
    android:paddingLeft="5dp"
    android:paddingRight="5dp"
    android:hint="@string/reminder"/>
</RelativeLayout>

尝试查看以下内容:您好。我读过了。我认为这不管用。。。