Code example for ListFragment

Methods: getListView, onStart, setListAdapter

0
        super(); 
    } 
 
    @Override 
    public void onStart() { 
        super.onStart(); 
        setListAdapter(mListAdapter);
        getListView().setOnItemClickListener(this);
        loadCategory(0); 
    } 
 
    @Override 
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        mListAdapter = new ArrayAdapter<String>(getActivity(), R.layout.headline_item,
                mHeadlinesList);
    } 
 
    /** 
     * Sets the listener that should be notified of headline selection events. 
     * @param listener the listener to notify.