Search in sources :

Example 1 with BlogContentItem

use of cn.eoe.app.entity.BlogContentItem in project android-app by eoecn.

the class BlogFragment method onCreateView.

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    super.onCreateView(inflater, container, savedInstanceState);
    listview.setXListViewListener(this);
    // construct the RelativeLayout
    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
            BlogContentItem item = (BlogContentItem) mAdapter.getItem(position - 1);
            startDetailActivity(mActivity, item.getDetail_url(), "博客", item.getTitle());
        }
    });
    return view;
}
Also used : OnItemClickListener(android.widget.AdapterView.OnItemClickListener) BlogContentItem(cn.eoe.app.entity.BlogContentItem) ImageView(android.widget.ImageView) TextView(android.widget.TextView) View(android.view.View) AdapterView(android.widget.AdapterView)

Aggregations

View (android.view.View)1 AdapterView (android.widget.AdapterView)1 OnItemClickListener (android.widget.AdapterView.OnItemClickListener)1 ImageView (android.widget.ImageView)1 TextView (android.widget.TextView)1 BlogContentItem (cn.eoe.app.entity.BlogContentItem)1