public abstract class FloatingWindowController
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
FloatingWindowController.Listener |
Modifier and Type | Field and Description |
---|---|
protected android.content.Context |
context |
protected FloatingWindow |
floatingWindow |
protected int |
gravity |
protected int |
height |
private boolean |
isShown |
protected android.view.WindowManager.LayoutParams |
layoutParams |
protected FloatingWindowController.Listener |
listener |
protected int |
width |
protected int |
x |
protected int |
y |
Constructor and Description |
---|
FloatingWindowController(android.content.Context context) |
Modifier and Type | Method and Description |
---|---|
android.view.WindowManager.LayoutParams |
configFloatingWindowViewParams() |
abstract FloatingWindowView |
getFloatingWindowView() |
boolean |
hide()
internal call
getFloatingWindowView() |
boolean |
isShown() |
protected void |
onHide() |
void |
setFloatingWindowSize(int width,
int height) |
void |
setFloatingWindowXY(int x,
int y) |
FloatingWindowController |
setGravity(int gravity)
Set Floating Window gravity, before the show.
|
void |
setListener(FloatingWindowController.Listener listener) |
boolean |
show()
internal call
getFloatingWindowView() -> configFloatingWindowViewParams() |
protected android.content.Context context
protected FloatingWindow floatingWindow
private boolean isShown
protected android.view.WindowManager.LayoutParams layoutParams
protected int width
protected int height
protected int x
protected int y
protected int gravity
protected FloatingWindowController.Listener listener
public FloatingWindowController(@NonNull android.content.Context context)
public boolean isShown()
public boolean show()
getFloatingWindowView()
-> configFloatingWindowViewParams()
public boolean hide()
getFloatingWindowView()
public abstract FloatingWindowView getFloatingWindowView()
public void setFloatingWindowSize(int width, int height)
public void setFloatingWindowXY(int x, int y)
public FloatingWindowController setGravity(int gravity)
gravity
- WindowManager.LayoutParams.gravity
public android.view.WindowManager.LayoutParams configFloatingWindowViewParams()
public void setListener(FloatingWindowController.Listener listener)
protected void onHide()