Code example for ListFragment

0
import android.widget.ListView; 
import android.widget.ImageView; 
import android.widget.TextView; 
import android.util.Log; 
 
public class CSSettingsList  extends ListFragment {
    private int index = 0;
    private ListItemSelectedListener selectedListener;
    private String TAG = "CSSettings";
 
    @Override 
    public void onListItemClick(ListView l, View v, int position, long id) {
		getListView().setChoiceMode(ListView.CHOICE_MODE_SINGLE);
		getListView().setItemChecked(position, true);
 
        index = position;
        selectedListener.onListItemSelected(position);
    } 
 
    @Override 
    public void onActivityCreated(Bundle savedInstanceState) {