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
public void render() {
super.render();
if (tt9 != null) {
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); }
private boolean isVoiceInputMissing() {
return tt9 != null && tt9.isVoiceInputMissing();
}
private boolean isTextEditingMissing() {
return tt9 != null && tt9.isInputLimited();
}
private boolean isTextEditingActive() {
return tt9 != null && tt9.isTextEditingActive();
}
private boolean isVoiceInputActive() { return tt9 != null && tt9.isVoiceInputActive(); }
private boolean isVoiceInputMissing() { return tt9 != null && tt9.isVoiceInputMissing(); }
private boolean isTextEditingActive() { return tt9 != null && tt9.isTextEditingActive(); }
private boolean isTextEditingMissing() { return tt9 != null && tt9.isInputLimited(); }
@Override
@ -64,7 +55,7 @@ public class SoftKeyRF3 extends BaseSoftKeyWithIcons {
@Override
protected String getTitle() {
if (isTextEditingActive()) {
if (isTextEditingActive() || isVoiceInputActive()) {
return "";
}
@ -82,7 +73,7 @@ public class SoftKeyRF3 extends BaseSoftKeyWithIcons {
return R.drawable.ic_keyboard;
}
if (isTextEditingMissing() && !isVoiceInputMissing()) {
if (isVoiceInputActive() || (isTextEditingMissing() && !isVoiceInputMissing())) {
return R.drawable.ic_fn_voice;
}
@ -92,7 +83,7 @@ public class SoftKeyRF3 extends BaseSoftKeyWithIcons {
@Override
protected int getHoldIcon() {
if (isTextEditingActive() || isTextEditingMissing() || isVoiceInputMissing()) {
if (isVoiceInputActive() || isTextEditingActive() || isTextEditingMissing() || isVoiceInputMissing()) {
return -1;
}