SpannableStringBuilder decorations not working in some devices . I am setting typeface, font color using SpannableStringBuilder in java code and setting in the textview .
Asked
Active
Viewed 101 times
-2
-
1Can you please post your code and the error log ? And why you post the rest of the problem as an answer? – Amine Apr 12 '19 at 10:57
-
2@Amine There were no error log . As I mentioned above only the decorations are not working that too in some devices . There is no error log for that . Regarding the code , the don't think there is need for some specific implementation . Any SpannableStringBuilder will work . I have posted separate question and answer because the problem is general but the solution is not . They may be other better solutions to it , I just posted the answer which worked for me. – ArpitA Apr 12 '19 at 11:21
1 Answers
2
This is happening because android:textAllCaps="" attribute removes the string decorations done using SpannableStringBuilder in some devices like Moto series. Remove the android:textAllCaps attribute

ArpitA
- 721
- 7
- 17
-
1Damnit, I was looking for this kind of answer, I searched a lot by myself and ten minutes ago, I found the problem and indeed it was "textAllCaps" – sokarcreative Jun 06 '19 at 13:42