AlertDialog setTitle - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for AlertDialog setTitle method.

This code example shows how to use the following methods:setButton, setMessage, setTitle, dismiss, isShowing
            dialog = new AlertDialog.Builder(context)
                    .setPositiveButton(android.R.string.ok, disconnectListener)
                    .setNegativeButton(android.R.string.cancel, null)
                    .create();
        } else { 
            if (dialog.isShowing()) {
                dialog.dismiss();
            } 
            // use disconnectListener for the correct profile(s) 
            CharSequence okText = context.getText(android.R.string.ok);
            dialog.setButton(DialogInterface.BUTTON_POSITIVE,
                    okText, disconnectListener);
        } 
        dialog.setTitle(title);
        dialog.setMessage(message);
        dialog.show();
        return dialog;
    } 
 
    // TODO: wire this up to show connection errors... 
    static void showConnectingError(Context context, String name) {
9
CodeRank
This code example shows how to use the following methods:setTitle, setCancelable, setOnCancelListener, show, setIndeterminate
This code example shows how to use the following methods:setTitle, setIndeterminate
    @Override 
    public Dialog onCreateDialog(Bundle savedInstanceState) {
        Bundle args = getArguments();
        String title = args.getString(ARG_TITLE);
 
        ProgressDialog dialog = new ProgressDialog(getActivity());
        dialog.setIndeterminate(true);
        dialog.setTitle(title);
 
        return dialog;
    } 
} 
8
CodeRank
This code example shows how to use the following methods:setTitle, setCancelable, setIndeterminate, setMessage
 
    @Override 
    protected Dialog onCreateDialog(int id) {
        switch (id) {
            case DIALOG1_KEY: {
                ProgressDialog dialog = new ProgressDialog(this);
                dialog.setTitle("Indeterminate");
                dialog.setMessage("Please wait while loading...");
                dialog.setIndeterminate(true);
                dialog.setCancelable(true);
                return dialog;
            } 
            case DIALOG2_KEY: {
                ProgressDialog dialog = new ProgressDialog(this);
                dialog.setMessage("Please wait while loading...");
                dialog.setIndeterminate(true);
                dialog.setCancelable(true);
                return dialog;
            } 
        } 
8
CodeRank
This code example shows how to use the following methods:setTitle, setCancelable, setOnCancelListener, show, setIndeterminate
	// show the progress bar. 
	public static ProgressDialog showProgress(Context context,
			CharSequence title, CharSequence message, boolean indeterminate,
			boolean cancelable)
	{ 
		ProgressDialog dialog = new ProgressDialog(context);
		dialog.setTitle(title);
		dialog.setMessage(message);
		dialog.setIndeterminate(indeterminate);
		dialog.setCancelable(false);
		//dialog.setDefaultButton(false); 
		dialog.setOnCancelListener( new AlixPay.AlixOnCancelListener( (Activity)context ) );
 
		dialog.show();
		return dialog;
	} 
	 
	public static JSONObject string2JSON(String str, String split)
	{ 
		JSONObject json = new JSONObject();
7
CodeRank
This code example shows how to use the following methods:setTitle, setCancelable, setIndeterminate, setMessage
	} 
 
	@Override 
	public Dialog onCreateDialog(Bundle savedInstanceState) {
		setRetainInstance(true); 
		final ProgressDialog dialog = new ProgressDialog(getActivity());
		dialog.setTitle(mTitle);
		dialog.setMessage(mMessage);
		dialog.setIndeterminate(true);
		dialog.setCancelable(false);
 
		return dialog;
	} 
} 
7
CodeRank
This code example shows how to use the following methods:setButton, setTitle, show, setProgressStyle
		noticeDialog = builder.create();
		noticeDialog.show();
	} 
	 
	private static void showDownloadDialog(Context context) {
		  progressDialog   =  new ProgressDialog(context);
		  progressDialog.setTitle("Update software");
		  
		  progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
	progressDialog.setButton("Cancel", new OnClickListener() {
		 
		@Override 
		public void onClick(DialogInterface dialog, int which) {
 
			 dialog.dismiss();
			 interceptFlag = true;
			  
		} 
	}); 
	progressDialog.show();

8
CodeRank
This code example shows how to use the following methods:setTitle, setCancelable, show
			this.cv.put(this.getKey(), this.v.getTimeInMillis());
			if (this.ul != null) {
				this.ul.onUpdateValue(this);
			} 
			if (this.dt) {
				TimePickerDialog tpd = new TimePickerDialog(this.getContext(), this,
						this.v.get(Calendar.HOUR_OF_DAY), this.v.get(Calendar.MINUTE), true);
				tpd.setTitle(this.getTitle());
				tpd.setCancelable(true);
				tpd.show();
			} 
		} 
	} 
 
	@Override 
	public void onTimeSet(final TimePicker view, final int hourOfDay, final int minute) {
		this.v.set(Calendar.HOUR_OF_DAY, hourOfDay);
		this.v.set(Calendar.MINUTE, minute);
		this.cv.put(this.getKey(), this.v.getTimeInMillis());
		if (this.ul != null) {
7
CodeRank
This code example shows how to use the following methods:setTitle, setCancelable, setOnCancelListener, show, setIndeterminate
This code example shows how to use the following methods:setButton, setTitle, show, setProgressStyle
		noticeDialog = builder.create();
		noticeDialog.show();
	} 
	 
	private static void showDownloadDialog(Context context) {
		  progressDialog   =  new ProgressDialog(context);
		  progressDialog.setTitle("Update software");
		  
		  progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
	progressDialog.setButton("Cancel", new OnClickListener() {
		 
		@Override 
		public void onClick(DialogInterface dialog, int which) {
 
			 dialog.dismiss();
			 interceptFlag = true;
			  
		} 
	}); 
	progressDialog.show();

8
CodeRank

Related AlertDialog setTitle Questions & Answers:

Other AlertDialog setTitle Examples

66:	
67:			// Setting Dialog Title
68:			alertDialog.setTitle(title);
69:	
70:			// Setting Dialog Message

Read More

20:	
21:			// Setting Dialog Title
22:			alertDialog.setTitle(title);
23:	
24:			// Setting Dialog Message

Read More

18:	
19:			// Setting Dialog Title
20:			alertDialog.setTitle(title);
21:	
22:			// Setting Dialog Message

Read More

setTitle Method Overview
Set the title text for this dialog's window.
See Code Examples for other Android AlertDialog Methods: