use of com.scwang.smart.refresh.header.ClassicsHeader in project ManPinAPP by AnyMarvel.
the class BookRRecommendFImpl method bindView.
@Override
protected void bindView() {
super.bindView();
recommendRecyclerView = view.findViewById(R.id.mp_bookr_recommend_recyclerview);
bookRrefreshLayout = view.findViewById(R.id.bookr_recommend_refreshLayout);
bookRrefreshLayout.setRefreshFooter(new ClassicsFooter(requireContext()));
bookRrefreshLayout.setRefreshHeader(new ClassicsHeader(requireContext()));
}
use of com.scwang.smart.refresh.header.ClassicsHeader in project ManPinAPP by AnyMarvel.
the class BookRankListActivity method bindView.
@Override
protected void bindView() {
super.bindView();
recommendRecyclerView = findViewById(R.id.mp_bookr_recommend_recyclerview);
bookRrefreshLayout = findViewById(R.id.bookr_recommend_refreshLayout);
bookRrefreshLayout.setRefreshFooter(new ClassicsFooter(Objects.requireNonNull(getContext())));
bookRrefreshLayout.setRefreshHeader(new ClassicsHeader(Objects.requireNonNull(getContext())));
title = findViewById(R.id.mp_book_rank_list_title);
searchView = findViewById(R.id.bookr_fragment_search);
searchView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent searchIntent = new Intent(BookRankListActivity.this, SearchActivity.class);
startActivity(searchIntent);
}
});
bookRankLoading = findViewById(R.id.book_rank_loading);
errorButton = findViewById(R.id.mp_error_button);
errorButton.setVisibility(View.GONE);
errorButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
errorButton.setVisibility(View.GONE);
mPresenter.initBookRankListData(bookRankUrl);
}
});
}
use of com.scwang.smart.refresh.header.ClassicsHeader in project box by lany192.
the class BoxApplication method initRefreshView.
private void initRefreshView() {
// 设置全局的Header构建器
SmartRefreshLayout.setDefaultRefreshHeaderCreator((context, layout) -> {
// 全局设置主题颜色
layout.setPrimaryColorsId(R.color.refresh_head_background, R.color.refresh_head_text_color);
return new ClassicsHeader(context).setArrowResource(// .setTimeFormat(new DynamicTimeFormat("更新于 %s"));//指定为经典Header,默认是 贝塞尔雷达Header
R.drawable.vector_arrow_gray);
});
// 设置全局的Footer构建器
SmartRefreshLayout.setDefaultRefreshFooterCreator((context, layout) -> {
// 指定为经典Footer,默认是 BallPulseFooter
return new ClassicsFooter(context).setDrawableSize(20);
});
}
Aggregations