Skip to content
Snippets Groups Projects
Commit 6b9677d8 authored by Tadashi G. Takaoka's avatar Tadashi G. Takaoka Committed by Android (Google) Code Review
Browse files

Merge "Small fix to KeyboardView" into jb-mr1-dev

parents b9770cb7 edf7990e
No related branches found
No related tags found
No related merge requests found
......@@ -255,10 +255,12 @@ public class KeyboardView extends View implements PointerTracker.DrawingProxy {
}
public void updateKeyHeight(int keyHeight) {
if (mKeyLetterRatio >= 0.0f)
if (mKeyLetterRatio >= 0.0f) {
mKeyLetterSize = (int)(keyHeight * mKeyLetterRatio);
if (mKeyLabelRatio >= 0.0f)
}
if (mKeyLabelRatio >= 0.0f) {
mKeyLabelSize = (int)(keyHeight * mKeyLabelRatio);
}
mKeyLargeLabelSize = (int)(keyHeight * mKeyLargeLabelRatio);
mKeyLargeLetterSize = (int)(keyHeight * mKeyLargeLetterRatio);
mKeyHintLetterSize = (int)(keyHeight * mKeyHintLetterRatio);
......@@ -340,13 +342,16 @@ public class KeyboardView extends View implements PointerTracker.DrawingProxy {
}
public void updateKeyHeight(int keyHeight) {
mPreviewTextSize = (int)(keyHeight * mPreviewTextRatio);
mKeyLetterSize = (int)(keyHeight * mKeyLetterRatio);
if (mPreviewTextRatio >= 0.0f) {
mPreviewTextSize = (int)(keyHeight * mPreviewTextRatio);
}
if (mKeyLetterRatio >= 0.0f) {
mKeyLetterSize = (int)(keyHeight * mKeyLetterRatio);
}
}
private static void setAlpha(Drawable drawable, int alpha) {
if (drawable == null)
return;
if (drawable == null) return;
drawable.setAlpha(alpha);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment