use of com.gapcoder.weico.Index.Adapter.TitleAdapter in project weibo by dingdangmao123.
the class TitleFG method CreateView.
@Override
public void CreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState, View v) {
adapter = new TitleAdapter(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();
}
});
search.setOnQueryTextListener(new SearchView.OnQueryTextListener() {
@Override
public boolean onQueryTextSubmit(String s) {
Intent i = new Intent(getActivity(), Title.class);
i.putExtra("title", s);
getActivity().startActivity(i);
return false;
}
@Override
public boolean onQueryTextChange(String s) {
return false;
}
});
}
Aggregations