团队冲刺第十二天

今天增加下拉刷新功能:

<ProgressBar
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:visibility="visible"
        android:layout_gravity="center"
        android:indeterminateTint="@color/myred"
        android:id="@+id/progre"/>
        <com.scwang.smartrefresh.layout.SmartRefreshLayout
            android:id="@+id/refreshLayout"
            android:layout_width="match_parent"
            android:layout_height="match_parent">
            <androidx.recyclerview.widget.RecyclerView
                android:id="@+id/recycler"
                android:layout_width="match_parent"
                android:layout_height="match_parent" />

        </com.scwang.smartrefresh.layout.SmartRefreshLayout>

java代码:

 smartRefreshLayout.setOnRefreshListener(new OnRefreshListener() {
                 @Override
                 public void onRefresh(RefreshLayout refreshLayout) {
                     refreshXiaLa("xiala");
                     smartRefreshLayout.finishRefresh(2000);
                 }
             });

 明天完成上拉加载更多的功能

posted @ 2021-06-02 17:41  哦心有  阅读(12)  评论(0编辑  收藏  举报