fixed the OK key text not scalling when it should
This commit is contained in:
parent
c8c1fe79b4
commit
b340058861
2 changed files with 7 additions and 14 deletions
|
|
@ -5,17 +5,13 @@ import android.util.AttributeSet;
|
||||||
import android.view.KeyEvent;
|
import android.view.KeyEvent;
|
||||||
|
|
||||||
public class SoftKeyOk extends SoftKey {
|
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) {
|
@Override protected String getTitle() {
|
||||||
super(context);
|
CharSequence layoutTitle = getText();
|
||||||
}
|
return layoutTitle.length() == 0 ? "OK" : layoutTitle.toString();
|
||||||
|
|
||||||
public SoftKeyOk(Context context, AttributeSet attrs) {
|
|
||||||
super(context, attrs);
|
|
||||||
}
|
|
||||||
|
|
||||||
public SoftKeyOk(Context context, AttributeSet attrs, int defStyleAttr) {
|
|
||||||
super(context, attrs, defStyleAttr);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -30,7 +26,6 @@ public class SoftKeyOk extends SoftKey {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void render() {
|
public void render() {
|
||||||
if (tt9 != null) {
|
if (tt9 != null) {
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,5 @@
|
||||||
|
|
||||||
<io.github.sspanak.tt9.ui.main.keys.SoftKeyOk
|
<io.github.sspanak.tt9.ui.main.keys.SoftKeyOk
|
||||||
style="@style/TTheme.Numpad.Key.OK"
|
style="@style/TTheme.Numpad.Key.OK"
|
||||||
android:id="@+id/soft_key_numpad_ok"
|
android:id="@+id/soft_key_numpad_ok" />
|
||||||
android:text="OK"
|
|
||||||
tools:ignore="HardcodedText" />
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue