Code example for Activity

Methods: startActivity

0
            builder.setNegativeButton(buttonText, new OnClickListener() {
 
                @Override 
                public void onClick(DialogInterface dialog, int which) {
                    dialog.dismiss();
                    activity.startActivity(intent);
                } 
            }); 
        } 
 
        return builder;
    } 
 
    public static AlertDialog.Builder newErrorHandlerDialog(final Activity activity, int titleId,
            String emailAddress, Exception error) {
        return newErrorHandlerDialog(activity, activity.getString(titleId), emailAddress, error);
    } 
 
    /** 
     * Creates a AlertDialog that shows a list of elements. The listener's onClick method gets 
     * called when the user taps a list item.