0

I am working on EditText box. My problem is that I want to disable edittext box cursor at start when an activity popups I want when the editText box is clicked then the cursor should appear. I made use of setenabled(),setFocusable() etc. when I used this methods within the onCreate() the program crashes.

Any solutions Advance thanks

regards mysmax

1 Answers1

0

Disabling a text box makes it unclickable.

If you want to start your app but the cursor no to be sitting and blinking on it until the user clicks it then just change your setFoucs to something else. Or change up tab orders.

The best solution is to create a new textbox which is always not visible. then set focus to it upon load. They describe this method in this question Stop EditText from gaining focus at Activity startup

Voila!

Community
  • 1
  • 1
UPGRAYEDD
  • 415
  • 1
  • 8
  • 33