Closed hank-milliken closed 2 years ago
There is an issue in this because when we select the input field. Its focuses on that field. Whole text selection works when the input field is focused in. And the callback of "onFoucsChanged" trigger only when focusing out if already focused in. more than one-time focus doesn't trigger the "onFocusChanged". There is only one possibility at this time either the selectable feature or the edit feature.
I tried another way but it's another issue may occur. You can test with this apk. If you agree with this, I'll add this in this way. Sometimes, the issue occurs, and sometimes not. Please download the apk using this link
https://drive.google.com/file/d/17ys5oVgSJjEj3lzf1LDP6Nd9-QFzJkFy/view?usp=sharing
Hi, I have check the original app and it works there. Can you please use implementation from there?
If I see it correctly it is achvied by setting .setSelectAllOnFocus(true);
on the EditText
There is no EditText in Jetpack Compose. Please don't consider simple kotlin with xml. I tried the same behavior in Jetpack Compose but the problem is the same that I mentioned earlier
Hmm Understood. I have played around with the code. Can you please share the code what you have done for the provided APK?
I have played a little bit with the code I this is working for me
https://github.com/Minimalistic-Apps/price-converter/pull/42/commits/7735cbdcbcb6531bf521ac2d7bea4d3c674f3d92 (Second commit in the https://github.com/Minimalistic-Apps/price-converter/pull/42 PR)
I have commented out the BTC formatting logic, to make it easier to demonstrate the functionality.
An after I have implemented it I have found this solution that seems to work even better https://stackoverflow.com/a/72504219
I have tested it here, and it seems it works: https://github.com/Minimalistic-Apps/price-converter/pull/42/commits/01ae2e5bb23872f9c4a0cd5211716273adddf21e
How do you want to receive the code for this apk, Please let me know?
And please join Jira. It would be easy for us to communicate there on each ticket
Because I wanna do a discussion on other points too.
@hafizsaadiftikhar yes I am in jira, I have mentioned you in the relevant issue