disabled the LF3 and LF4 keys in numeric modes
This commit is contained in:
parent
e8d2efa3ab
commit
41fd7fa51b
2 changed files with 9 additions and 4 deletions
|
|
@ -4,7 +4,6 @@ import android.content.Context;
|
|||
import android.util.AttributeSet;
|
||||
|
||||
import io.github.sspanak.tt9.R;
|
||||
import io.github.sspanak.tt9.preferences.settings.SettingsStore;
|
||||
import io.github.sspanak.tt9.ui.Vibration;
|
||||
|
||||
public class SoftKeyLF4 extends SwipeableKey {
|
||||
|
|
@ -44,7 +43,7 @@ public class SoftKeyLF4 extends SwipeableKey {
|
|||
|
||||
@Override
|
||||
protected String getTitle() {
|
||||
return "🌐";
|
||||
return tt9.isInputModeNumeric() ? "" : "🌐";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -67,6 +66,12 @@ public class SoftKeyLF4 extends SwipeableKey {
|
|||
@Override
|
||||
public void render() {
|
||||
super.render();
|
||||
setEnabled(tt9 != null && !tt9.isVoiceInputActive());
|
||||
|
||||
setEnabled(
|
||||
tt9 != null
|
||||
&& !tt9.isVoiceInputActive()
|
||||
&& !tt9.isNumericModeStrict()
|
||||
&& !tt9.isInputModePhone()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,6 +32,6 @@ public class SoftKeyShift extends SoftKey {
|
|||
setTextSize(30);
|
||||
setTypeface(Typeface.DEFAULT_BOLD);
|
||||
super.render();
|
||||
setEnabled(tt9 != null && !tt9.isVoiceInputActive());
|
||||
setEnabled(tt9 != null && !tt9.isVoiceInputActive() && !tt9.isInputModeNumeric());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue