本文整理汇总了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;
}
示例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;
}
示例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
}
示例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;
}
示例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;
}
});
}
示例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
}
示例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"));
}
});
}
示例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;
}
示例9: createRefreshHeader
import com.scwang.smartrefresh.layout.api.RefreshHeader; //导入依赖的package包/类
@NonNull
@Override
public RefreshHeader createRefreshHeader(Context context, RefreshLayout layout) {
return new BezierRadarHeader(context);
}
示例10: getRefreshHeader
import com.scwang.smartrefresh.layout.api.RefreshHeader; //导入依赖的package包/类
/**
* 获取顶部下拉组件的实现
*/
@Nullable
@Override
public RefreshHeader getRefreshHeader() {
return mRefreshHeader;
}
示例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);
}
示例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"));
}
示例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;
}
示例14: getRefreshHeader
import com.scwang.smartrefresh.layout.api.RefreshHeader; //导入依赖的package包/类
@Override
public RefreshHeader getRefreshHeader() {
return new ClassicsHeader(mContext);
}
示例15: getRefreshHeader
import com.scwang.smartrefresh.layout.api.RefreshHeader; //导入依赖的package包/类
@Override
public RefreshHeader getRefreshHeader() {
return null;
}