3

How to configure the next button to change focus to the edit texts in the consecutive rows of the ListView.. I cannot use the android:nextFocusDown="@+id/...." since the edit texts have same id.

Sreekanth Karumanaghat
  • 3,383
  • 6
  • 44
  • 72

2 Answers2

0

try this and let me know If this is what u wanted?

 <EditText android:layout_height="wrap_content"
    android:layout_width="fill_parent" 
    android:imeOptions="actionDone"
    android:singleLine="true" />

actionDone imeOption doesn't work on EditText in Android 2.3

Community
  • 1
  • 1
Zohaib Brohi
  • 576
  • 1
  • 7
  • 15
0

To change focus of EditText in rows of ListView you can use following XML example:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout         xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="horizontal" >

    <EditText
        android:id="@+id/edit_1"
        android:nextFocusRight="@+id/edit_2"
        android:imeOptions="actionNext"
        />

    <EditText
        android:id="@+id/edit_2"
        android:nextFocusRight="@+id/edit_3"
        android:imeOptions="actionNext"
        />

   <EditText
        android:id="@+id/edit_3"
        android:nextFocusRight="@+id/edit_4"
        android:imeOptions="actionNext"
        />

   <EditText
        android:id="@+id/edit_4"
        android:nextFocusDown="@+id/edit_1"
        android:imeOptions="actionNext"
        />

</LinearLayout>
Maksym Kalin
  • 1,693
  • 16
  • 18