【发布时间】:2017-05-12 19:06:50
【问题描述】:
在我的 Android 应用程序中,我有 ListView,标题包含 2 editText。当我尝试将注意力集中在较低的editText 上时,键盘会出现,并将焦点更改为上部的editText。标题布局xml:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_height="match_parent">
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/name"
android:hint="Title"
android:layout_alignParentTop="true"/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:nextFocusUp="@id/name"
android:inputType="text"
android:hint="Wordpack description"
android:id="@+id/description"
android:layout_below="@+id/name" />
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/description"
android:inputType="text"
android:id="@+id/locale"
android:text="Select language"/>
</RelativeLayout>
【问题讨论】:
-
你试过删除
android:nextFocusUp标签吗? -
@PabloBaxter 问题仍然存在
标签: android android-layout listview