-
Notifications
You must be signed in to change notification settings - Fork 624
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed text input on Android, fixed for older Android versions #7204
base: master
Are you sure you want to change the base?
Conversation
material
stylematerial
style
I've modified the build script of the android activity backend crate, #4920 can be closed. (I had been using the method provided in this issue) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for the PR. I'll need to try it out.
This is great because I don't have much experience with older Android and you seem to know better than me.
Perhaps in order to make the review simpler and if it's not too much to ask, could you split the PR in 3 different PR:
- The material changes
- The Support for old android
- The fix for the text input.
So that we can merge the changes independently and some may be easier than others.
Thanks!
// Try to locate javac and java | ||
let javac_java = env_var("JAVA_HOME") | ||
.map(|home| PathBuf::from(home).join("bin")) | ||
.map(|bin| (bin.join("javac"), bin.join("java"))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hope this also work on windows without the .exe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I have tested it, it works on Windows 10 indeed.
@@ -29,13 +29,13 @@ export global Elevation { | |||
|
|||
export global MaterialPalette { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe the change to the material style can be extracted into a different PR?
|
||
for (utf8_index, c) in in_str.char_indices() { | ||
if utf16_counter >= utf16_index { | ||
for (utf8_index, _) in in_str.char_indices() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this could be implemented with in_str.char_indices().skip(char_index).0
or something like that.
But are you sure UTF-32 is the right encoding in Java? I was under the impression it was UTF-16
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I made a mistake. I recovered it according to your original code.
I have recovered the |
I have failed to fix the last bug described in #7203 which is related to Unicode index handling, and will not make further modifications in my branch (and posts in the issue), unless it is really required to do something. I am not really good at Android application development. Support for old Android versions is done by asking Copilot (which had omitted a few things before I found them by myself), checking the documentation, modifying the Java code by myself, then trying to compile the Java helper with PS: I will not use the Copilot anymore. |
material
style
Fixes #7182 and part of #7203.
Note: #4973 may be closed by checking this version of Android build tools: #6695.