【发布时间】:2013-09-25 04:46:42
【问题描述】:
我正在使用imeOptions,它们运行良好。但是,我有一个 ExpandableListView,其中一个孩子是一个布局,其中 3 个 EditText 和 imeOptions 甚至都没有显示。
知道可能是什么问题吗?有没有人在普通的ListView 中使用imeOptions(即这是对ListViews 的一般限制还是仅对ExpandableListView 的限制)?
更新:我刚刚用标准的ListView 进行了测试,而不是可扩展的,我遇到了同样的问题。
这是列表项布局:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="100" >
<View
android:layout_width="0px"
android:layout_height="wrap_content"
android:layout_weight="10" />
<LinearLayout
android:layout_width="0px"
android:layout_weight="73"
android:layout_height="wrap_content"
android:orientation="vertical" >
<EditText
android:layout_marginTop="15dip"
android:id="@+id/settingsText1"
android:nextFocusDown="@+id/settingsText2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="#000000"
android:textSize="8pt"
android:hint="OLD PASSWORD"
android:background="@drawable/textfield2" />
<EditText
android:layout_marginTop="15dip"
android:id="@+id/settingsText2"
android:nextFocusDown="@+id/settingsText3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="#000000"
android:textSize="8pt"
android:hint="NEW PASSWORD"
android:background="@drawable/textfield2" />
<EditText
android:layout_marginTop="15dip"
android:id="@+id/settingsText3"
android:imeOptions="actionSend"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="#000000"
android:textSize="8pt"
android:hint="CONFIRM PASSWORD"
android:background="@drawable/textfield2" />
</LinearLayout>
<View
android:layout_width="0px"
android:layout_height="wrap_content"
android:layout_weight="27" />
</LinearLayout>
【问题讨论】:
-
在你的情况下,我的大多数带有 imeOptions 的文本视图都在工作,但我有一个是 DialogFragment 中的 AutoCompleteTextView 没有出现。我从下面的答案中添加了 inputType,瞧,它就在那里!
标签: android android-listview expandablelistview android-softkeyboard