Skip to content
Snippets Groups Projects
Commit dbf4f2a5 authored by Yusuke Nojima's avatar Yusuke Nojima Committed by Android (Google) Code Review
Browse files

Merge "Pass the touch event in the top padding of keyboard."

parents f18bda60 5ec13092
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
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