在GoogleMap上输入EditText的方法行为

时间:2014-04-02 21:15:20

标签: android google-maps

我的应用程序包含一个ActionBarActivity,它显示了一个覆盖在其上的EditText的GoogleMap。当我以纵向方向触摸EditText时,软键盘覆盖EditText。然后,当我关闭软键盘时,活动的操作栏应该是一个坚实的黑色条,并且地图中缺少“我的位置”按钮。 (我会发布截图,但我没有足够的声誉。)

布局XML有问题吗?我把它剥离到了证明问题的最低限度:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/rootLayout"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent" >

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

    <EditText
        android:id="@+id/locationField"
        android:layout_height="wrap_content"
        android:layout_width="match_parent"
        android:layout_alignParentBottom="true"
        android:layout_marginLeft="3dp"
        android:layout_marginRight="3dp"
        android:inputType="textCapWords"
        android:ellipsize="end"
        android:hint="@string/hint_location"
        android:ems="10" />
</RelativeLayout>

我的设备运行的是Android 2.3.6。

1 个答案:

答案 0 :(得分:0)

有关gmails-api问题的报告存在问题,这些问题与(可能是缺少屏幕截图)相关:

基本上它已经针对Android 4.1解决了,并且没有采取任何措施来修复Android的较低版本。

您可能想要更改API的布局&lt; 15在单独的屏幕上包含EditText或类似的东西。

相关问题