Code example for ListFragment

Methods: getListView, onStart, setListAdapter

0
        super(); 
    } 
 
    @Override 
    public void onStart() { 
        super.onStart(); 
        setListAdapter(mListAdapter);
        getListView().setOnItemClickListener(this);
        loadCategory(0); 
    } 
     
    void initData(){ 
    	ContentValues  values[]=new ContentValues[3];
    	 
    String names[]=new String[]{"Simth","Bob","Jack"};
    for(int i=0;i<3;i++){
    	values[i]=new ContentValues();
    	values[i].put(TargetEntry.COLUMN_NAME, names[i]);
    	values[i].put(TargetEntry.COLUMN_AGE, 18);
    	values[i].put(TargetEntry.COLUMN_PHONE, 110);