Giter Club home page Giter Club logo

Comments (4)

bingoogolapple avatar bingoogolapple commented on July 26, 2024
    private void initRefreshLayout(BGARefreshLayout refreshLayout) {
        mRefreshLayout = (BGARefreshLayout) findViewById(R.id.rl_modulename_refresh);
        // 为BGARefreshLayout设置代理
        mRefreshLayout.setDelegate(this);
        // 设置下拉刷新和上拉加载更多的风格     参数1:应用程序上下文,参数2:是否具有上拉加载更多功能
        BGARefreshViewHolder refreshViewHolder = new XXXImplRefreshViewHolder(this, true))
        // 设置下拉刷新和上拉加载更多的风格
        mRefreshLayout.setRefreshViewHolder(refreshViewHolder);


        // 为了增加下拉刷新头部和加载更多的通用性,提供了以下可选配置选项  -------------START
        // 设置正在加载更多时不显示加载更多控件
        // mRefreshLayout.setIsShowLoadingMoreView(false);
        // 设置正在加载更多时的文本
        refreshViewHolder.setLoadingMoreText(loadingMoreText);
        // 设置整个加载更多控件的背景颜色资源id
        refreshViewHolder.setLoadMoreBackgroundColorRes(loadMoreBackgroundColorRes);
        // 设置整个加载更多控件的背景drawable资源id
        refreshViewHolder.setLoadMoreBackgroundDrawableRes(loadMoreBackgroundDrawableRes);
        // 设置下拉刷新控件的背景颜色资源id
        refreshViewHolder.setRefreshViewBackgroundColorRes(refreshViewBackgroundColorRes);
        // 设置下拉刷新控件的背景drawable资源id
        refreshViewHolder.setRefreshViewBackgroundDrawableRes(refreshViewBackgroundDrawableRes);
        // 设置自定义头部视图(也可以不用设置)     参数1:自定义头部视图(例如广告位), 参数2:上拉加载更多是否可用
        mRefreshLayout.setCustomHeaderView(mBanner, false);
        // 可选配置  -------------END
    }

from bgarefreshlayout-android.

bingoogolapple avatar bingoogolapple commented on July 26, 2024

@zhiyou007

// 参数2:是否具有上拉加载更多功能
BGARefreshViewHolder refreshViewHolder = new XXXImplRefreshViewHolder(this, true))

// 开启上拉加载更多功能时,设置正在加载更多时是否显示加载更多控件。如果没有开启上拉加载更多功能,此项设置无效
mRefreshLayout.setIsShowLoadingMoreView(false);

from bgarefreshlayout-android.

zhiyou007 avatar zhiyou007 commented on July 26, 2024

下拉加载更多的VIEW会浮动在那这个可以改么?下拉到最后,突然页面向上提一下,然后再出VIEW,感觉好不顺畅(强迫症),刚进行测试了下,加载都最后多拉几下,会让页面不能往上走,过一会又好了,不知道是不是哪里的BUG,还没开始研究代码,只是先测测

我看到你给的这些设置了,不显示加载更多的VIEW又觉得怪怪的,用户体验也不好

from bgarefreshlayout-android.

zhiyou007 avatar zhiyou007 commented on July 26, 2024

类似XListview的下拉加载更多,滑到底部就能看到加载更多的VIEW,然后加载完再隐藏,你现在的这个是到底部,然后上提listview,浮动加载更多的VIEW,这个时候加载慢的话,我往上滑VIEW会一直浮动在那,体验不是很好

from bgarefreshlayout-android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.