当前位置: 首页>>代码示例>>Java>>正文


Java RippleView类代码示例

本文整理汇总了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();
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:38,代码来源:BezierRadarHeader.java

示例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();
}
 
开发者ID:Brave-wan,项目名称:SmartRefresh,代码行数:37,代码来源:BezierRadarHeader.java

示例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();
}
 
开发者ID:scwang90,项目名称:SmartRefreshLayout,代码行数:38,代码来源:BezierRadarHeader.java


注:本文中的com.scwang.smartrefresh.layout.header.bezierradar.RippleView类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。