當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。