Android Question Edittext keypress

Status
Not open for further replies.

Ricky D

Well-Known Member
Licensed User
Longtime User
Is there a way to trap key presses in an edittext?
 

Star-Dust

Expert
Licensed User
Longtime User
Is there a way to trap key presses in an edittext?
This
B4X:
Sub EditText1_TextChanged (Old As String, New As String)
   ' old = old text insert
   ' new = actual text
End Sub
 
Upvote 0

Ricky D

Well-Known Member
Licensed User
Longtime User
This
B4X:
Sub EditText1_TextChanged (Old As String, New As String)
   ' old = old text insert
   ' new = actual text
End Sub
In Windows and I wrote a full autocomplete code so I guess I can't in Android
 
Upvote 0

Ricky D

Well-Known Member
Licensed User
Longtime User
The autocomplete fills the first entry as I type. I type a Albany Creek and Albion pop up. Type A all a's show, first one is A then lbany Creek is selected. On each keypress it drills down and adjusts the list. It's the selection of the the remaining part that looks impossible to do here
 
Upvote 0

Ricky D

Well-Known Member
Licensed User
Longtime User
So why is the question in the first post about key presses?

If you are using B4A v7.3 then you can call EditText.SetSelection to select part of the text.

For further discussion please start a new thread and make sure to better explain the question.
Because I want to make an autocomplete that behaves like what I created for b4ppc
 
Upvote 0

Star-Dust

Expert
Licensed User
Longtime User
Because I want to make an autocomplete that behaves like what I created for b4ppc
Send an image of what you created with b4ppc so it's clearer about what you mean.
Change title to Thread because your request is different from EditText but from AutoCompleteEditText.

Explain what you want to select: Are you in the selection the portion of the suggested text? All the text?
 
Upvote 0

Ricky D

Well-Known Member
Licensed User
Longtime User
Im
Send an image of what you created with b4ppc so it's clearer about what you mean.
Change title to Thread because your request is different from EditText but from AutoCompleteEditText.

Explain what you want to select: Are you in the selection the portion of the suggested text? All the text?
I'm at work
 
Upvote 0
Status
Not open for further replies.
Top