AlertDialog setIcon - 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 setIcon method.

This code example shows how to use the following methods:setIcon, setTitle, setCancelable, setMax, setMessage
 
	public Checker(Context context, CheckerCallback<Boolean> callback) {
		mContext = context;
		mCallback = callback;
		if (mContext != null) {
			mProgressDialog = new ProgressDialog(mContext);
			mProgressDialog.setTitle("Checking dependencies");
			mProgressDialog.setMessage("Please wait...");
			mProgressDialog.setCancelable(false);
			mProgressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
			mProgressDialog.setMax(100);
			mProgressDialog.setIcon(0);
		} 
	} 
 
	@Override 
	protected void onPreExecute() { 
		super.onPreExecute(); 
		if (mProgressDialog != null) {
			mProgressDialog.show();
7
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:setIcon, setMessage, setTitle, setCancelable, show
			tvResult.setText(""); 
 
			Calendar now = Calendar.getInstance(); 
 
			DatePickerDialog datePicDlg =  
					new DatePickerDialog(Ch09DateTimeDialog.this, 
					dsListener,	now.get(Calendar.YEAR), 
					now.get(Calendar.MONTH),  
					now.get(Calendar.DAY_OF_MONTH)); 
			datePicDlg.setTitle("輸入日期"); 
			datePicDlg.setMessage("請輸入日期"); 
			datePicDlg.setIcon(android.R.drawable.ic_dialog_info); 
			datePicDlg.setCancelable(false); 
			datePicDlg.show(); 
		} 
	}; 
	 
    private OnDateSetListener dsListener = new OnDateSetListener() {    
		public void onDateSet (DatePicker view, int year,  
				               int monthOfYear, int dayOfMonth) { 
7
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:setIcon, setTitle, setCancelable, setMax, setMessage
	public ServerStopper(Context context, ServerStopperCallback<Boolean> callback, boolean startInBackground) {
		mContext = context;
		mCallback = callback;
		mStartInBackground = startInBackground;
		if (mContext != null && !mStartInBackground) {
			mProgressDialog = new ProgressDialog(mContext);
			mProgressDialog.setTitle("Stopping server");
			mProgressDialog.setMessage("Please wait...");
			mProgressDialog.setCancelable(false);
			mProgressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
			mProgressDialog.setMax(100);
			mProgressDialog.setIcon(0);
		} 
	} 
 
	@Override 
	protected void onPreExecute() { 
		super.onPreExecute(); 
		if (mProgressDialog != null && !mStartInBackground) {
			mProgressDialog.show();
7
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:setIcon, setTitle, setCancelable, show, setIndeterminate
	} 
	 
	@Override 
	protected void onPreExecute() { 
		 
		progressDialog = new ProgressDialog(activity);
		progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
		progressDialog.setIcon(android.R.drawable.ic_dialog_info);
		progressDialog.setTitle("Carregando...");
		progressDialog.setMessage("Obtendo palestras, aguarde...");
		progressDialog.setCancelable(false);
		progressDialog.setIndeterminate(true);
		progressDialog.show();
		 
	} 
	 
	@Override 
	protected void onPostExecute(String message) {
		progressDialog.dismiss();
		if(message != null) {
7
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:setIcon, setTitle, setCancelable, setMax, setMessage
 
	public DropbearRemover(Context context, DropbearRemoverCallback<Boolean> callback) {
		mContext = context;
		mCallback = callback;
		if (mContext != null) {
			mProgressDialog = new ProgressDialog(mContext);
			mProgressDialog.setTitle("Removing Dropbear");
			mProgressDialog.setMessage("Please wait...");
			mProgressDialog.setCancelable(false);
			mProgressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
			mProgressDialog.setMax(100);
			mProgressDialog.setIcon(0);
		} 
	} 
 
	@Override 
	protected void onPreExecute() { 
		if (ServerPage.mServerLock > 0) { 
			// ServerStopper 
			ServerStopper serverStopper = new ServerStopper(mContext, null);
7
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:setIcon, setTitle, setCancelable, setMax, setMessage
 
	public DropbearInstaller(Context context, DropbearInstallerCallback<Boolean> callback) {
		mContext = context;
		mCallback = callback;
		if (mContext != null) {
			mProgressDialog = new ProgressDialog(mContext);
			mProgressDialog.setTitle("Installing Dropbear");
			mProgressDialog.setMessage("Please wait...");
			mProgressDialog.setCancelable(false);
			mProgressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
			mProgressDialog.setMax(100);
			mProgressDialog.setIcon(0);
		} 
	} 
 
	@Override 
	protected void onPreExecute() { 
		super.onPreExecute(); 
		if (mProgressDialog != null) {
			mProgressDialog.show();
7
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:setIcon
	@Override 
	public void onColorChanged(final int color) {
		final AlertDialog dialog = (AlertDialog) getDialog();
		if (dialog == null) return;
		final Context context = getContext();
		dialog.setIcon(new BitmapDrawable(context.getResources(), getColorPreviewBitmap(context, color)));
	} 
	 
	public void setDefaultValue(final Object value) {
		if (!(value instanceof Integer)) return;
		mDefaultValue = (Integer) value;
	} 
 
	@Override 
	protected void onBindView(final View view) {
		super.onBindView(view);
		mView = view;
		setPreviewColor(); 
	} 
 
6
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:setIcon, setTitle, setCancelable, setIndeterminate, setMessage
	 
	@Override 
    protected Dialog onCreateDialog(int id) {
		switch(id){
			case PROGRESS_DIALOG:
			mProgressDialog = new ProgressDialog(this);
			DialogInterface.OnClickListener loadingButtonListener=new DialogInterface.OnClickListener() {
 
				@Override 
				public void onClick(DialogInterface dialog, int which) {
					dialog.dismiss();
					mAuthenticateTask.setLoginListener(null);
					 
				} 
			}; 
			mProgressDialog.setTitle("");
			mProgressDialog.setMessage("Signing in");
			mProgressDialog.setIcon(android.R.drawable.ic_dialog_info);
            mProgressDialog.setIndeterminate(true);
            mProgressDialog.setCancelable(false);

6
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:setIcon
    public String getMessage() {
        return message;
    } 
 
    protected void setIcon(int resource) {
        dialog.setIcon(resource);
    } 
 
    @Override 
    public void onCancel(DialogInterface dialogInterface) {
        if (callback != null) {
            callback.taskCancelled(message);
        } 
    } 
 
} 
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java

Related AlertDialog setIcon Questions & Answers:

Other AlertDialog setIcon Examples

72:			
73:			// Setting alert dialog icon
74:			alertDialog.setIcon((status) ? R.drawable.success : R.drawable.fail);
75:	
76:			// Setting OK Button

Read More

27:			if(status != null)
28:				// Setting alert dialog icon
29:				alertDialog.setIcon((status) ? R.drawable.success : R.drawable.fail);
30:	
31:			// Setting OK Button

Read More

25:			if(status != null)
26:				// Setting alert dialog icon
27:				alertDialog.setIcon((status) ? R.drawable.success : R.drawable.fail);
28:	
29:			// Setting OK Button

Read More

setIcon Method Overview
See Code Examples for other Android AlertDialog Methods: