use of cn.eoe.app.entity.NewsContentItem in project android-app by eoecn.
the class NewsFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreateView(inflater, container, savedInstanceState);
listview.setXListViewListener(this);
// construct the RelativeLayout
mAdapter = new MyAdapter();
mAdapter.appendToList(items_list);
listview.setAdapter(mAdapter);
listview.setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
// TODO Auto-generated method stub
NewsContentItem item = (NewsContentItem) mAdapter.getItem(position - 1);
startDetailActivity(mActivity, item.getDetail_url(), "资讯", item.getTitle());
}
});
return view;
}
Aggregations