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


Java RefreshHeader类代码示例

本文整理汇总了Java中com.scwang.smartrefresh.layout.api.RefreshHeader的典型用法代码示例。如果您正苦于以下问题:Java RefreshHeader类的具体用法?Java RefreshHeader怎么用?Java RefreshHeader使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


RefreshHeader类属于com.scwang.smartrefresh.layout.api包,在下文中一共展示了RefreshHeader类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setRefreshHeader

import com.scwang.smartrefresh.layout.api.RefreshHeader; //导入依赖的package包/类
/**
 * 设置指定的Header
 */
@Override
public SmartRefreshLayout setRefreshHeader(RefreshHeader header, int width, int height) {
    if (header != null) {
        if (mRefreshHeader != null) {
            removeView(mRefreshHeader.getView());
        }
        this.mRefreshHeader = header;
        this.mHeaderHeightStatus = mHeaderHeightStatus.unNotify();
        if (header.getSpinnerStyle() == SpinnerStyle.FixedBehind) {
            this.addView(mRefreshHeader.getView(), 0, new LayoutParams(width, height));
        } else {
            this.addView(mRefreshHeader.getView(), width, height);
        }
    }
    return this;
}
 
开发者ID:scwang90,项目名称:SmartRefreshLayout,代码行数:20,代码来源:SmartRefreshLayout.java

示例2: setRefreshHeader

import com.scwang.smartrefresh.layout.api.RefreshHeader; //导入依赖的package包/类
/**
 * 设置指定的Header
 */
@Override
public SmartRefreshLayout setRefreshHeader(RefreshHeader header) {
    if (header != null) {
        if (mRefreshHeader != null) {
            removeView(mRefreshHeader.getView());
        }
        this.mRefreshHeader = header;
        this.mHeaderHeightStatus = mHeaderHeightStatus.unNotify();
        if (header.getSpinnerStyle() == SpinnerStyle.FixedBehind) {
            this.addView(mRefreshHeader.getView(), 0, new LayoutParams(MATCH_PARENT, WRAP_CONTENT));
        } else {
            this.addView(mRefreshHeader.getView(), MATCH_PARENT, WRAP_CONTENT);
        }
    }
    return this;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:20,代码来源:SmartRefreshLayout.java

示例3: createRefreshHeader

import com.scwang.smartrefresh.layout.api.RefreshHeader; //导入依赖的package包/类
@NonNull
@Override
public RefreshHeader createRefreshHeader(Context context, RefreshLayout layout) {
    ClassicsHeader header = new ClassicsHeader(context).setSpinnerStyle(SpinnerStyle.FixedBehind);
    header.setPrimaryColors(ContextCompat.getColor(context, R.color.colorPrimary), ContextCompat.getColor(context, android.R.color.white));
    return header;//指定为经典Header,默认是 贝塞尔雷达Header
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:8,代码来源:AssignDefaultUsingActivity.java

示例4: setRefreshHeader

import com.scwang.smartrefresh.layout.api.RefreshHeader; //导入依赖的package包/类
/**
 * 设置指定的Header
 */
@Override
public SmartRefreshLayout setRefreshHeader(RefreshHeader header) {
    if (mRefreshHeader != null) {
        removeView(mRefreshHeader.getView());
    }
    this.mRefreshHeader = header;
    this.mHeaderHeightStatus = mHeaderHeightStatus.unNotify();
    this.addView(mRefreshHeader.getView());
    return this;
}
 
开发者ID:Brave-wan,项目名称:SmartRefresh,代码行数:14,代码来源:SmartRefreshLayout.java

示例5: onCreate

import com.scwang.smartrefresh.layout.api.RefreshHeader; //导入依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();
    SmartRefreshLayout.setDefaultRefreshHeaderCreater(new DefaultRefreshHeaderCreater() {
        @NonNull
        @Override
        public RefreshHeader createRefreshHeader(Context context, RefreshLayout layout) {
            BezierRadarHeader header = new BezierRadarHeader(context);
            layout.setPrimaryColorsId(R.color.colorPrimary, android.R.color.white);
            return header;
        }
    });
}
 
开发者ID:Brave-wan,项目名称:SmartRefresh,代码行数:14,代码来源:App.java

示例6: createRefreshHeader

import com.scwang.smartrefresh.layout.api.RefreshHeader; //导入依赖的package包/类
@NonNull
@Override
public RefreshHeader createRefreshHeader(Context context, RefreshLayout layout) {
    ClassicsHeader header = new ClassicsHeader(context).setSpinnerStyle(SpinnerStyle.FixedBehind);
    header.setPrimaryColorId(R.color.colorPrimary);
    header.setAccentColorId(android.R.color.white);
    return header;//指定为经典Header,默认是 贝塞尔雷达Header
}
 
开发者ID:scwang90,项目名称:SmartRefreshLayout,代码行数:9,代码来源:AssignDefaultUsingActivity.java

示例7: restore

import com.scwang.smartrefresh.layout.api.RefreshHeader; //导入依赖的package包/类
private static void restore() {
    SmartRefreshLayout.setDefaultRefreshHeaderCreater(new DefaultRefreshHeaderCreater() {
        @NonNull
        @Override
        public RefreshHeader createRefreshHeader(Context context, RefreshLayout layout) {
            layout.setPrimaryColorsId(R.color.colorPrimary, android.R.color.white);//全局设置主题颜色
            return new ClassicsHeader(context).setTimeFormat(new DynamicTimeFormat("更新于 %s"));
        }
    });
}
 
开发者ID:scwang90,项目名称:SmartRefreshLayout,代码行数:11,代码来源:AssignDefaultUsingActivity.java

示例8: setRefreshHeader

import com.scwang.smartrefresh.layout.api.RefreshHeader; //导入依赖的package包/类
/**
 * 设置指定的Header
 */
public TwoLevelHeader setRefreshHeader(RefreshHeader header, int width, int height) {
    if (header != null) {
        if (mRefreshHeader != null) {
            removeView(mRefreshHeader.getView());
        }
        this.mRefreshHeader = header;
        if (header.getSpinnerStyle() == SpinnerStyle.FixedBehind) {
            this.addView(mRefreshHeader.getView(), 0, new LayoutParams(width, height));
        } else {
            this.addView(mRefreshHeader.getView(), width, height);
        }
    }
    return this;
}
 
开发者ID:scwang90,项目名称:SmartRefreshLayout,代码行数:18,代码来源:TwoLevelHeader.java

示例9: createRefreshHeader

import com.scwang.smartrefresh.layout.api.RefreshHeader; //导入依赖的package包/类
@NonNull
@Override
public RefreshHeader createRefreshHeader(Context context, RefreshLayout layout) {
    return new BezierRadarHeader(context);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:6,代码来源:SmartRefreshLayout.java

示例10: getRefreshHeader

import com.scwang.smartrefresh.layout.api.RefreshHeader; //导入依赖的package包/类
/**
 * 获取顶部下拉组件的实现
 */
@Nullable
@Override
public RefreshHeader getRefreshHeader() {
    return mRefreshHeader;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:9,代码来源:SmartRefreshLayout.java

示例11: createRefreshHeader

import com.scwang.smartrefresh.layout.api.RefreshHeader; //导入依赖的package包/类
@NonNull
@Override
public RefreshHeader createRefreshHeader(Context context, RefreshLayout layout) {
    layout.setPrimaryColorsId(R.color.colorPrimary, android.R.color.white);//全局设置主题颜色
    return new ClassicsHeader(context).setSpinnerStyle(SpinnerStyle.Translate);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:7,代码来源:App.java

示例12: createRefreshHeader

import com.scwang.smartrefresh.layout.api.RefreshHeader; //导入依赖的package包/类
@NonNull
@Override
public RefreshHeader createRefreshHeader(Context context, RefreshLayout layout) {
    layout.setPrimaryColorsId(R.color.colorPrimary, android.R.color.white);//全局设置主题颜色
    return new ClassicsHeader(context).setTimeFormat(new DynamicTimeFormat("更新于 %s"));
}
 
开发者ID:scwang90,项目名称:SmartRefreshLayout,代码行数:7,代码来源:App.java

示例13: getRefreshHeader

import com.scwang.smartrefresh.layout.api.RefreshHeader; //导入依赖的package包/类
public RefreshHeader getRefreshHeader(Context mContext) {
    MaterialHeader materialHeader = new MaterialHeader(mContext);
    materialHeader.setColorSchemeColors(mContext.getResources().getColor(R.color.colorTextBlack),
            mContext.getResources().getColor(R.color.colorTextBlackLight));
    return materialHeader;
}
 
开发者ID:AriesHoo,项目名称:FastLib,代码行数:7,代码来源:RefreshHeaderHelper.java

示例14: getRefreshHeader

import com.scwang.smartrefresh.layout.api.RefreshHeader; //导入依赖的package包/类
@Override
public RefreshHeader getRefreshHeader() {
    return new ClassicsHeader(mContext);
}
 
开发者ID:AriesHoo,项目名称:FastLib,代码行数:5,代码来源:NewsRefreshItemFragment.java

示例15: getRefreshHeader

import com.scwang.smartrefresh.layout.api.RefreshHeader; //导入依赖的package包/类
@Override
public RefreshHeader getRefreshHeader() {
    return null;
}
 
开发者ID:AriesHoo,项目名称:FastLib,代码行数:5,代码来源:FastRefreshLoadFragment.java


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