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 android.util.AttributeSet;
|
||||||
|
|
||||||
import io.github.sspanak.tt9.R;
|
import io.github.sspanak.tt9.R;
|
||||||
import io.github.sspanak.tt9.preferences.settings.SettingsStore;
|
|
||||||
import io.github.sspanak.tt9.ui.Vibration;
|
import io.github.sspanak.tt9.ui.Vibration;
|
||||||
|
|
||||||
public class SoftKeyLF4 extends SwipeableKey {
|
public class SoftKeyLF4 extends SwipeableKey {
|
||||||
|
|
@ -44,7 +43,7 @@ public class SoftKeyLF4 extends SwipeableKey {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String getTitle() {
|
protected String getTitle() {
|
||||||
return "🌐";
|
return tt9.isInputModeNumeric() ? "" : "🌐";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -67,6 +66,12 @@ public class SoftKeyLF4 extends SwipeableKey {
|
||||||
@Override
|
@Override
|
||||||
public void render() {
|
public void render() {
|
||||||
super.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);
|
setTextSize(30);
|
||||||
setTypeface(Typeface.DEFAULT_BOLD);
|
setTypeface(Typeface.DEFAULT_BOLD);
|
||||||
super.render();
|
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