use of cn.bingoogolapple.refreshlayout.demo.adapter.SwipeAdapterViewAdapter in project BGARefreshLayout-Android by bingoogolapple.
the class RefreshSwipeListViewFragment method setListener.
@Override
protected void setListener() {
mRefreshLayout.setDelegate(this);
mDataLv.setOnItemClickListener(this);
mDataLv.setOnItemLongClickListener(this);
mDataLv.setOnScrollListener(new AbsListView.OnScrollListener() {
@Override
public void onScrollStateChanged(AbsListView view, int scrollState) {
if (AbsListView.OnScrollListener.SCROLL_STATE_TOUCH_SCROLL == scrollState) {
mAdapter.closeOpenedSwipeItemLayoutWithAnim();
}
}
@Override
public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) {
}
});
mAdapter = new SwipeAdapterViewAdapter(mApp);
mAdapter.setOnItemChildClickListener(this);
mAdapter.setOnItemChildLongClickListener(this);
}
use of cn.bingoogolapple.refreshlayout.demo.adapter.SwipeAdapterViewAdapter in project BGARefreshLayout-Android by bingoogolapple.
the class SwipeListViewActivity method setListener.
@Override
protected void setListener() {
mRefreshLayout.setDelegate(this);
mDataLv.setOnItemClickListener(this);
mDataLv.setOnItemLongClickListener(this);
mDataLv.setOnScrollListener(new AbsListView.OnScrollListener() {
@Override
public void onScrollStateChanged(AbsListView view, int scrollState) {
if (AbsListView.OnScrollListener.SCROLL_STATE_TOUCH_SCROLL == scrollState) {
mAdapter.closeOpenedSwipeItemLayoutWithAnim();
}
}
@Override
public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) {
}
});
mAdapter = new SwipeAdapterViewAdapter(this);
mAdapter.setOnItemChildClickListener(this);
mAdapter.setOnItemChildLongClickListener(this);
findViewById(R.id.retweet).setOnClickListener(this);
findViewById(R.id.comment).setOnClickListener(this);
findViewById(R.id.praise).setOnClickListener(this);
}
Aggregations