1
0
Fork 0

fixed voice input not being correctly indicated when it is on

This commit is contained in:
sspanak 2025-02-04 17:41:18 +02:00 committed by Dimo Karaivanov
parent 47f8545dfe
commit b49de6ddfb
2 changed files with 8 additions and 17 deletions

View file

@ -163,9 +163,9 @@ public class SoftKeyBackspace extends BaseSwipeableKey {
@Override @Override
public void render() { public void render() {
super.render();
if (tt9 != null) { if (tt9 != null) {
setEnabled(!tt9.isVoiceInputActive()); setEnabled(!tt9.isVoiceInputActive());
} }
super.render();
} }
} }

View file

@ -11,19 +11,10 @@ public class SoftKeyRF3 extends BaseSoftKeyWithIcons {
public SoftKeyRF3(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); } public SoftKeyRF3(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); }
private boolean isVoiceInputMissing() { private boolean isVoiceInputActive() { return tt9 != null && tt9.isVoiceInputActive(); }
return tt9 != null && tt9.isVoiceInputMissing(); private boolean isVoiceInputMissing() { return tt9 != null && tt9.isVoiceInputMissing(); }
} private boolean isTextEditingActive() { return tt9 != null && tt9.isTextEditingActive(); }
private boolean isTextEditingMissing() { return tt9 != null && tt9.isInputLimited(); }
private boolean isTextEditingMissing() {
return tt9 != null && tt9.isInputLimited();
}
private boolean isTextEditingActive() {
return tt9 != null && tt9.isTextEditingActive();
}
@Override @Override
@ -64,7 +55,7 @@ public class SoftKeyRF3 extends BaseSoftKeyWithIcons {
@Override @Override
protected String getTitle() { protected String getTitle() {
if (isTextEditingActive()) { if (isTextEditingActive() || isVoiceInputActive()) {
return ""; return "";
} }
@ -82,7 +73,7 @@ public class SoftKeyRF3 extends BaseSoftKeyWithIcons {
return R.drawable.ic_keyboard; return R.drawable.ic_keyboard;
} }
if (isTextEditingMissing() && !isVoiceInputMissing()) { if (isVoiceInputActive() || (isTextEditingMissing() && !isVoiceInputMissing())) {
return R.drawable.ic_fn_voice; return R.drawable.ic_fn_voice;
} }
@ -92,7 +83,7 @@ public class SoftKeyRF3 extends BaseSoftKeyWithIcons {
@Override @Override
protected int getHoldIcon() { protected int getHoldIcon() {
if (isTextEditingActive() || isTextEditingMissing() || isVoiceInputMissing()) { if (isVoiceInputActive() || isTextEditingActive() || isTextEditingMissing() || isVoiceInputMissing()) {
return -1; return -1;
} }