public class FloatingWindow
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private android.view.WindowManager.LayoutParams |
layoutParams |
private int |
maxHeight |
private int |
maxWidth |
private int |
minHeight |
private int |
minWidth |
private FloatingWindowView |
view |
private android.view.WindowManager |
windowManager |
Constructor and Description |
---|
FloatingWindow(android.content.Context context) |
Modifier and Type | Method and Description |
---|---|
void |
addView()
Add from
setView(FloatingWindowView) ->view of to the window |
void |
addView(FloatingWindowView view,
android.view.WindowManager.LayoutParams layoutParams)
method internal operation
|
void |
checkMinMaxWidthHeight() |
android.view.WindowManager.LayoutParams |
getLayoutParams() |
int |
getLayoutParamsY() |
void |
removeView()
Remove from
setView(FloatingWindowView) ->view of to the window |
void |
removeView(FloatingWindowView view) |
void |
setLayoutParams(android.view.WindowManager.LayoutParams layoutParams) |
void |
setLayoutParamsFlags(int flags) |
void |
setLayoutParamsSize(int width,
int height) |
void |
setLayoutParamsSize(int width,
int height,
boolean widthIsAscending,
boolean heightIsAscending)
WARNING: param width/height not support
ViewGroup.LayoutParams.MATCH_PARENT or ViewGroup.LayoutParams.WRAP_CONTENT , see setLayoutParamsSize(int, int) support. |
void |
setLayoutParamsXY(int x,
int y,
boolean xIsAscending,
boolean yIsAscending)
WARNING: is ascending, x/y !=0 go job
|
void |
setMaxWidthHeight(int maxWidth,
int maxHeight)
*param all can use
C.PARAM_ORIGINAL keeping the original values *param all can use
C.PARAM_UNSET /C.PARAM_RESET unset/reset values |
void |
setMinWidthHeight(int minWidth,
int minHeight)
*param all can use
C.PARAM_ORIGINAL keeping the original values *param all can use
C.PARAM_UNSET /C.PARAM_RESET unset/reset values |
void |
setView(FloatingWindowView view)
set a floating window view for floating window
|
void |
updateViewLayout()
Update from
setView(FloatingWindowView) ->view of to the window |
private android.view.WindowManager windowManager
private FloatingWindowView view
private android.view.WindowManager.LayoutParams layoutParams
private int minWidth
private int minHeight
private int maxWidth
private int maxHeight
public void setView(FloatingWindowView view)
public void addView()
setView(FloatingWindowView)
->view of to the window At the same time need
from #setLayoutParams(LayoutParams)
->layoutParams
public void addView(FloatingWindowView view, android.view.WindowManager.LayoutParams layoutParams)
setView(view); setLayoutParams(layoutParams); addView();
view
- Floating Window ViewlayoutParams
- Window Manager Layout Paramspublic void updateViewLayout()
setView(FloatingWindowView)
->view of to the window At the same time
need from #setLayoutParams(LayoutParams)
->layoutParams
public void removeView(FloatingWindowView view)
public void removeView()
setView(FloatingWindowView)
->view of to the windowpublic void setLayoutParams(android.view.WindowManager.LayoutParams layoutParams)
layoutParams
- The LayoutParams to assign to view.public android.view.WindowManager.LayoutParams getLayoutParams()
public int getLayoutParamsY()
public void setLayoutParamsXY(int x, int y, boolean xIsAscending, boolean yIsAscending)
public void setMinWidthHeight(int minWidth, int minHeight)
C.PARAM_ORIGINAL
keeping the original values *param all can use
C.PARAM_UNSET
/C.PARAM_RESET
unset/reset valuespublic void setMaxWidthHeight(int maxWidth, int maxHeight)
C.PARAM_ORIGINAL
keeping the original values *param all can use
C.PARAM_UNSET
/C.PARAM_RESET
unset/reset valuespublic void checkMinMaxWidthHeight()
public void setLayoutParamsSize(int width, int height)
public void setLayoutParamsSize(int width, int height, boolean widthIsAscending, boolean heightIsAscending)
ViewGroup.LayoutParams.MATCH_PARENT
or ViewGroup.LayoutParams.WRAP_CONTENT
, see setLayoutParamsSize(int, int)
support.width
- relative width (!=0 go job)height
- relative height (!=0 go job)widthIsAscending
- base on origin width ascending (originWidth += width)heightIsAscending
- base on origin height ascending (originHeight += height)public void setLayoutParamsFlags(int flags)