Merge "Fix mini keyboard position"
This commit is contained in:
commit
0dd778f832
1 changed files with 5 additions and 3 deletions
|
@ -76,9 +76,11 @@ public class PopupMiniKeyboardView extends KeyboardView implements PopupPanel {
|
||||||
final int pointX = (mConfigShowMiniKeyboardAtTouchedPoint) ? tracker.getLastX()
|
final int pointX = (mConfigShowMiniKeyboardAtTouchedPoint) ? tracker.getLastX()
|
||||||
: parentKey.mX + parentKey.mWidth / 2;
|
: parentKey.mX + parentKey.mWidth / 2;
|
||||||
final int pointY = parentKey.mY;
|
final int pointY = parentKey.mY;
|
||||||
final int miniKeyboardX = pointX - miniKeyboard.getDefaultCoordX()
|
final int miniKeyboardLeft = pointX - miniKeyboard.getDefaultCoordX()
|
||||||
- container.getPaddingLeft()
|
+ parentKeyboardView.getPaddingLeft();
|
||||||
+ parentKeyboardView.getPaddingLeft() + mCoordinates[0];
|
final int miniKeyboardX = Math.max(0, Math.min(miniKeyboardLeft,
|
||||||
|
parentKeyboardView.getWidth() - miniKeyboard.getMinWidth()))
|
||||||
|
- container.getPaddingLeft() + mCoordinates[0];
|
||||||
final int miniKeyboardY = pointY - parentKeyboard.getVerticalGap()
|
final int miniKeyboardY = pointY - parentKeyboard.getVerticalGap()
|
||||||
- (container.getMeasuredHeight() - container.getPaddingBottom())
|
- (container.getMeasuredHeight() - container.getPaddingBottom())
|
||||||
+ parentKeyboardView.getPaddingTop() + mCoordinates[1];
|
+ parentKeyboardView.getPaddingTop() + mCoordinates[1];
|
||||||
|
|
Loading…
Reference in a new issue