标签:rri bsp nload scroll load fresh onscroll com ppc
public class MainActivity extends AppCompatActivity{
RecyclerView mRecyclerView;
RecyclerAdapter mAdapter;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
mRecyclerView =findViewById(R.id.recyclelist);
mRecyclerView.setLayoutManager(new LinearLayoutManager(this));
mRecyclerView.setAdapter(mAdapter =new RecyclerAdapter(this, data.getDataList()));
mRecyclerView.addOnScrollListener(new UpPullRecyclerViewOnScrollListener(onScrollListener));
}
private UpPullOnScrollListener onScrollListener = new UpPullOnScrollListener() {
@Override
public void onLoadMoreData(http://www.amjmh.com/v/) {
Toast.makeText(MainActivity.this, "上拉更新了 ", Toast.LENGTH_SHORT).show();
}
@Override
public void onRefreshData() {
Toast.makeText(MainActivity.this, "下拉刷新了 ", Toast.LENGTH_SHORT).show();
}
};
}
---------------------
标签:rri bsp nload scroll load fresh onscroll com ppc
原文地址:https://www.cnblogs.com/liyanyan665/p/11299176.html