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