use of com.gapcoder.weico.Title.Title in project weibo by dingdangmao123.
the class TitleAdapter method onCreateViewHolder.
@Override
public SnapViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View view = LayoutInflater.from(context).inflate(R.layout.titleitem, parent, false);
final SnapViewHolder h = new SnapViewHolder(view);
h.t1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
int p = h.getAdapterPosition();
Intent i = new Intent(context, Title.class);
i.putExtra("id", data.get(p).getId());
i.putExtra("title", data.get(p).getTitle());
context.startActivity(i);
}
});
return h;
}
use of com.gapcoder.weico.Title.Title 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