Example usage for android.app ProgressDialog setMessage

List of usage examples for android.app ProgressDialog setMessage

Introduction

In this page you can find the example usage for android.app ProgressDialog setMessage.

Prototype

@Override
    public void setMessage(CharSequence message) 

Source Link

Usage

From source file:com.softminds.matrixcalculator.OperationFragments.AdjointFragment.java

@Override
public void onListItemClick(ListView L, View V, int position, long id) {
    ProgressDialog progressDialog = new ProgressDialog(getContext());
    progressDialog.setMessage(getString(R.string.Calculating));
    progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
    progressDialog.setIndeterminate(false);
    progressDialog.setCanceledOnTouchOutside(false);
    progressDialog.show();//  w  ww.  java2  s  .c  o m
    RunToGetDeterminant(position, progressDialog);
}

From source file:id.nci.stm_9.ProgressDialogFragment.java

/**
 * Updates progress of dialog// w  w w  . j  ava  2  s.  c  om
 * 
 * @param messageId
 * @param progress
 * @param max
 */
public void setProgress(String message, int progress, int max) {
    ProgressDialog dialog = (ProgressDialog) getDialog();

    dialog.setMessage(message);
    dialog.setProgress(progress);
    dialog.setMax(max);
}

From source file:org.alfresco.mobile.android.ui.fragments.WaitingDialogFragment.java

public Dialog onCreateDialog(final Bundle savedInstanceState) {
    if (getArguments() != null) {
        titleId = getArguments().getInt(ARGUMENT_TITLEID);
        messageId = getArguments().getInt(ARGUMENT_MESSAGEID);
        isCancelable = getArguments().getBoolean(ARGUMENT_CANCELABLE);
    }/*from www  .  j  a v  a2  s . c o m*/

    final ProgressDialog dialog = new ProgressDialog(getActivity());
    dialog.setTitle(titleId);
    dialog.setMessage(getString(messageId));
    dialog.setIndeterminate(true);
    dialog.setCancelable(isCancelable);
    return dialog;
}

From source file:org.openbmap.activities.ExportGpxTaskFragment.java

/**
 * Restores previously retained progress dialog state
 * @param progressDialog//  w w  w  .j av a2 s .c  om
 */
public void restoreProgress(final ProgressDialog progressDialog) {
    progressDialog.setTitle(mTitle);
    progressDialog.setMessage(mMessage);
    progressDialog.setProgress(mProgress);
}

From source file:ca.TwentyTwenty.cropinspection.AbstractMapActivity.java

@Override
public boolean onOptionsItemSelected(MenuItem item) {

    switch (item.getItemId()) {
    case android.R.id.home:
        return (true);
    case R.id.settings:
        startActivity(new Intent(this, Preferences.class));
        return (true);
    case R.id.legal:
        startActivity(new Intent(this, LegalNoticesActivity.class));
        return (true);
    case R.id.map:
        startActivity(new Intent(this, CropInspectionActivity.class));
        return (true);
    case R.id.search:
        showMe();/* w  ww. ja v  a 2s  .c  o  m*/
        return (true);
    case R.id.sync:
        // load asynctask eventually
        ProgressDialog pd = new ProgressDialog(this);
        pd.setMessage("loading");
        pd.show();
        return (true);
    }

    return super.onOptionsItemSelected(item);
}

From source file:com.github.yuukis.businessmap.app.ProgressDialogFragment.java

@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
    boolean cancelable = getArguments().getBoolean(CANCELABLE, false);
    setCancelable(cancelable);/* w  w w.  j  a va 2  s. c  o m*/

    String title = getArguments().getString(TITLE);
    String message = getArguments().getString(MESSAGE);
    ProgressDialog dialog = new ProgressDialog(getActivity());
    dialog.setTitle(title);
    dialog.setMessage(message);
    dialog.setIndeterminate(false);
    dialog.setCanceledOnTouchOutside(false);

    dialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
    dialog.setMax(getArguments().getInt(MAX));

    return dialog;
}

From source file:ca.rmen.android.scrumchatter.dialog.ProgressDialogFragment.java

/**
 * @return an indeterminate, non-cancelable, ProgressDialog with a message.
 *//*  w ww .  j  a va2 s. c o  m*/
@Override
@NonNull
public Dialog onCreateDialog(Bundle savedInstanceState) {
    Log.v(TAG, "onCreateDialog: savedInstanceState = " + savedInstanceState);
    ProgressDialog dialog = new ProgressDialog(getActivity());
    Bundle arguments = getArguments();
    dialog.setMessage(arguments.getString(DialogFragmentFactory.EXTRA_MESSAGE));
    dialog.setIndeterminate(true);
    dialog.setOnShowListener(shownDialog -> {
        ProgressBar progressBar = (ProgressBar) ((ProgressDialog) shownDialog)
                .findViewById(android.R.id.progress);
        if (progressBar != null) {
            Drawable drawable = progressBar.getIndeterminateDrawable();
            if (drawable != null) {
                drawable.setColorFilter(
                        ContextCompat.getColor(getActivity(), R.color.scrum_chatter_accent_color),
                        android.graphics.PorterDuff.Mode.SRC_IN);
            }
        }
    });
    dialog.setCancelable(false);
    return dialog;
}

From source file:de.uni.stuttgart.informatik.ToureNPlaner.UI.Dialogs.MyProgressDialog.java

@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
    final android.app.ProgressDialog dialog = new android.app.ProgressDialog(getActivity());
    dialog.setTitle(getArguments().getString("title"));
    dialog.setMessage(getArguments().getString("message"));
    dialog.setIndeterminate(true);// w w  w.  j  a va2s . c  o m
    dialog.setCancelable(true);
    return dialog;
}

From source file:com.softminds.matrixcalculator.OperationFragments.ExponentFragment.java

@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);
    if (resultCode == 500) {
        ProgressDialog progressDialog = new ProgressDialog(getContext());
        progressDialog.setMessage(getString(R.string.Calculating));
        progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
        progressDialog.setIndeterminate(false);
        progressDialog.setCanceledOnTouchOutside(false);
        progressDialog.show();/*  w  w  w.jav a2 s .  co  m*/
        RunAndGetResult(Clicked_pos, data.getIntExtra("QWERTYUIOP", 0), progressDialog);
    }
}

From source file:com.softminds.matrixcalculator.OperationFragments.TraceFragment.java

@Override
public void onListItemClick(ListView l, View v, int position, long id) {
    ProgressDialog progressDialog = new ProgressDialog(getContext());
    progressDialog.setMessage(getString(R.string.Calculating));
    progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
    progressDialog.setIndeterminate(true);
    progressDialog.setCanceledOnTouchOutside(false);
    progressDialog.show();/*from   w w w  .  j  a va 2  s .  c o  m*/
    RunToGetTrace(position, progressDialog);
}