mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-05-14 14:02:44 +00:00
fix rtl detection
This commit is contained in:
parent
a0caa00a1d
commit
f19ffa54c9
1 changed files with 2 additions and 2 deletions
|
@ -168,8 +168,8 @@ object LocaleUtils {
|
||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
fun isRtlLanguage(locale: Locale): Boolean {
|
fun isRtlLanguage(locale: Locale): Boolean {
|
||||||
val displayName = locale.displayName
|
val displayName = locale.getDisplayName(locale)
|
||||||
if (displayName.isEmpty()) return true
|
if (displayName.isEmpty()) return false
|
||||||
return when (Character.getDirectionality(displayName.codePointAt(0))) {
|
return when (Character.getDirectionality(displayName.codePointAt(0))) {
|
||||||
Character.DIRECTIONALITY_RIGHT_TO_LEFT, Character.DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC -> true
|
Character.DIRECTIONALITY_RIGHT_TO_LEFT, Character.DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC -> true
|
||||||
else -> false
|
else -> false
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue