2017-10-06 6 views
0

두 개의 editText 위젯 만 포함하는 간단한 recyclerView를 만들 때 데이터를 입력 할 때 다음 포커스 요소의 방향이 pic1과 같습니다. --- 다음과 같은 포커스 요소의 방향을 pic2에 설정하는 방법은 무엇입니까? 환호recycleView 위젯의 다음 포커스 방향

pic1

pic2

내 간단한 코드

<LinearLayout 
    xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:tools="http://schemas.android.com/tools" 
    android:orientation="horizontal" 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content"> 

    <EditText 
     android:id="@+id/edit_text_left" 
     tools:hint="editTextLeft" 
     android:layout_width="0dp" 
     android:layout_weight="1" 
     android:layout_height="wrap_content" /> 

    <EditText   
     android:id="@+id/edit_text_right" 
     tools:hint="editTextRight" 
     android:layout_width="0dp" 
     android:layout_weight="1" 
     android:layout_height="wrap_content" /> 

</LinearLayout> 

답변

1

사용자 라 할 다음 Editext

<EditText 
    android:id="@+id/edit_text_left" 
    tools:hint="editTextLeft" 
    android:layout_width="0dp" 
    android:layout_weight="1" 
    android:inputType="text" 
    android:imeOptions="actionNext" 
    android:layout_height="wrap_content" /> 

에 포커스를 이동하기 위해 사용 android:imeOptions="actionNext" 시도 이런 yout이

<LinearLayout 
    xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:tools="http://schemas.android.com/tools" 
    android:orientation="horizontal" 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content"> 

    <EditText 
     android:id="@+id/edit_text_left" 
     tools:hint="editTextLeft" 
     android:layout_width="0dp" 
     android:layout_weight="1" 
     android:inputType="text" 
     android:imeOptions="actionNext" 
     android:layout_height="wrap_content" /> 

    <EditText   
     android:id="@+id/edit_text_right" 
     tools:hint="editTextRight" 
     android:layout_width="0dp" 
     android:layout_weight="1" 
     android:inputType="text" 
     android:imeOptions="actionNext" 
     android:layout_height="wrap_content" /> 

</LinearLayout>