2012-02-29 62 views
0

在我的應用程序中,有兩個用於用戶名的編輯文本,另一個用於垂直方向的密碼。 當點擊第一個編輯文本時,看到ime選項'下一步'。 但點擊它不會將光標移動到下一個編輯字段。輸入法密鑰代碼下一個不能正常工作

下面給出佈局。

<LinearLayout 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:orientation="vertical" 
    android:paddingLeft="20dp" 
    android:paddingRight="20dp" 
    android:paddingTop="50dp" > 

    <EditText 
     android:id="@+id/email_mob_edit" 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
     android:hint="E-MAIL" 
     android:layout_marginBottom="-1dp" 
     android:singleLine="true" 
     android:background="@drawable/edit_text_top_boarder" 
     android:paddingLeft="5dp" 
     android:textColor="#2c2a29" 
     android:inputType="textEmailAddress"> 
    </EditText>  <ImageView 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
     android:background="@drawable/table_cell_seperator"/> 
    <EditText 
     android:id="@+id/password_edit" 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
     android:inputType="textPassword" 
     android:hint="PASSWORD" 
     android:singleLine="true" 
     android:textColor="#2c2a29" 
     android:background="@drawable/table_cell_bottom" 
     android:paddingLeft="5dp"/> 
</LinearLayout> 

<TextView 
    android:id="@+id/forgot_password_text" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:layout_marginTop="20dp" 
    android:gravity="center" 
    android:layout_gravity="center_horizontal" 
    android:textSize="16sp" 
    android:text="Glemt Password?" 
    android:textColor="#ffff"/> 

<TextView 
    android:id="@+id/invalid_alert_text" 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:layout_marginTop="10dp" 
    android:gravity="center" 
    android:text="Husk at udfylde e-mail/mobilnummer og password" 
    android:visibility="invisible" 
    android:textSize="16sp" 
    android:textColor="#ff0000"/> 

<Button 
    android:id="@+id/login_button" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:layout_marginTop="10dp" 
    android:gravity="center" 
    android:layout_gravity="center" 
    android:background="@drawable/login_xml" 
    android:textColor="#ffffff"/> 

回答

1

jibysthomas

寫這個屬性在屬性的EditText

android:nextFocusDown="@+id/password_edit" 

和replce的ID @ + ID/password_edit到在對的EditText要跳到旁邊

0

使用此

android:nextFocusForward="@+id/rest"//Targeted id 
android:inputType="textNoSuggestions" 
android:imeOptions="actionNext" 
出版社