本文整理匯總了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();
}