Pass the touch event in the top padding of keyboard.
Bug: 5139932 Change-Id: Id176f92f69160f76ae7e0d46cb3d639080779497
This commit is contained in:
parent
d4c08d9be3
commit
5ec13092a5
1 changed files with 6 additions and 0 deletions
|
@ -132,6 +132,7 @@ public class KeyboardBuilder<KP extends KeyboardParams> {
|
|||
private int mCurrentY = 0;
|
||||
private Row mCurrentRow = null;
|
||||
private boolean mLeftEdge;
|
||||
private boolean mTopEdge;
|
||||
private Key mRightEdgeKey = null;
|
||||
private final KeyStyles mKeyStyles = new KeyStyles();
|
||||
|
||||
|
@ -650,6 +651,7 @@ public class KeyboardBuilder<KP extends KeyboardParams> {
|
|||
|
||||
private void startKeyboard() {
|
||||
mCurrentY += mParams.mTopPadding;
|
||||
mTopEdge = true;
|
||||
}
|
||||
|
||||
private void startRow(Row row) {
|
||||
|
@ -670,6 +672,7 @@ public class KeyboardBuilder<KP extends KeyboardParams> {
|
|||
setSpacer(mCurrentX, mParams.mHorizontalEdgesPadding);
|
||||
mCurrentY += mCurrentRow.mRowHeight;
|
||||
mCurrentRow = null;
|
||||
mTopEdge = false;
|
||||
}
|
||||
|
||||
private void endKey(Key key) {
|
||||
|
@ -678,6 +681,9 @@ public class KeyboardBuilder<KP extends KeyboardParams> {
|
|||
key.addEdgeFlags(Keyboard.EDGE_LEFT);
|
||||
mLeftEdge = false;
|
||||
}
|
||||
if (mTopEdge) {
|
||||
key.addEdgeFlags(Keyboard.EDGE_TOP);
|
||||
}
|
||||
mRightEdgeKey = key;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue