Search in sources :

Example 1 with AtAdapter

use of com.gapcoder.weico.Message.Adapter.AtAdapter in project weibo by dingdangmao123.

the class AtFG method CreateView.

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

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

        @Override
        public void onLoadmore(RefreshLayout refreshlayout) {
            Refresh(0);
        }
    });
}
Also used : AtAdapter(com.gapcoder.weico.Message.Adapter.AtAdapter) 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) OnRefreshListener(com.scwang.smartrefresh.layout.listener.OnRefreshListener)

Aggregations

LinearLayoutManager (android.support.v7.widget.LinearLayoutManager)1 AtAdapter (com.gapcoder.weico.Message.Adapter.AtAdapter)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