0

I am having a problem with text edits. I suppressed the keyboard from poping up on activity start, but how do I keep the cursor from being on the first edit text? I want the cursor to appear only when the editText field is clicked and when the activity starts.

<EditText
            android:id="@+id/stuff"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_below="@+id/stufflabel"
            android:layout_toRightOf="@+id/stuffpic"
            android:hint="@string/name_str"
            android:maxLength="20"
             />
user2206030
  • 69
  • 1
  • 10
  • Create a dummy element and set focus to it at startup. http://stackoverflow.com/questions/1555109/stop-edittext-from-gaining-focus-at-activity-startup – hiphopsmurf Mar 25 '13 at 20:51

2 Answers2

0

Kindly search the forum for similar posts.

one post i found is - Android: Force EditText to remove focus?

I hope you are looking for something similar !

enjoy :)

Community
  • 1
  • 1
Ashish Thukral
  • 1,445
  • 1
  • 16
  • 26
0

You can add a dummy EditText on inside layout of the XML file, so that the focus will get on that EditText and not on other EditText.

<EditText
    android:layout_width="0dp"
    android:layout_height="0dp" />
Agent RX
  • 31
  • 1