Search in sources :

Example 6 with SmoothRefreshLayout

use of me.dkzwm.widget.srl.SmoothRefreshLayout in project SmoothRefreshLayout by dkzwm.

the class TestOverScrollActivity method onCreate.

@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_test_overscroll);
    getSupportActionBar().setDisplayHomeAsUpEnabled(true);
    getSupportActionBar().setDisplayShowHomeEnabled(true);
    getSupportActionBar().setTitle(R.string.over_scroll);
    final SmoothRefreshLayout refreshLayout = findViewById(R.id.smoothRefreshLayout_test_over_scroll1);
    refreshLayout.setDisableLoadMore(false);
    refreshLayout.setDisablePerformRefresh(true);
    refreshLayout.setDisablePerformLoadMore(true);
    refreshLayout.setEnableKeepRefreshView(false);
    refreshLayout.getHeaderView().getView().setVisibility(View.GONE);
    refreshLayout.getFooterView().getView().setVisibility(View.GONE);
    final SmoothRefreshLayout refreshLayout2 = findViewById(R.id.smoothRefreshLayout_test_over_scroll2);
    refreshLayout2.setDisableLoadMore(false);
    refreshLayout2.setDisablePerformRefresh(true);
    refreshLayout2.setDisablePerformLoadMore(true);
    refreshLayout2.setEnableKeepRefreshView(false);
    refreshLayout2.getHeaderView().getView().setVisibility(View.GONE);
    refreshLayout2.getFooterView().getView().setVisibility(View.GONE);
}
Also used : SmoothRefreshLayout(me.dkzwm.widget.srl.SmoothRefreshLayout)

Aggregations

SmoothRefreshLayout (me.dkzwm.widget.srl.SmoothRefreshLayout)6 IRefreshView (me.dkzwm.widget.srl.extra.IRefreshView)3 View (android.view.View)2 Interpolator (android.view.animation.Interpolator)2 LinearLayoutManager (androidx.recyclerview.widget.LinearLayoutManager)2 RecyclerView (androidx.recyclerview.widget.RecyclerView)2 RefreshingListenerAdapter (me.dkzwm.widget.srl.RefreshingListenerAdapter)2 RecyclerViewAdapter (me.dkzwm.widget.srl.sample.adapter.RecyclerViewAdapter)2 ListView (android.widget.ListView)1 IRefreshViewCreator (me.dkzwm.widget.srl.IRefreshViewCreator)1 ClassicFooter (me.dkzwm.widget.srl.extra.footer.ClassicFooter)1 ClassicHeader (me.dkzwm.widget.srl.extra.header.ClassicHeader)1 HScaleLayoutManager (me.dkzwm.widget.srl.manager.HScaleLayoutManager)1 VScaleLayoutManager (me.dkzwm.widget.srl.manager.VScaleLayoutManager)1 ListViewAdapter (me.dkzwm.widget.srl.sample.adapter.ListViewAdapter)1