Search in sources :

Example 1 with NormalAdapterViewAdapter

use of cn.bingoogolapple.refreshlayout.demo.adapter.NormalAdapterViewAdapter in project BGARefreshLayout-Android by bingoogolapple.

the class RefreshGridViewFragment method setListener.

@Override
protected void setListener() {
    mRefreshLayout.setDelegate(this);
    mRefreshLayout.setRefreshScaleDelegate(new BGARefreshLayout.BGARefreshScaleDelegate() {

        @Override
        public void onRefreshScaleChanged(float scale, int moveYDistance) {
            Log.i(TAG, "scale:" + scale + " moveYDistance:" + moveYDistance);
        }
    });
    mDataGv.setOnItemClickListener(this);
    mDataGv.setOnItemLongClickListener(this);
    mDataGv.setOnScrollListener(new AbsListView.OnScrollListener() {

        @Override
        public void onScrollStateChanged(AbsListView view, int scrollState) {
            Log.i(TAG, "滚动状态变化");
        }

        @Override
        public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) {
            Log.i(TAG, "正在滚动");
        }
    });
    mAdapter = new NormalAdapterViewAdapter(mApp);
    mAdapter.setOnItemChildClickListener(this);
    mAdapter.setOnItemChildLongClickListener(this);
    getViewById(R.id.beginRefreshing).setOnClickListener(this);
    getViewById(R.id.beginLoadingMore).setOnClickListener(this);
}
Also used : NormalAdapterViewAdapter(cn.bingoogolapple.refreshlayout.demo.adapter.NormalAdapterViewAdapter) AbsListView(android.widget.AbsListView) BGARefreshLayout(cn.bingoogolapple.refreshlayout.BGARefreshLayout)

Example 2 with NormalAdapterViewAdapter

use of cn.bingoogolapple.refreshlayout.demo.adapter.NormalAdapterViewAdapter in project BGARefreshLayout-Android by bingoogolapple.

the class NormalListViewActivity method setListener.

@Override
protected void setListener() {
    mRefreshLayout.setDelegate(this);
    mDataLv.setOnItemClickListener(this);
    mDataLv.setOnItemLongClickListener(this);
    mAdapter = new NormalAdapterViewAdapter(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);
}
Also used : NormalAdapterViewAdapter(cn.bingoogolapple.refreshlayout.demo.adapter.NormalAdapterViewAdapter)

Example 3 with NormalAdapterViewAdapter

use of cn.bingoogolapple.refreshlayout.demo.adapter.NormalAdapterViewAdapter in project BGARefreshLayout-Android by bingoogolapple.

the class RefreshListViewFragment method setListener.

@Override
protected void setListener() {
    mRefreshLayout.setDelegate(this);
    // 设置正在加载更多时不显示加载更多控件
    // mRefreshLayout.setIsShowLoadingMoreView(false);
    mDataLv.setOnItemClickListener(this);
    mDataLv.setOnItemLongClickListener(this);
    mDataLv.setOnScrollListener(new AbsListView.OnScrollListener() {

        @Override
        public void onScrollStateChanged(AbsListView view, int scrollState) {
        // Log.i(TAG, "滚动状态变化");
        }

        @Override
        public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) {
        // Log.i(TAG, "正在滚动");
        }
    });
    mAdapter = new NormalAdapterViewAdapter(mApp);
    mAdapter.setOnItemChildClickListener(this);
    mAdapter.setOnItemChildLongClickListener(this);
}
Also used : NormalAdapterViewAdapter(cn.bingoogolapple.refreshlayout.demo.adapter.NormalAdapterViewAdapter) AbsListView(android.widget.AbsListView)

Example 4 with NormalAdapterViewAdapter

use of cn.bingoogolapple.refreshlayout.demo.adapter.NormalAdapterViewAdapter in project BGARefreshLayout-Android by bingoogolapple.

the class StickyNavListViewFragment method setListener.

@Override
protected void setListener() {
    mDataLv.setOnItemClickListener(this);
    mDataLv.setOnItemLongClickListener(this);
    mAdapter = new NormalAdapterViewAdapter(mApp);
    mAdapter.setOnItemChildClickListener(this);
    mAdapter.setOnItemChildLongClickListener(this);
}
Also used : NormalAdapterViewAdapter(cn.bingoogolapple.refreshlayout.demo.adapter.NormalAdapterViewAdapter)

Aggregations

NormalAdapterViewAdapter (cn.bingoogolapple.refreshlayout.demo.adapter.NormalAdapterViewAdapter)4 AbsListView (android.widget.AbsListView)2 BGARefreshLayout (cn.bingoogolapple.refreshlayout.BGARefreshLayout)1