Android Question EditText - Force done property not working?

Tony Tetley

Member
Licensed User
Longtime User
Using B4A version 5.20.

I placed an EditText control on my activity and set these properties:
Single line - unchecked
Input Type - Text
Wrap - checked
Force Done - checked

When the EditText control receives focus the keyboard appears but there is no done button, you have to use the back button to stop editing. Is this a bug or am I doing something wrong.
 

Lee Gillie CCP

Active Member
Licensed User
Longtime User
Consider there may be other things you want to do, as a user of this activity, with the keyboard. You may not even be finished editing the EditText control that brought you the keyboard. IMHO - It is appropriate that it NOT fold-up until the user so directs it with the back button.
 
Upvote 0

Tony Tetley

Member
Licensed User
Longtime User
Thank you for the reply. Maybe I did not understand the "Force done" property. The property hint says "Forces the virtual keyboard to show Done button" I thought this meant it would show a button on the keyboard that would indicate you were done editing the field that popped up the keyboard. I see no difference in the virtual keyboard with this property checked on or off.
 
Upvote 0

Lee Gillie CCP

Active Member
Licensed User
Longtime User
I suspect Single Line setting is conflicting with the Force Done? For an experiment, try checking Single Line.
 
Upvote 0

Tony Tetley

Member
Licensed User
Longtime User
Good call. checking single line does make the "Done" button appear in the keyboard. However, I have a multi-line text entry field and that makes is show only one line. When the first line wraps it disappears but is still in the text field and you can swipe it back down. Not a very pleasant user experience.

I think this may be a bug.
 
Upvote 0

Lee Gillie CCP

Active Member
Licensed User
Longtime User
I totally get it, but hope you also see the logical conflict.

I dunno... Getting creative... I suppose you could compensate via your own button? A "done" button on your layout that manually closes the keyboard (easy to do... search for this), and the button becomes visible while the text field receives focus (events for this). I suspect the trick is to delay making it invisible after text field has lost focus for at least a brief moment, because it looses focus when you click your done button.

Also - Having users hit the back button to close up the keyboard should NOT be unnatural to your Android users.

There may be some hints to take away from a general Android search, such as THIS
 
Last edited:
Upvote 0
Top