Android Question Detect touch position in edittext

Blue.Sky

Active Member
Licensed User
Longtime User
Hi again
I use edittext and my app and handle clicking word
So i cannot use detect because it have prevent handle clicking
How do i detect touch position where user click there?
 

Blue.Sky

Active Member
Licensed User
Longtime User
I'm not completely sure of the question, but Activity has a Touch event that returns X/Y.
I know.If i use activity touch,so i cannot handle click of edittext and cannot detect word
 
Upvote 0

JonPM

Well-Known Member
Licensed User
Longtime User
Can you explain in different words what the problem is? It's difficult to clearly understand
 
Upvote 0

Blue.Sky

Active Member
Licensed User
Longtime User
Can you explain in different words what the problem is? It's difficult to clearly understand
I add edittext in fullscreen avitivty so we have not any free space for click or touch
When i click in edittext,i can detect word that click on it
 
Upvote 0

Blue.Sky

Active Member
Licensed User
Longtime User
Handle the click event and check EditText.SelectionStart value. You might need to wait a short while before the value gets updated. Use CallSubPlus for this.
It is good solution.In b4a dont exist CallSubPlus,where is it?or i have to implement it?
 
Upvote 0

Blue.Sky

Active Member
Licensed User
Longtime User
Handle the click event and check EditText.SelectionStart value. You might need to wait a short while before the value gets updated. Use CallSubPlus for this.
Erel i cannot detect x,y position in activity,because i click on edittext to selection part of text and get selection text
I use StartSelection and EndSelection for get clicked position but it is not correct completely
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…