public ActionBarButtonBackground(int accentHeight, int strokeWidth, Integer strokeColor, Integer accentColor, Integer fillColor, Integer highlightColor, ActionBarOptions.ColorLayout colorLayout) {
super(new Drawable[] {
new PaintDrawable((strokeColor == null) ? DEFAULT_STROKE_COLOR : strokeColor),
new PaintDrawable((accentColor == null) ? DEFAULT_ACCENT_COLOR : accentColor),
new PaintDrawable((highlightColor == null) ? DEFAULT_HIGHLIGHT_COLOR : highlightColor),
new PaintDrawable((fillColor == null) ? DEFAULT_FILL_COLOR : fillColor)});
if(colorLayout.equals(ColorLayout.TOP)) {
setLayerInset(1, strokeWidth, strokeWidth, 0, 0);
setLayerInset(2, strokeWidth, accentHeight+strokeWidth, 0, 0);
setLayerInset(3, strokeWidth, accentHeight+strokeWidth, 0, strokeWidth);
}
else {
setLayerInset(1, strokeWidth, 0, 0, strokeWidth);
setLayerInset(2, strokeWidth, 0, 0, accentHeight+strokeWidth);
setLayerInset(3, strokeWidth, strokeWidth, 0, accentHeight+strokeWidth);
}
}
ActionBarButtonBackground.java 文件源码
java
阅读 22
收藏 0
点赞 0
评论 0
项目:InsanityRadio-Android
作者:
评论列表
文章目录