Code example for Handler

Methods: post

0
            } 
        } 
    } 
 
    public void showToast(final String msg) {
        mHandler.post(new Runnable() {
            @Override 
            public void run() { 
                Toast toast = Toast.makeText(FriendsList.this, msg, Toast.LENGTH_LONG);
                toast.show();
            } 
        }); 
    } 
 
    /** 
     * Definition of the list adapter 
     */ 
    public class FriendListAdapter extends BaseAdapter {
        private LayoutInflater mInflater;
        FriendsList friendsList;