Fix another mismatched attribute in KeyboardView
This is a followup of Iea7f8f34. Bug: 5023981 Change-Id: I1135383ff0f0a2b8a5940d0d5c407fd01706a7f7main
parent
3e63fbe400
commit
619f707c95
|
@ -225,19 +225,17 @@ public class KeyboardView extends View implements PointerTracker.DrawingProxy {
|
||||||
mKeyBackground = a.getDrawable(R.styleable.KeyboardView_keyBackground);
|
mKeyBackground = a.getDrawable(R.styleable.KeyboardView_keyBackground);
|
||||||
if (a.hasValue(R.styleable.KeyboardView_keyLetterSize)) {
|
if (a.hasValue(R.styleable.KeyboardView_keyLetterSize)) {
|
||||||
mKeyLetterRatio = UNDEFINED_RATIO;
|
mKeyLetterRatio = UNDEFINED_RATIO;
|
||||||
mKeyLetterSize = a.getDimensionPixelSize(
|
mKeyLetterSize = a.getDimensionPixelSize(R.styleable.KeyboardView_keyLetterSize, 0);
|
||||||
R.styleable.KeyboardView_keyLetterRatio, 0);
|
|
||||||
} else {
|
} else {
|
||||||
mKeyLetterRatio = getRatio(a, R.styleable.KeyboardView_keyLetterRatio);
|
mKeyLetterRatio = getRatio(a, R.styleable.KeyboardView_keyLetterRatio);
|
||||||
}
|
}
|
||||||
mKeyLargeLetterRatio = getRatio(a, R.styleable.KeyboardView_keyLargeLetterRatio);
|
|
||||||
if (a.hasValue(R.styleable.KeyboardView_keyLabelSize)) {
|
if (a.hasValue(R.styleable.KeyboardView_keyLabelSize)) {
|
||||||
mKeyLabelRatio = UNDEFINED_RATIO;
|
mKeyLabelRatio = UNDEFINED_RATIO;
|
||||||
mKeyLabelSize = a.getDimensionPixelSize(
|
mKeyLabelSize = a.getDimensionPixelSize(R.styleable.KeyboardView_keyLabelSize, 0);
|
||||||
R.styleable.KeyboardView_keyLabelRatio, 0);
|
|
||||||
} else {
|
} else {
|
||||||
mKeyLabelRatio = getRatio(a, R.styleable.KeyboardView_keyLabelRatio);
|
mKeyLabelRatio = getRatio(a, R.styleable.KeyboardView_keyLabelRatio);
|
||||||
}
|
}
|
||||||
|
mKeyLargeLetterRatio = getRatio(a, R.styleable.KeyboardView_keyLargeLetterRatio);
|
||||||
mKeyHintLetterRatio = getRatio(a, R.styleable.KeyboardView_keyHintLetterRatio);
|
mKeyHintLetterRatio = getRatio(a, R.styleable.KeyboardView_keyHintLetterRatio);
|
||||||
mKeyUppercaseLetterRatio = getRatio(a,
|
mKeyUppercaseLetterRatio = getRatio(a,
|
||||||
R.styleable.KeyboardView_keyUppercaseLetterRatio);
|
R.styleable.KeyboardView_keyUppercaseLetterRatio);
|
||||||
|
@ -268,9 +266,9 @@ public class KeyboardView extends View implements PointerTracker.DrawingProxy {
|
||||||
public void updateKeyHeight(int keyHeight) {
|
public void updateKeyHeight(int keyHeight) {
|
||||||
if (mKeyLetterRatio >= 0.0f)
|
if (mKeyLetterRatio >= 0.0f)
|
||||||
mKeyLetterSize = (int)(keyHeight * mKeyLetterRatio);
|
mKeyLetterSize = (int)(keyHeight * mKeyLetterRatio);
|
||||||
mKeyLargeLetterSize = (int)(keyHeight * mKeyLargeLetterRatio);
|
|
||||||
if (mKeyLabelRatio >= 0.0f)
|
if (mKeyLabelRatio >= 0.0f)
|
||||||
mKeyLabelSize = (int)(keyHeight * mKeyLabelRatio);
|
mKeyLabelSize = (int)(keyHeight * mKeyLabelRatio);
|
||||||
|
mKeyLargeLetterSize = (int)(keyHeight * mKeyLargeLetterRatio);
|
||||||
mKeyHintLetterSize = (int)(keyHeight * mKeyHintLetterRatio);
|
mKeyHintLetterSize = (int)(keyHeight * mKeyHintLetterRatio);
|
||||||
mKeyUppercaseLetterSize = (int)(keyHeight * mKeyUppercaseLetterRatio);
|
mKeyUppercaseLetterSize = (int)(keyHeight * mKeyUppercaseLetterRatio);
|
||||||
mKeyHintLabelSize = (int)(keyHeight * mKeyHintLabelRatio);
|
mKeyHintLabelSize = (int)(keyHeight * mKeyHintLabelRatio);
|
||||||
|
|
Loading…
Reference in New Issue