Search in sources :

Example 1 with NodeListAdapter

use of com.codeest.geeknews.ui.vtex.adapter.NodeListAdapter in project GeekNews by codeestX.

the class NodeListActivity method initEventAndData.

@Override
protected void initEventAndData() {
    nodeName = getIntent().getStringExtra(Constants.IT_VTEX_NODE_NAME);
    setToolBar(toolBar, nodeName);
    mAdapter = new NodeListAdapter(mContext, new ArrayList<NodeListBean>());
    rvContent.setLayoutManager(new LinearLayoutManager(mContext));
    rvContent.setAdapter(mAdapter);
    swipeRefresh.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {

        @Override
        public void onRefresh() {
            mPresenter.getContent(nodeName);
        }
    });
    ivProgress.start();
    mPresenter.getContent(nodeName);
    mPresenter.getTopInfo(nodeName);
}
Also used : NodeListAdapter(com.codeest.geeknews.ui.vtex.adapter.NodeListAdapter) ArrayList(java.util.ArrayList) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager) SwipeRefreshLayout(android.support.v4.widget.SwipeRefreshLayout)

Aggregations

SwipeRefreshLayout (android.support.v4.widget.SwipeRefreshLayout)1 LinearLayoutManager (android.support.v7.widget.LinearLayoutManager)1 NodeListAdapter (com.codeest.geeknews.ui.vtex.adapter.NodeListAdapter)1 ArrayList (java.util.ArrayList)1