swipeRefreshLayout基本用法

来源:互联网 发布:java招生 编辑:程序博客网 时间:2024/06/06 10:07
 swipeRefreshLayout基本用法:     
        swipeRefreshLayout=(SwipeRefreshLayout) findViewById(R.id.line_swipe_refresh) ;        swipeRefreshLayout.setColorSchemeResources(R.color.colorPrimary,R.color.colorPrimaryDark,R.color.colorAccent);        swipeRefreshLayout.setProgressViewOffset(false, 0,  (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 24, getResources().getDisplayMetrics()));        //记录在list列表中的偏移位置        swipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {            @Override            public void onRefresh() {                swipeRefreshLayout.setRefreshing(true);            }        });

0 0