问题
I have tried, and only if I delete android:inputType="phone"
the keyboard Enter can jump to the Next EditText. I don't know whether there have been some conflicts between android:imeOptions="actionNext"
and android:inputType="phone"
.
code :
AutoCompleteTextView
has android:imeOptions="actionNext"
and android:inputType="phone"
, but Enter on the keyboard will not go to the next one.
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:paddingBottom="12dp"
android:paddingLeft="13dp"
android:paddingTop="12dp"
android:src="@drawable/fd_28" />
<TextView
android:id="@+id/texttitle_phone"
style="@style/TextviewRentItem"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="30dip" />
<EditText
android:id="@+id/content_phone"
style="@style/TextviewRentItemCon3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginRight="50dip"
android:layout_toRightOf="@id/texttitle_phone"
android:paddingBottom="12dp"
android:paddingRight="15dp"
android:paddingTop="12dp"
android:imeOptions="actionNext"
android:singleLine="true"
android:inputType="phone"/>
</RelativeLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/linearLayout0_ll"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dip"
android:background="@drawable/bg_rect_black_filled_white"
android:orientation="vertical" >
<!-- the second-->
<RelativeLayout
android:id="@+id/linearLayout0"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<ImageView
android:id="@+id/img_house"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:paddingBottom="12dp"
android:paddingLeft="10dp"
android:paddingTop="12dp"
android:src="@drawable/fd_29" />
<TextView
android:id="@+id/textview3"
style="@style/TextviewRentItem"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="30dip"
android:focusable="true"
android:text="@string/house" />
<AutoCompleteTextView
android:id="@+id/add_rent_manage_house"
style="@style/TextviewRentItemCon3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginRight="50dip"
android:layout_toRightOf="@id/textview3"
android:dropDownHeight="90dp"
android:hint="@string/default_add_rent_house_remind"
android:imeOptions="actionNext"
android:singleLine="true" />
</RelativeLayout>
回答1:
(Answered by the OP in an edit and in comments. See Question with no answers, but issue solved in the comments (or extended in chat) )
The OP wrote:
Problem has been solved. My EditText use setOnClickListener , delete this listener event ,that's ok
@xbakesx wrote:
I think the real solution to your problem was adding
android:singleLine="true"
来源:https://stackoverflow.com/questions/12361894/android-edittext-does-not-work-androidimeoptions-actionnext-androidinputtyp