Code example for ListView

Methods: setItemChecked

0
        setListAdapter(mNotesAdapter);
    } 
    @Override 
    public void onListItemClick (ListView l, View v, int position, long id) {
        Note note = mNotesAdapter.getItem(position);
        l.setItemChecked(position, true);
        if (note != null && mNoteClickListener != null) {
            mNoteClickListener.onClickNote(note);
        } 
    } 
    @Override 
    public void setListAdapter(ListAdapter adapter) {
        super.setListAdapter(adapter);
    } 
    public void setNotesAdapter(NotesAdapter adapter){
        mNotesAdapter = adapter;
        this.setListAdapter(adapter);
    } 
    public NotesAdapter getNotesAdapter(){ 
        return mNotesAdapter;
    }