本文整理汇总了Java中com.scwang.smartrefresh.layout.header.bezierradar.RippleView类的典型用法代码示例。如果您正苦于以下问题:Java RippleView类的具体用法?Java RippleView怎么用?Java RippleView使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
RippleView类属于com.scwang.smartrefresh.layout.header.bezierradar包,在下文中一共展示了RippleView类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initView
import com.scwang.smartrefresh.layout.header.bezierradar.RippleView; //导入依赖的package包/类
private void initView(Context context, AttributeSet attrs, int defStyleAttr) {
setMinimumHeight(DensityUtil.dp2px(100));
/**
* 初始化headView
*/
mWaveView = new WaveView(getContext());
mRippleView = new RippleView(getContext());
mDotView = new RoundDotView(getContext());
mProgressView = new RoundProgressView(getContext());
if (isInEditMode()) {
this.addView(mWaveView, MATCH_PARENT, MATCH_PARENT);
this.addView(mProgressView, MATCH_PARENT, MATCH_PARENT);
mWaveView.setHeadHeight(1000);
} else {
this.addView(mWaveView, MATCH_PARENT, MATCH_PARENT);
this.addView(mDotView, MATCH_PARENT, MATCH_PARENT);
this.addView(mProgressView, MATCH_PARENT, MATCH_PARENT);
this.addView(mRippleView, MATCH_PARENT, MATCH_PARENT);
mProgressView.setScaleX(0);
mProgressView.setScaleY(0);
}
TypedArray ta = context.obtainStyledAttributes(attrs, R.styleable.BezierRadarHeader);
mEnableHorizontalDrag = ta.getBoolean(R.styleable.BezierRadarHeader_srlEnableHorizontalDrag, mEnableHorizontalDrag);
int primaryColor = ta.getColor(R.styleable.BezierRadarHeader_srlPrimaryColor, 0);
int accentColor = ta.getColor(R.styleable.BezierRadarHeader_srlAccentColor, 0);
if (primaryColor != 0) {
setPrimaryColor(primaryColor);
}
if (accentColor != 0) {
setAccentColor(primaryColor);
}
ta.recycle();
}
示例2: initView
import com.scwang.smartrefresh.layout.header.bezierradar.RippleView; //导入依赖的package包/类
private void initView(Context context, AttributeSet attrs, int defStyleAttr) {
setMinimumHeight(DensityUtil.dp2px(100));
/**
* 初始化headView
*/
mWaveView = new WaveView(getContext());
mRippleView = new RippleView(getContext());
mDotView = new RoundDotView(getContext());
mProgressView = new RoundProgressView(getContext());
if (isInEditMode()) {
this.addView(mWaveView, MATCH_PARENT, MATCH_PARENT);
this.addView(mProgressView, MATCH_PARENT, MATCH_PARENT);
mWaveView.setHeadHeight(1000);
} else {
this.addView(mWaveView, MATCH_PARENT, MATCH_PARENT);
this.addView(mDotView, MATCH_PARENT, MATCH_PARENT);
this.addView(mProgressView, MATCH_PARENT, MATCH_PARENT);
this.addView(mRippleView, MATCH_PARENT, MATCH_PARENT);
mProgressView.setScaleX(0);
mProgressView.setScaleY(0);
}
TypedArray ta = context.obtainStyledAttributes(attrs, R.styleable.BezierRadarHeader);
int primaryColor = ta.getColor(R.styleable.BezierRadarHeader_srlPrimaryColor, 0);
int accentColor = ta.getColor(R.styleable.BezierRadarHeader_srlAccentColor, 0);
if (primaryColor != 0) {
setPrimaryColor(primaryColor);
}
if (accentColor != 0) {
setAccentColor(primaryColor);
}
ta.recycle();
}
示例3: initView
import com.scwang.smartrefresh.layout.header.bezierradar.RippleView; //导入依赖的package包/类
private void initView(Context context, AttributeSet attrs, int defStyleAttr) {
setMinimumHeight(DensityUtil.dp2px(100));
/**
* 初始化headView
*/
mWaveView = new WaveView(getContext());
mRippleView = new RippleView(getContext());
mDotView = new RoundDotView(getContext());
mProgressView = new RoundProgressView(getContext());
if (isInEditMode()) {
this.addView(mWaveView, MATCH_PARENT, MATCH_PARENT);
this.addView(mProgressView, MATCH_PARENT, MATCH_PARENT);
mWaveView.setHeadHeight(1000);
} else {
this.addView(mWaveView, MATCH_PARENT, MATCH_PARENT);
this.addView(mDotView, MATCH_PARENT, MATCH_PARENT);
this.addView(mProgressView, MATCH_PARENT, MATCH_PARENT);
this.addView(mRippleView, MATCH_PARENT, MATCH_PARENT);
mProgressView.setScaleX(0);
mProgressView.setScaleY(0);
}
TypedArray ta = context.obtainStyledAttributes(attrs, R.styleable.BezierRadarHeader);
mEnableHorizontalDrag = ta.getBoolean(R.styleable.BezierRadarHeader_srlEnableHorizontalDrag, mEnableHorizontalDrag);
int primaryColor = ta.getColor(R.styleable.BezierRadarHeader_srlPrimaryColor, 0);
int accentColor = ta.getColor(R.styleable.BezierRadarHeader_srlAccentColor, 0);
if (primaryColor != 0) {
setPrimaryColor(primaryColor);
}
if (accentColor != 0) {
setAccentColor(accentColor);
}
ta.recycle();
}