A asigala Member Licensed User Longtime User Mar 26, 2013 #1 :sign0085: :sign0085: :sign0085: Hello. How can I cancel the focus state on a editText? Thank's in advance.
:sign0085: :sign0085: :sign0085: Hello. How can I cancel the focus state on a editText? Thank's in advance.
stevel05 Expert Licensed User Longtime User Mar 26, 2013 #2 There may be a simpler way, but in the past I've created a dummy edittext which is off screen or permanently hidden behind something else, with it's inputtype set to None so the keyboard doesn't display. When I want to hide the focus I'll call a sub something like: Code: Copy Sub HideFocus HiddenET.Text="" 'In case a keyboard is attached and something has been typed HiddenET.RequestFocus End Sub Upvote 0
There may be a simpler way, but in the past I've created a dummy edittext which is off screen or permanently hidden behind something else, with it's inputtype set to None so the keyboard doesn't display. When I want to hide the focus I'll call a sub something like: Code: Copy Sub HideFocus HiddenET.Text="" 'In case a keyboard is attached and something has been typed HiddenET.RequestFocus End Sub
A asigala Member Licensed User Longtime User Mar 26, 2013 #3 I've tried that and It doesn't blur the edittext Any other idea? Upvote 0
stevel05 Expert Licensed User Longtime User Mar 26, 2013 #4 I'm not sure what you mean by it 'doesn't blur the edit text' Upvote 0
stevel05 Expert Licensed User Longtime User Mar 26, 2013 #5 I couldn't remember exactly how I did it so I recreated it, see attached. The order of edittext on the layout is important. Attachments HideETFocus.zip HideETFocus.zip 7.2 KB · Views: 366 Last edited: Mar 26, 2013 Upvote 0
I couldn't remember exactly how I did it so I recreated it, see attached. The order of edittext on the layout is important.
A asigala Member Licensed User Longtime User Mar 27, 2013 #6 Thank you! :icon_clap: :icon_clap: Upvote 0
stevel05 Expert Licensed User Longtime User Apr 4, 2013 #7 Slightly easier method using a class. Upvote 0