Open hshah67 opened 7 years ago
Will you paste the code you wrote here?
getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() { @Override public void onGlobalLayout() {
int calculatedGravity = mGravity;
if (calculatedGravity == GRAVITY_AUTO) {
if (getHeight() < getMaxAvailableTopHeight(anchor)) {
calculatedGravity = GRAVITY_TOP;
} else {
calculatedGravity = GRAVITY_BOTTOM;
}
}
int x, y;
int[] locationOnScreen = new int[2];
anchor.getLocationOnScreen(locationOnScreen);
if (calculatedGravity == GRAVITY_TOP) {
**y = locationOnScreen[1] - getHeight();**
setArrowDirection(ArrowDirection.BOTTOM);
} else {
y = locationOnScreen[1] + anchor.getHeight();
setArrowDirection(ArrowDirection.TOP);
}
x = calculateXAndSetArrowPosition(anchor);
mPopupWindow.update(x, y, -1, -1);
getViewTreeObserver().removeOnGlobalLayoutListener(this);
}
});
here isssue is in getHeight(). in both device we are getting different value for getHeight() for bubblelayout.
@hshah67 @MasayukiSuda How to give margin from right to bubble view .
OS_7_0
Issue in showing bubble layout
OS_6_0