@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_list);
mContext = this;
users = getUsers();
swipeRefreshLayout = (SwipeRefreshLayout) findViewById(R.id.swipeRefreshLayout);
swipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
@Override
public void onRefresh() {
Toast.makeText(mContext, "Refresh success", Toast.LENGTH_LONG).show();
swipeRefreshLayout.setRefreshing(false);
}
});
mRecyclerView = (SwipeMenuRecyclerView) findViewById(R.id.listView);
mRecyclerView.setLayoutManager(new LinearLayoutManager(this));
// interpolator setting
mRecyclerView.setOpenInterpolator(new BounceInterpolator());
mRecyclerView.setCloseInterpolator(new BounceInterpolator());
mAdapter = new AppAdapter(this, users);
mRecyclerView.setAdapter(mAdapter);
}
DifferentRvActivity.java 文件源码
java
阅读 25
收藏 0
点赞 0
评论 0
项目:SwipeMenuRecyclerView-master
作者:
评论列表
文章目录