2

I'm using EclipseADT to develop apps. Now, the emulator keyboard works fine and I'm able to enter the values in EditTexts, but the tab navigation doesn't work and it's cumbersome to click through each EditText when there are many fields. I've already ensured that the hardware is enabled in my device configuration as suggested in this answer:

hw.keyboard=yes

From my observation, this has started occurring since I also installed AndroidStudio besides Eclipse just to test this IDE. But after installing AS, I'd also updated the AndroidSDK, so it might be caused due to that also.

UPDATE: New Day Entry Screen

enter image description here

Community
  • 1
  • 1
Prahlad Yeri
  • 3,567
  • 4
  • 25
  • 55
  • If its cumbersome to do via a hardware keyboard, think how much worse it will be when its a user tapping each field. I'd look into reducing the number of fields. – Gabe Sechan Jun 08 '15 at 21:32
  • @GabeSechan See updated screenshot. The nature of this activity is such that it has a lot of fields! The user has no problems in tapping and entering the data, but its cumbersome for me to test this in the Android emulator. – Prahlad Yeri Jun 08 '15 at 21:39
  • Have you provided app level support as seen in https://developer.android.com/training/keyboard-input/navigation.html? Tab navigation isn't automatic. – Gabe Sechan Jun 08 '15 at 21:41
  • @GabeSechan Of course, the keyboard and navigation works on the actual device. But its only on the PC emulator that I'm facing this issue. – Prahlad Yeri Jun 08 '15 at 21:44

1 Answers1

0

This issue got resolved after I changed the layout xml of my activity as follows:

<RelativeLayout 
    xmlns:android="http://schemas.android.com/apk/res/android"
   xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/newdayLayout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context="com.prahladyeri.android.droidwells.NewDayActivity" >



    <TextView
        android:id="@+id/lblnewdaySiteName"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
        android:layout_centerHorizontal="true"
        android:text="Some very long site name"
        android:textStyle="bold" />

    <TextView
        android:id="@+id/lblnewdayDate"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:layout_below="@+id/lblnewdaySiteName"
        android:text="01/01/2015" />

    <Button
        android:id="@+id/cmdnewdayEditDate"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:layout_below="@+id/lblnewdayDate"
        android:text="Edit Date" />

        <Button
        android:id="@+id/cmdnewdaySave"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:text="SAVE" />


        <Button
        android:id="@+id/cmdnewdayCancel"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_toRightOf="@+id/cmdnewdaySave"
        android:layout_alignTop="@+id/cmdnewdaySave"
        android:text="Cancel" />


    <Button
        android:id="@+id/cmdnewdayTanks"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:layout_toRightOf="@+id/cmdnewdayCancel"
        android:layout_alignTop="@+id/cmdnewdayCancel"
        android:text="Tanks" />

</RelativeLayout>
Prahlad Yeri
  • 3,567
  • 4
  • 25
  • 55