public interface WindowCallbacks
Modifier and Type | Field and Description |
---|---|
static int |
RESIZE_MODE_DOCKED_DIVIDER |
static int |
RESIZE_MODE_FREEFORM |
static int |
RESIZE_MODE_INVALID |
Modifier and Type | Method and Description |
---|---|
boolean |
onContentDrawn(int offsetX,
int offsetY,
int sizeX,
int sizeY)
The content will now be drawn to these bounds.
|
void |
onPostDraw(DisplayListCanvas canvas)
Called after all the content has drawn and the callback now has the ability to draw something
on top of everything.
|
void |
onRequestDraw(boolean reportNextDraw)
Called to request the window to draw one frame.
|
void |
onWindowDragResizeEnd()
Called when a drag resize ends.
|
void |
onWindowDragResizeStart(Rect initialBounds,
boolean fullscreen,
Rect systemInsets,
Rect stableInsets,
int resizeMode)
Called when a drag resize starts.
|
void |
onWindowSizeIsChanging(Rect newBounds,
boolean fullscreen,
Rect systemInsets,
Rect stableInsets)
Called by the system when the window got changed by the user, before the layouter got called.
|
static final int RESIZE_MODE_INVALID
static final int RESIZE_MODE_FREEFORM
static final int RESIZE_MODE_DOCKED_DIVIDER
void onWindowSizeIsChanging(Rect newBounds, boolean fullscreen, Rect systemInsets, Rect stableInsets)
At the time the layouting has not happened yet.
newBounds
- The new window frame bounds.fullscreen
- Whether the window is currently drawing in fullscreen.systemInsets
- The current visible system insets for the window.stableInsets
- The stable insets for the window.void onWindowDragResizeStart(Rect initialBounds, boolean fullscreen, Rect systemInsets, Rect stableInsets, int resizeMode)
initialBounds
- The initial bounds where the window will be.fullscreen
- Whether the window is currently drawing in fullscreen.systemInsets
- The current visible system insets for the window.stableInsets
- The stable insets for the window.void onWindowDragResizeEnd()
boolean onContentDrawn(int offsetX, int offsetY, int sizeX, int sizeY)
void onRequestDraw(boolean reportNextDraw)
reportNextDraw
- Whether it should report when the requested draw finishes.void onPostDraw(DisplayListCanvas canvas)
ViewRootImpl.requestInvalidateRootRenderNode()
when this
content needs to be redrawn.canvas
- The canvas to draw on.