Backspace is properly mirrored for RTL languages
This commit is contained in:
parent
79902e4e95
commit
f704dab97c
2 changed files with 19 additions and 2 deletions
|
|
@ -54,14 +54,18 @@ public class Characters {
|
|||
))
|
||||
));
|
||||
|
||||
public static boolean noEmojiSupported() {
|
||||
return Build.VERSION.SDK_INT < Build.VERSION_CODES.M;
|
||||
}
|
||||
|
||||
|
||||
public static int getEmojiLevels() {
|
||||
return (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) ? 1 : Emoji.size();
|
||||
return noEmojiSupported() ? 1 : Emoji.size();
|
||||
}
|
||||
|
||||
|
||||
public static ArrayList<String> getEmoji(int level) {
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
|
||||
if (noEmojiSupported()) {
|
||||
return new ArrayList<>(TextEmoticons);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,9 @@ package io.github.sspanak.tt9.ui.main.keys;
|
|||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
|
||||
import io.github.sspanak.tt9.languages.Characters;
|
||||
import io.github.sspanak.tt9.languages.Language;
|
||||
|
||||
public class SoftBackspaceKey extends SoftKey {
|
||||
|
||||
public SoftBackspaceKey(Context context) {
|
||||
|
|
@ -31,4 +34,14 @@ public class SoftBackspaceKey extends SoftKey {
|
|||
final protected boolean handleRelease() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getTitle() {
|
||||
if (Characters.noEmojiSupported()) {
|
||||
return "Del";
|
||||
}
|
||||
|
||||
Language language = getCurrentLanguage();
|
||||
return language != null && (language.isArabic() || language.isHebrew()) ? "⌦" : "⌫";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue