mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
am 6ca0b371: Merge "Small clean up of KeyboardView.onMeasure"
* commit '6ca0b371de557b21dab5736802055cc367036f8d': Small clean up of KeyboardView.onMeasure
This commit is contained in:
commit
c77684d1aa
@ -196,13 +196,14 @@ public class KeyboardView extends View {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onMeasure(final int widthMeasureSpec, final int heightMeasureSpec) {
|
protected void onMeasure(final int widthMeasureSpec, final int heightMeasureSpec) {
|
||||||
if (mKeyboard != null) {
|
if (mKeyboard == null) {
|
||||||
// The main keyboard expands to the display width.
|
|
||||||
final int height = mKeyboard.mOccupiedHeight + getPaddingTop() + getPaddingBottom();
|
|
||||||
setMeasuredDimension(widthMeasureSpec, height);
|
|
||||||
} else {
|
|
||||||
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
|
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
// The main keyboard expands to the entire this {@link KeyboardView}.
|
||||||
|
final int width = mKeyboard.mOccupiedWidth + getPaddingLeft() + getPaddingRight();
|
||||||
|
final int height = mKeyboard.mOccupiedHeight + getPaddingTop() + getPaddingBottom();
|
||||||
|
setMeasuredDimension(width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
x
Reference in New Issue
Block a user