Search in sources :

Example 1 with ClassicsHeader

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()));
}
Also used : ClassicsHeader(com.scwang.smart.refresh.header.ClassicsHeader) ClassicsFooter(com.scwang.smart.refresh.footer.ClassicsFooter)

Example 2 with ClassicsHeader

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);
        }
    });
}
Also used : ClassicsHeader(com.scwang.smart.refresh.header.ClassicsHeader) Intent(android.content.Intent) IBookRankListView(com.mp.android.apps.book.view.IBookRankListView) ImageView(android.widget.ImageView) View(android.view.View) RecyclerView(androidx.recyclerview.widget.RecyclerView) TextView(android.widget.TextView) ClassicsFooter(com.scwang.smart.refresh.footer.ClassicsFooter)

Example 3 with ClassicsHeader

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);
    });
}
Also used : ClassicsHeader(com.scwang.smart.refresh.header.ClassicsHeader) ClassicsFooter(com.scwang.smart.refresh.footer.ClassicsFooter)

Aggregations

ClassicsFooter (com.scwang.smart.refresh.footer.ClassicsFooter)3 ClassicsHeader (com.scwang.smart.refresh.header.ClassicsHeader)3 Intent (android.content.Intent)1 View (android.view.View)1 ImageView (android.widget.ImageView)1 TextView (android.widget.TextView)1 RecyclerView (androidx.recyclerview.widget.RecyclerView)1 IBookRankListView (com.mp.android.apps.book.view.IBookRankListView)1