Android Question Problem with focus on EditText

Matteo Giorgini

Member
Licensed User
Hi,
I need to force lost focus in a "EditText" control.
My APP is deployed on a device with hardware keyboard and there is an integrated scanner that I use with intent.
My goal is use special keys for activate scanner, capture data, and put into "EditText".
By "Activity_KeyPress", I receive "KeyCode" and manage needed functions (for example, concat number on a label, backspace key or enter key).
I have read some posts about it, but I don't solved my issue.
I'm using B4A v11.80 (64 bit).

When Activity is created, I load layout by "LoadLayout" and "EditText" don't have focus!
On same activity there is a menù and by an item of this, I can open another activity. When I close this last, "EditText" has focus!
For solve this, I tried to create another "EditText" off limit of layout: new problem was born, because enter key of keyboard hardware isn't captured in "Activity_KeyPress".
Another attempt was to disable and enable "EditText", but doesn't solves.

Do you have any idea for how force "lost focus"?

Thanks in advance.

Best regards,
Matteo
 

Xfood

Expert
Licensed User
Ok, I will try. Today, I must find a workaround because because I don't have time to porting...

Many thanks!
Hi, have you by any chance found the solution to your problem?
I also have several focus management problems with terminals equipped with a hardware keyboard
 
Upvote 0

Matteo Giorgini

Member
Licensed User
Hi, I didn't have any time for switch to B4XPages; I managed a little bit of variables for my scope.
My goal was manage user input data from hardware keyboard, soft keyboard and from scanner (by intent).
Best regards,
Matteo
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…