public interface IXUILayout
| Modifier and Type | Interface and Description |
|---|---|
static interface |
IXUILayout.HideRadiusSide |
| Modifier and Type | Field and Description |
|---|---|
static int |
HIDE_RADIUS_SIDE_BOTTOM |
static int |
HIDE_RADIUS_SIDE_LEFT |
static int |
HIDE_RADIUS_SIDE_NONE |
static int |
HIDE_RADIUS_SIDE_RIGHT |
static int |
HIDE_RADIUS_SIDE_TOP |
| Modifier and Type | Method and Description |
|---|---|
int |
getHideRadiusSide()
get the side that we have hidden the radius
|
int |
getRadius()
get the layout radius
|
float |
getShadowAlpha()
get the outline alpha we set
|
int |
getShadowColor() |
int |
getShadowElevation()
See
View.getElevation() |
void |
onlyShowBottomDivider(int bottomInsetLeft,
int bottomInsetRight,
int bottomDividerHeight,
int bottomDividerColor)
show bottom divider, and hide others
|
void |
onlyShowLeftDivider(int leftInsetTop,
int leftInsetBottom,
int leftDividerWidth,
int leftDividerColor)
show left divider, and hide others
|
void |
onlyShowRightDivider(int rightInsetTop,
int rightInsetBottom,
int rightDividerWidth,
int rightDividerColor)
show right divider, and hide others
|
void |
onlyShowTopDivider(int topInsetLeft,
int topInsetRight,
int topDividerHeight,
int topDividerColor)
show top divider, and hide others
|
void |
setBorderColor(int borderColor)
border color, if you don not set it, the layout will not draw the border
|
void |
setBorderWidth(int borderWidth)
border width, default is 1px, usually no need to set
|
void |
setBottomDividerAlpha(int dividerAlpha) |
boolean |
setHeightLimit(int heightLimit)
limit the height of a layout
|
void |
setHideRadiusSide(int hideRadiusSide)
in some case, we maybe hope the layout only have radius in one side.
|
void |
setLeftDividerAlpha(int dividerAlpha) |
void |
setOuterNormalColor(int color)
only available before android L
|
void |
setOutlineExcludePadding(boolean outlineExcludePadding)
determine if the outline contain the padding area, usually false
|
void |
setOutlineInset(int left,
int top,
int right,
int bottom)
inset the outline if needed
|
void |
setRadius(int radius)
set the layout radius
|
void |
setRadius(int radius,
int hideRadiusSide)
set the layout radius with one or none side been hidden
|
void |
setRadiusAndShadow(int radius,
int shadowElevation,
float shadowAlpha)
this method will determine the radius and shadow.
|
void |
setRadiusAndShadow(int radius,
int hideRadiusSide,
int shadowElevation,
float shadowAlpha)
this method will determine the radius and shadow with one or none side be hidden
|
void |
setRadiusAndShadow(int radius,
int hideRadiusSide,
int shadowElevation,
int shadowColor,
float shadowAlpha)
this method will determine the radius and shadow (support shadowColor if after android 9)with one or none side be hidden
|
void |
setRightDividerAlpha(int dividerAlpha) |
void |
setShadowAlpha(float shadowAlpha)
set the outline alpha, which will change the shadow
|
void |
setShadowColor(int shadowColor) |
void |
setShadowElevation(int elevation)
See
View.setElevation(float) |
void |
setShowBorderOnlyBeforeL(boolean showBorderOnlyBeforeL)
the shadow elevation only work after L, so we provide a downgrading compatible solutions for android 4.x
usually we use border, but the border may be redundant for android L+.
|
void |
setTopDividerAlpha(int dividerAlpha)
after config the border, sometimes we need change the alpha of divider with animation,
so we provide a method to individually change the alpha
|
void |
setUseThemeGeneralShadowElevation()
use the shadow elevation from the theme
|
boolean |
setWidthLimit(int widthLimit)
limit the width of a layout
|
void |
updateBottomDivider(int bottomInsetLeft,
int bottomInsetRight,
int bottomDividerHeight,
int bottomDividerColor)
config the bottom divider
|
void |
updateLeftDivider(int leftInsetTop,
int leftInsetBottom,
int leftDividerWidth,
int leftDividerColor)
config the left divider
|
void |
updateRightDivider(int rightInsetTop,
int rightInsetBottom,
int rightDividerWidth,
int rightDividerColor)
config the right divider
|
void |
updateTopDivider(int topInsetLeft,
int topInsetRight,
int topDividerHeight,
int topDividerColor)
config the top divider
|
static final int HIDE_RADIUS_SIDE_NONE
static final int HIDE_RADIUS_SIDE_TOP
static final int HIDE_RADIUS_SIDE_RIGHT
static final int HIDE_RADIUS_SIDE_BOTTOM
static final int HIDE_RADIUS_SIDE_LEFT
boolean setWidthLimit(int widthLimit)
widthLimit - boolean setHeightLimit(int heightLimit)
heightLimit - void setUseThemeGeneralShadowElevation()
void setOutlineExcludePadding(boolean outlineExcludePadding)
outlineExcludePadding - void setShadowElevation(int elevation)
View.setElevation(float)elevation - int getShadowElevation()
View.getElevation()void setShadowAlpha(float shadowAlpha)
shadowAlpha - float getShadowAlpha()
void setShadowColor(int shadowColor)
shadowColor - opaque colorint getShadowColor()
void setRadius(int radius)
radius - void setRadius(int radius,
int hideRadiusSide)
radius - hideRadiusSide - int getRadius()
void setOutlineInset(int left,
int top,
int right,
int bottom)
left - top - right - bottom - void setShowBorderOnlyBeforeL(boolean showBorderOnlyBeforeL)
showBorderOnlyBeforeL - void setHideRadiusSide(int hideRadiusSide)
hideRadiusSide - int getHideRadiusSide()
void setRadiusAndShadow(int radius,
int shadowElevation,
float shadowAlpha)
radius - shadowElevation - shadowAlpha - void setRadiusAndShadow(int radius,
int hideRadiusSide,
int shadowElevation,
float shadowAlpha)
radius - hideRadiusSide - shadowElevation - shadowAlpha - void setRadiusAndShadow(int radius,
int hideRadiusSide,
int shadowElevation,
int shadowColor,
float shadowAlpha)
radius - hideRadiusSide - shadowElevation - shadowColor - shadowAlpha - void setBorderColor(int borderColor)
borderColor - void setBorderWidth(int borderWidth)
borderWidth - void updateTopDivider(int topInsetLeft,
int topInsetRight,
int topDividerHeight,
int topDividerColor)
topInsetLeft - topInsetRight - topDividerHeight - topDividerColor - void updateBottomDivider(int bottomInsetLeft,
int bottomInsetRight,
int bottomDividerHeight,
int bottomDividerColor)
bottomInsetLeft - bottomInsetRight - bottomDividerHeight - bottomDividerColor - void updateLeftDivider(int leftInsetTop,
int leftInsetBottom,
int leftDividerWidth,
int leftDividerColor)
leftInsetTop - leftInsetBottom - leftDividerWidth - leftDividerColor - void updateRightDivider(int rightInsetTop,
int rightInsetBottom,
int rightDividerWidth,
int rightDividerColor)
rightInsetTop - rightInsetBottom - rightDividerWidth - rightDividerColor - void onlyShowTopDivider(int topInsetLeft,
int topInsetRight,
int topDividerHeight,
int topDividerColor)
topInsetLeft - topInsetRight - topDividerHeight - topDividerColor - void onlyShowBottomDivider(int bottomInsetLeft,
int bottomInsetRight,
int bottomDividerHeight,
int bottomDividerColor)
bottomInsetLeft - bottomInsetRight - bottomDividerHeight - bottomDividerColor - void onlyShowLeftDivider(int leftInsetTop,
int leftInsetBottom,
int leftDividerWidth,
int leftDividerColor)
leftInsetTop - leftInsetBottom - leftDividerWidth - leftDividerColor - void onlyShowRightDivider(int rightInsetTop,
int rightInsetBottom,
int rightDividerWidth,
int rightDividerColor)
rightInsetTop - rightInsetBottom - rightDividerWidth - rightDividerColor - void setTopDividerAlpha(int dividerAlpha)
dividerAlpha - [0, 255]void setBottomDividerAlpha(int dividerAlpha)
dividerAlpha - [0, 255]void setLeftDividerAlpha(int dividerAlpha)
dividerAlpha - [0, 255]void setRightDividerAlpha(int dividerAlpha)
dividerAlpha - [0, 255]void setOuterNormalColor(int color)
color -