Android的EditText上不起作用,安卓imeOptions =" actionNext"安卓的inputType ="电话:QUOT; [英] Android EditText does not work, android:imeOptions="actionNext" android:inputType="phone"
问题描述
我都试过,只如果我删除的android:inputType下=手机
键盘输入可以跳转到下一步的EditText。我不知道是否有过机器人之间的一些冲突:imeOptions =actionNext
和的android:inputType下=手机
。
code: AutoCompleteTextView
的的android:imeOptions =actionNext
和的android:inputType下=手机
,但在键盘上输入不会去到下一个。
< RelativeLayout的
机器人:layout_width =match_parent
机器人:layout_height =WRAP_CONTENT
机器人:方向=横向> < ImageView的
机器人:layout_width =WRAP_CONTENT
机器人:layout_height =WRAP_CONTENT
机器人:layout_alignParentLeft =真
机器人:paddingBottom会=12dp
机器人:paddingLeft =13dp
机器人:paddingTop =12dp
机器人:SRC =@绘制/ fd_28/>
<的TextView
机器人:ID =@ + ID / texttitle_phone
风格=@风格/ TextviewRentItem
机器人:layout_width =WRAP_CONTENT
机器人:layout_height =WRAP_CONTENT
机器人:layout_marginLeft =30dip/> <的EditText
机器人:ID =@ + ID / content_phone
风格=@风格/ TextviewRentItemCon3
机器人:layout_width =match_parent
机器人:layout_height =WRAP_CONTENT
机器人:layout_marginRight =50dip
机器人:layout_toRightOf =@ ID / texttitle_phone
机器人:paddingBottom会=12dp
机器人:paddingRight =15dp
机器人:paddingTop =12dp
机器人:imeOptions =actionNext
机器人:单线=真
安卓的inputType =手机/>
< / RelativeLayout的>
< / LinearLayout中> <的LinearLayout
机器人:ID =@ + ID / linearLayout0_ll
机器人:layout_width =FILL_PARENT
机器人:layout_height =WRAP_CONTENT
机器人:layout_marginTop =10dip
机器人:背景=@绘制/ bg_rect_black_filled_white
机器人:方向=垂直> <! - 二 - > < RelativeLayout的
机器人:ID =@ + ID / linearLayout0
机器人:layout_width =match_parent
机器人:layout_height =WRAP_CONTENT
机器人:方向=横向> < ImageView的
机器人:ID =@ + ID / img_house
机器人:layout_width =WRAP_CONTENT
机器人:layout_height =WRAP_CONTENT
机器人:layout_alignParentLeft =真
机器人:paddingBottom会=12dp
机器人:paddingLeft =10dp
机器人:paddingTop =12dp
机器人:SRC =@绘制/ fd_29/> <的TextView
机器人:ID =@ + ID / textview3
风格=@风格/ TextviewRentItem
机器人:layout_width =WRAP_CONTENT
机器人:layout_height =WRAP_CONTENT
机器人:layout_marginLeft =30dip
机器人:可聚焦=真
机器人:文字=@字符串/住宅/> < AutoCompleteTextView
机器人:ID =@ + ID / add_rent_manage_house
风格=@风格/ TextviewRentItemCon3
机器人:layout_width =match_parent
机器人:layout_height =WRAP_CONTENT
机器人:layout_marginRight =50dip
机器人:layout_toRightOf =@ ID / textview3
机器人:dropDownHeight =90dp
机器人:提示=@字符串/ default_add_rent_house_remind
机器人:imeOptions =actionNext
机器人:单线=真/>
< / RelativeLayout的>
(在编辑和注释的OP回答。见<一href=\"http://meta.stackoverflow.com/questions/251597/question-with-no-answers-but-issue-solved-in-the-comments\">Question没有答案,但问题的评论解决)
在OP写道:
问题已经解决。我的EditText使用 setOnClickListener ,删除此侦听器事件,这是确定
块引用>@xbakesx写道:
我认为真正的解决问题的方法是添加
的android:单线=真正的
块引用>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 betweenandroid:imeOptions="actionNext"
andandroid:inputType="phone"
.code :
AutoCompleteTextView
hasandroid:imeOptions="actionNext"
andandroid: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>
解决方案(Answered by the OP in an edit and in comments. See Question with no answers, but issue solved in the comments )
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"
这篇关于Android的EditText上不起作用,安卓imeOptions =&QUOT; actionNext&QUOT;安卓的inputType =&QUOT;电话:QUOT;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!