public CubeLoadingView(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
final TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.CubeLoadingView);
mShadowEnable = a.getBoolean(R.styleable.CubeLoadingView_shadowEnable, true);
MAIN_COLOR = a.getColor(R.styleable.CubeLoadingView_mainColor, MAIN_COLOR);
CEIL_COLOR = a.getColor(R.styleable.CubeLoadingView_ceilColor, CEIL_COLOR);
SHADOW_COLOR = a.getColor(R.styleable.CubeLoadingView_shadowColor, SHADOW_COLOR);
T = a.getInteger(R.styleable.CubeLoadingView_duration, T);
a.recycle();
mPaint = new Paint();
mPaint.setStyle(Paint.Style.FILL);
mOrigin = new Point();
mCubes = new ArrayList<>();
if (SDK_INT >= Build.VERSION_CODES.KITKAT) {
mCubePathCollection = new Path();
mShadowPathCollection = new Path();
mCeilPathCollection = new Path();
} else {
mCubePaths = new ArrayList<>();
mShadowPaths = new ArrayList<>();
mCeilPaths = new ArrayList<>();
}
}
CubeLoadingView.java 文件源码
java
阅读 35
收藏 0
点赞 0
评论 0
项目:CubeLoadingView
作者:
评论列表
文章目录