Code example for ArrayAdapter

Methods: getItem

0
        setListAdapter(mAdapter);
    } 
 
    @Override 
    protected void onListItemClick(ListView l, View v, int position, long id) {
        Tip tip = mAdapter.getItem(position);
        if (tip != null) {
            startActivity(tip.intent);
        } 
    } 
     
    /** 
     * Represents a single ListView tip & trick in the list of all tips. A 
     * {@link Tip} is basically a title and an Intent to the Activity demo-ing 
     * the tip & trick 
     *  
     * @author Cyril Mottier 
     */ 
    private static class Tip { 
        public String title;
        public Intent intent;