Closed wangxianming315 closed 5 years ago
No problem, what your actions were like? Actually it’s easy. Just select BOLD style then type in HELLO, then unselect BOLD but select UNDERLINE then type in world.
Or you can type in helloworld first then select hello then hit on BOLD, do the same to world part, then I think you’ll get what you want to see.
Try and let me know if it works for you.
Thanks.
Hello, thanks for your help. The second one works. But the first one doesn't. This is my problem. When I select BOLD and type 'Hello', the 'Hello' is bold. And then unselect BOLD and select UNDERLINE, type 'w' then the 'Hello' is now UNDERLINE not BOLD. So the entire word is now UNDERLINE. I want to apply multiple style while typing without space. Regards.
Got it I’ll check and get back to you.
Were you able to check it?
Please let me know if you can help me on this. Thanks.
Apologize for my late reply
I was busy with working recently hope I can have some time for it tonight.
Thank you very much.
This problem is happen because the style is apply to the whole "word" as I can see it happen when there's any auto complete word when typing. Try separate the word or complete it and edit them later work just fine.
Hi @satapon148 . thanks for looking into this issue. You are right and the style is applied to whole word. But I need to apply multiple style in one word while typing. Is this not possible?
yes it is possible to do that
Yes. I can get desired result by repeating to apply style to sub-selection of whole text after type full text. But this is not what I want. What I want is, for example in word 'ABC', I want to set 'A' as Bold and 'BC' as normal character. So first I will select Bold style and type 'A', it is ok now. Second I will unselect Bold and type 'B'. then the 'A' is changed to un-bold. This is my problem.
@wangxianming315 Sorry I tried but didn't reproduce. What's your phone? Can you try it on the android studio simulator to see if you can reproduce?
Here is another video for helloworld
Wow. This is what I want. My phone is HUAWEI. Let me test again.
I also tested on a Mi-5S, works like exactly the same.
FYI: I have such code in AREditText.java
this.setInputType(EditorInfo.TYPE_CLASS_TEXT | EditorInfo.TYPE_TEXT_FLAG_MULTI_LINE
| EditorInfo.TYPE_TEXT_FLAG_NO_SUGGESTIONS);
@satapon148 Thanks for stepping in. :)
I have tested Nexus 5X and Pixel 2 simulator. It works on Nexus 5x but not Pixel 2. Do you have any idea about this?
Sorry no... I tried on Pixel 2 simulator just now, it works as well.
How about your HUAWEI?
Then I think this is because I am using old version. Are you testing latest commit?
I am testing based on the latest code of master.
What is the API version of your Pixel 2 simulator? Mine is Android 9, API 28 My HUAWEI phone is Android 8.0, API 26 Nexus 5 simulator is API 25.
Pixel 2: API 26 Nexus 5: API 26 MI-5s: API 24
To test the demo project, should I open the ARE root folder?
Do you mean this?
Try using implementation project(':are')
instead of implementation 'com.github.chinalwb:are:0.1.6'
Hitting the sack.. I'll try to response to you ASAP for your future comments.
Thanks a lot for your interests on ARE.
Now I am able to run the project.
Ok. thanks for your effort for me. Have a good dream :)
So in my experience, it works on Pixel 2 API 26 but not working on Pixel 2 API 28. Please check it on Pixel 2 API 28 simulator when you are available. Thanks.
Okay thanks for the debugging.
Btw what’s your time zone?
I am in Shenyang. :) GMT+8. I usually work late. lol.
Really! I saw your profile just now. I usually sleep early but wake up late :)
Please let me know when you have any good news. :)
I’ll try to reproduce on SDK 28 tonight.
Thank you.
Reproduced on SDK 28. I'll check and fix.
Thank you!
Do you mind the auto-complete feature of the keyboard?
I found I disabled that before so it works on pre 28 versions.
The disable setting doesn't work on Android P, thus you see the bug.
I think you have been able to run the ARE project on your local, right?
If yes, please try to add this to AREditText.java#init()
, on line 97:
this.setInputType(EditorInfo.TYPE_CLASS_TEXT | EditorInfo.TYPE_TEXT_FLAG_MULTI_LINE
| EditorInfo.TYPE_TEXT_FLAG_NO_SUGGESTIONS | EditorInfo.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD);
Typeface typeface = Typeface.DEFAULT;
this.setTypeface(typeface);
With this setting, I am able to get the same behavior as the video of last night.
Yes. I am trying it now.
Wow. Now it works on both API 26 and 28. The auto-complete feature of the keyboard is now disabled on Android P too.
Yes, I believe I had tried to have that included but failed somehow, after that, I didn't get a chance to look into again ...
Hope it works for you.
Ok. Now I think everything works well as expected. I am going to close this issue now. Thank you very much for your effort. You are very smart guy. Have a good night. :)
Thanks for your kind words, I had tried hardly to find some guy as stupid as I, but now, I give up.
Good morning!
For example, I need to implement 2 styles(Bold, Underline) in one word 'HelloWorld' without space. Hello as Bold and World as Underline. Is this possible? I tested your demo app and when I try to click style button, it changes full word(without space) style. I hope to hear feedback from you. Thanks.