本文整理汇总了Java中com.scwang.smartrefresh.header.material.CircleImageView类的典型用法代码示例。如果您正苦于以下问题:Java CircleImageView类的具体用法?Java CircleImageView怎么用?Java CircleImageView使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
CircleImageView类属于com.scwang.smartrefresh.header.material包,在下文中一共展示了CircleImageView类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initView
import com.scwang.smartrefresh.header.material.CircleImageView; //导入依赖的package包/类
private void initView(Context context, AttributeSet attrs) {
setMinimumHeight(DensityUtil.dp2px(100));
mProgress = new MaterialProgressDrawable(context, this);
mProgress.setBackgroundColor(CIRCLE_BG_LIGHT);
mProgress.setAlpha(255);
mProgress.setColorSchemeColors(0xff0099cc,0xffff4444,0xff669900,0xffaa66cc,0xffff8800);
mCircleView = new CircleImageView(context,CIRCLE_BG_LIGHT);
mCircleView.setImageDrawable(mProgress);
mCircleView.setVisibility(View.GONE);
addView(mCircleView);
final DisplayMetrics metrics = getResources().getDisplayMetrics();
mCircleDiameter = (int) (CIRCLE_DIAMETER * metrics.density);
mBezierPath = new Path();
mBezierPaint = new Paint();
mBezierPaint.setAntiAlias(true);
mBezierPaint.setStyle(Paint.Style.FILL);
TypedArray ta = context.obtainStyledAttributes(attrs, R.styleable.MaterialHeader);
mShowBezierWave = ta.getBoolean(R.styleable.MaterialHeader_mhShowBezierWave, mShowBezierWave);
mBezierPaint.setColor(ta.getColor(R.styleable.MaterialHeader_mhPrimaryColor, 0xff11bbff));
if (ta.hasValue(R.styleable.MaterialHeader_mhShadowRadius)) {
int radius = ta.getDimensionPixelOffset(R.styleable.MaterialHeader_mhShadowRadius, 0);
int color = ta.getColor(R.styleable.MaterialHeader_mhShadowColor, 0xff000000);
mBezierPaint.setShadowLayer(radius, 0, 0, color);
setLayerType(LAYER_TYPE_SOFTWARE, null);
}
ta.recycle();
}