private void initView(AttributeSet attrs)
{
edgePaint.setColor(DEFAULT_EDGE_COLOR);
edgePaint.setAntiAlias(true);
if (attrs != null)
{
TypedArray arr = getContext().obtainStyledAttributes(attrs, R.styleable.DepthView);
edgePaint.setColor(arr.getInt(R.styleable.DepthView_edge_color, DEFAULT_EDGE_COLOR));
setIsCircle(arr.getBoolean(R.styleable.DepthView_is_circle, false));
depth = arr.getDimension(R.styleable.DepthView_depth, DEFAULT_THICKNESS * getResources().getDisplayMetrics().density);
customShadowElevation = arr.getDimension(R.styleable.DepthView_custom_elevation, 0);
}
else
{
edgePaint.setColor(DEFAULT_EDGE_COLOR);
depth = DEFAULT_THICKNESS * getResources().getDisplayMetrics().density;
}
setOutlineProvider(new ViewOutlineProvider()
{
@Override
public void getOutline(View view, Outline outline)
{ }
});
}
DepthFAB.java 文件源码
java
阅读 25
收藏 0
点赞 0
评论 0
项目:Mire
作者:
评论列表
文章目录