1
0
Fork 0

adjust font size

This commit is contained in:
sspanak 2024-11-29 21:33:56 +02:00 committed by Dimo Karaivanov
parent ef2ca89605
commit 014c6923fb
4 changed files with 18 additions and 22 deletions

View file

@ -8,6 +8,10 @@ public class SoftKeyAddWord extends SoftKey {
public SoftKeyAddWord(Context context, AttributeSet attrs) { super(context, attrs); } public SoftKeyAddWord(Context context, AttributeSet attrs) { super(context, attrs); }
public SoftKeyAddWord(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); } public SoftKeyAddWord(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); }
@Override protected float getTitleRelativeSize() { return 1; }
@Override protected float getSubTitleRelativeSize() { return 1; }
@Override protected String getTitle() { return ""; }
@Override @Override
protected boolean handleRelease() { protected boolean handleRelease() {
if (validateTT9Handler()) { if (validateTT9Handler()) {
@ -18,11 +22,6 @@ public class SoftKeyAddWord extends SoftKey {
return false; return false;
} }
@Override
protected String getTitle() {
return "";
}
@Override @Override
public void render() { public void render() {
super.render(); super.render();

View file

@ -17,17 +17,9 @@ public class SoftKeyBackspace extends SwipeableKey {
private final Handler waitForSwipe = new Handler(); private final Handler waitForSwipe = new Handler();
public SoftKeyBackspace(Context context) { public SoftKeyBackspace(Context context) { super(context); }
super(context); public SoftKeyBackspace(Context context, AttributeSet attrs) { super(context, attrs); }
} public SoftKeyBackspace(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); }
public SoftKeyBackspace(Context context, AttributeSet attrs) {
super(context, attrs);
}
public SoftKeyBackspace(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
private boolean isFastDeleteOn() { private boolean isFastDeleteOn() {
@ -35,6 +27,10 @@ public class SoftKeyBackspace extends SwipeableKey {
} }
@Override protected float getTitleRelativeSize() { return 1; }
@Override protected float getSubTitleRelativeSize() { return 1; }
/** /**
* When fast-delete is on, decrease the hold duration threshold for smoother operation. * When fast-delete is on, decrease the hold duration threshold for smoother operation.
*/ */

View file

@ -23,6 +23,9 @@ public class SoftKeySettings extends SwipeableKey {
this.mainView = mainView; this.mainView = mainView;
} }
@Override protected float getTitleRelativeSize() { return 1;}
@Override protected float getSubTitleRelativeSize() { return 1; }
// this key does not support holding at the moment, so just prevent it // this key does not support holding at the moment, so just prevent it
@Override protected float getHoldDurationThreshold() { return 1000; } @Override protected float getHoldDurationThreshold() { return 1000; }
@Override protected float getSwipeXThreshold(Context context) { return context.getResources().getDimensionPixelSize(R.dimen.numpad_key_height) * 0.75f; } @Override protected float getSwipeXThreshold(Context context) { return context.getResources().getDimensionPixelSize(R.dimen.numpad_key_height) * 0.75f; }

View file

@ -17,19 +17,17 @@ public class SoftKeyShift extends SoftKey {
super(context, attrs, defStyleAttr); super(context, attrs, defStyleAttr);
} }
@Override protected float getTitleRelativeSize() { return 1.7f; }
@Override protected float getSubTitleRelativeSize() { return getTitleRelativeSize(); }
@Override protected String getTitle() { return ""; }
@Override @Override
protected boolean handleRelease() { protected boolean handleRelease() {
return validateTT9Handler() && tt9.onKeyNextTextCase(false); return validateTT9Handler() && tt9.onKeyNextTextCase(false);
} }
@Override
protected String getTitle() {
return "";
}
@Override @Override
public void render() { public void render() {
setTextSize(36);
setTypeface(Typeface.DEFAULT_BOLD); setTypeface(Typeface.DEFAULT_BOLD);
super.render(); super.render();
setEnabled(tt9 != null && !tt9.isVoiceInputActive() && !tt9.isInputModePhone() && !tt9.isNumericModeSigned()); setEnabled(tt9 != null && !tt9.isVoiceInputActive() && !tt9.isInputModePhone() && !tt9.isNumericModeSigned());