Skip to content

Commit

Permalink
fixed the OK key text not scalling when it should
Browse files Browse the repository at this point in the history
  • Loading branch information
sspanak committed Feb 2, 2025
1 parent c8c1fe7 commit b340058
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,13 @@
import android.view.KeyEvent;

public class SoftKeyOk extends SoftKey {
public SoftKeyOk(Context context) { super(context); }
public SoftKeyOk(Context context, AttributeSet attrs) { super(context, attrs); }
public SoftKeyOk(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); }

public SoftKeyOk(Context context) {
super(context);
}

public SoftKeyOk(Context context, AttributeSet attrs) {
super(context, attrs);
}

public SoftKeyOk(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
@Override protected String getTitle() {
CharSequence layoutTitle = getText();
return layoutTitle.length() == 0 ? "OK" : layoutTitle.toString();
}

@Override
Expand All @@ -30,7 +26,6 @@ protected boolean handleRelease() {
return false;
}


@Override
public void render() {
if (tt9 != null) {
Expand Down
4 changes: 1 addition & 3 deletions app/src/main/res/layout/panel_numpad_right.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,5 @@

<io.github.sspanak.tt9.ui.main.keys.SoftKeyOk
style="@style/TTheme.Numpad.Key.OK"
android:id="@+id/soft_key_numpad_ok"
android:text="OK"
tools:ignore="HardcodedText" />
android:id="@+id/soft_key_numpad_ok" />
</LinearLayout>

0 comments on commit b340058

Please sign in to comment.