Last active
August 26, 2023 22:43
-
-
Save alierdogan7/11f9cfb24f5551c34191485fc764d4c0 to your computer and use it in GitHub Desktop.
Arabic tex view utilities
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SpannedString result = new SpannedString(""); | |
| for (int j=0;j<myString.length();j++){ | |
| Spannable wordtoSpan = new SpannableString(myString.substring(j,j+1)); | |
| if (arabicV.contains(myString.substring(j,j+1))) { | |
| wordtoSpan.setSpan(new ForegroundColorSpan(Color.parseColor("#FF0000")), | |
| 0, 1, 0); | |
| } | |
| else | |
| { | |
| wordtoSpan.setSpan(new ForegroundColorSpan(Color.parseColor( "#000000")), | |
| 0, 1, 0); | |
| } | |
| result = (SpannedString) TextUtils.concat(result,"",wordtoSpan); | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment