2

試してみましたが、キーボードの Enter を削除した場合にのみandroid:inputType="phone"、次の EditText にジャンプできます。android:imeOptions="actionNext"と の間に競合があったかどうかはわかりませんandroid:inputType="phone"

code : とAutoCompleteTextViewandroid:imeOptions="actionNext"ありandroid:inputType="phone"ますが、キーボードの Enter は次のものに移動しません。

         <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>
4

1 に答える 1

3

(編集およびコメントでOPによって回答されました。回答のない質問を参照してください。ただし、コメントで問題は解決されています(またはチャットで拡張されています)

OP は次のように書いています。

問題は解決しました。私の EditText は setOnClickListener を使用、このリスナー イベントを削除します。

@xbakesx さんが書きました:

あなたの問題の本当の解決策は追加だったと思いますandroid:singleLine="true"

于 2015-01-26T16:22:24.740 に答える