You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hi,
there is a way to move the bubble to initial position?
when i click the bubble i display a popup window, but i need a way to move the bubble to upper left corner of the screen.
thanks in advance
The text was updated successfully, but these errors were encountered:
This is quite a late response but in case anyone else is still looking for a similar solution, after skimming over the WindowManager implementation I think that the following is a possible solution for moving the bubble:
// params to represent the new position
WindowManager.LayoutParams params = new WindowManager.LayoutParams(
WindowManager.LayoutParams.WRAP_CONTENT,
WindowManager.LayoutParams.WRAP_CONTENT,
WindowManager.LayoutParams.TYPE_PHONE,
WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE,
PixelFormat.TRANSLUCENT
);
params.gravity = Gravity.TOP | Gravity.LEFT;
params.x = 0;
params.y = 100;
// get instance of window manager and use it to update the bubble's position
bubble.getWindowManager().updateViewLayout(bubble, params);
// notify the bubble's layout coordinator
if (bubble.getLayoutCoordinator() != null) {
bubble.getLayoutCoordinator().notifyBubblePositionChanged(this, x, y);
}
hi,
there is a way to move the bubble to initial position?
when i click the bubble i display a popup window, but i need a way to move the bubble to upper left corner of the screen.
thanks in advance
The text was updated successfully, but these errors were encountered: