Search in sources :

Example 1 with UserListAdapter

use of com.gapcoder.weico.UserList.UserListAdapter in project weibo by dingdangmao123.

the class FollowFG method CreateView.

@Override
public void CreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState, View v) {
    adapter = new UserListAdapter(data, getActivity());
    tl.setLayoutManager(new LinearLayoutManager(getActivity(), LinearLayoutManager.VERTICAL, false));
    tl.setAdapter(adapter);
    rf.setOnRefreshListener(new OnRefreshListener() {

        @Override
        public void onRefresh(RefreshLayout refreshlayout) {
            Refresh();
        }
    });
    rf.setOnLoadmoreListener(new OnLoadmoreListener() {

        @Override
        public void onLoadmore(RefreshLayout refreshlayout) {
            rf.finishLoadmore();
        }
    });
}
Also used : SmartRefreshLayout(com.scwang.smartrefresh.layout.SmartRefreshLayout) RefreshLayout(com.scwang.smartrefresh.layout.api.RefreshLayout) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager) OnLoadmoreListener(com.scwang.smartrefresh.layout.listener.OnLoadmoreListener) UserListAdapter(com.gapcoder.weico.UserList.UserListAdapter) OnRefreshListener(com.scwang.smartrefresh.layout.listener.OnRefreshListener)

Aggregations

LinearLayoutManager (android.support.v7.widget.LinearLayoutManager)1 UserListAdapter (com.gapcoder.weico.UserList.UserListAdapter)1 SmartRefreshLayout (com.scwang.smartrefresh.layout.SmartRefreshLayout)1 RefreshLayout (com.scwang.smartrefresh.layout.api.RefreshLayout)1 OnLoadmoreListener (com.scwang.smartrefresh.layout.listener.OnLoadmoreListener)1 OnRefreshListener (com.scwang.smartrefresh.layout.listener.OnRefreshListener)1