Code example for ListFragment

Methods: onListItemClick, startActivity

0
        new GetUserInboxTask().execute();
    } 
 
    @Override 
    public void onListItemClick(ListView l, View v, int position, long id) {
        super.onListItemClick(l, v, position, id);
 
        if (position == 0) {
 
            Bundle bundle = new Bundle();
            bundle.putString("inboxJSON", mJsonResult);
 
            Intent intent = new Intent(parentActivity, MessageInbox.class);
            intent.putExtras(bundle);
            startActivity(intent);
        } else if (position == 1) {
 
            Intent intent = new Intent(parentActivity, MessageSent.class);
            startActivity(intent);
        } else if (position == 2) {
 
            Intent intent = new Intent(parentActivity, SelectMessageContacts.class);
            startActivity(intent);
        } else if (position == 2) {
            Intent intent = new Intent(parentActivity, SelectMessageContacts.class);
            startActivity(intent);
        } 
    } 
 
    /** 
     * Uses the json result passed in, and populates the inbox of the