Example usage for android.app ProgressDialog STYLE_SPINNER

List of usage examples for android.app ProgressDialog STYLE_SPINNER

Introduction

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

Prototype

int STYLE_SPINNER

To view the source code for android.app ProgressDialog STYLE_SPINNER.

Click Source Link

Document

Creates a ProgressDialog with a circular, spinning progress bar.

Usage

From source file:com.commonsware.android.progdlg.SampleDialogFragment.java

@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
    ProgressDialog dlg = new ProgressDialog(getActivity());

    dlg.setMessage(getActivity().getString(R.string.dlg_title));
    dlg.setIndeterminate(true);//from w  w w  . j  a v a2 s  .  co m
    dlg.setProgressStyle(ProgressDialog.STYLE_SPINNER);

    return (dlg);
}

From source file:gov.wa.wsdot.android.wsdot.util.ProgressDialogFragment.java

@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
    ProgressDialog dialog = new ProgressDialog(getActivity(), getTheme());
    dialog.setMessage(getArguments().getString("message"));
    dialog.setIndeterminate(true);//from  w w  w .  ja  v  a  2  s.c o  m
    dialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
    return dialog;
}

From source file:com.cybussolutions.wikki.afri_pay.Networking.CheckAmount.java

@Override
protected void onPreExecute() {
    bar = new ProgressDialog(this.context);
    bar.setMessage("Loading...");
    bar.setProgressStyle(ProgressDialog.STYLE_SPINNER);
    bar.setCancelable(false);/*from   ww w  . j  av  a  2  s.co m*/
    //bar.show();
}

From source file:com.bruce.myrecorder.activities.BaseActivity.java

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    requestQueue = Volley.newRequestQueue(getApplicationContext());
    progressDialog = new ProgressDialog(this, AlertDialog.THEME_DEVICE_DEFAULT_LIGHT);//set progressDialog theme
    progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);//set progressDialog style
    progressDialog.setCancelable(false);//set progressDialog could not cancel on user interface
    progressDialog.setIndeterminate(true);//set indeterminate
}

From source file:fhtw.lvplan.MyProgressDialog.java

@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
    progressDialog = new ProgressDialog(getActivity());
    progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
    switch (id) {
    case LV_PlanActivity.PROGRESS_LOAD_DIALOG:
        progressDialog.setMessage("Loading...");
        return progressDialog;
    case LV_PlanActivity.PROGRESS_CAL_DIALOG:
        progressDialog.setMessage("Writing entries to Calendar: 0 / " + LV_PlanActivity.getReadLvPlanEntries());
        return progressDialog;
    case LV_PlanActivity.PROGRESS_READ_DIALOG:
        progressDialog.setMessage("Reading Calendar-File...");
        return progressDialog;
    default://from  w ww.java 2s .c om
        return null;
    }
}

From source file:org.deviceconnect.android.deviceplugin.health.fragment.dialog.ProgressDialogFragment.java

@Override
public Dialog onCreateDialog(final Bundle savedInstanceState) {
    if (mDialog != null) {
        return mDialog;
    }/* w ww .  ja va2  s. c  om*/

    String title = getArguments().getString(PARAM_TITLE);
    String message = getArguments().getString(PARAM_MESSAGE);

    mDialog = new ProgressDialog(getActivity());
    mDialog.setTitle(title);
    mDialog.setMessage(message);
    mDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);

    setCancelable(false);

    return mDialog;
}

From source file:com.paramedic.mobshaman.activities.ActualizarInformacionActivity.java

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    getSupportActionBar().setHomeButtonEnabled(true);
    getSupportActionBar().setDisplayHomeAsUpEnabled(true);
    setContentView(R.layout.activity_actualizar_informacion);

    configuration = Configuration.getInstance(this);

    pDialog = new ProgressDialog(this);
    pDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);

    btnActualizarDiagnosticos = (Button) findViewById(R.id.btn_actualizar_diagnosticos);
    btnActualizarMotivos = (Button) findViewById(R.id.btn_actualizar_motivos_no_realizacion);
    btnLogout = (Button) findViewById(R.id.btn_logout);
    tvVersion = (TextView) findViewById(R.id.tv_version_system);
    session = new SessionManager(getApplicationContext());

    String URL_DIAGNOSTICOS = configuration.getUrl() + "/api/diagnosis?licencia=" + configuration.getLicense();
    String URL_MOTIVOS = configuration.getUrl() + "/api/reasons?licencia=" + configuration.getLicense();

    setButtonsForDownloadInformation(btnActualizarDiagnosticos, "Cargando Diagnsticos...", URL_DIAGNOSTICOS,
            "diagnosticos", "Los diagnsticos han sido actualizados");

    setButtonsForDownloadInformation(btnActualizarMotivos, "Cargando Motivos...", URL_MOTIVOS, "motivos",
            "Los motivos han sido actualizados");
    try {/* www  .  j a v  a2s . c  om*/
        String versionName = getPackageManager().getPackageInfo(this.getPackageName(), 0).versionName;
        tvVersion.setText("Versin del sistema: " + versionName);

        btnLogout.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                session.logoutUser();
            }
        });

    } catch (Exception exception) {
        //No se encontro la version
    }

}

From source file:com.jins_meme.bridge.ProgressDialogFragment.java

@NonNull
@Override/*from   ww  w  .  j  av  a  2  s  .c  om*/
public Dialog onCreateDialog(Bundle savedInstanceState) {
    String type = getArguments().getString("type");

    progress = new ProgressDialog(getActivity());

    Window window = progress.getWindow();
    window.addFlags(WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE);

    switch (type) {
    case "meme_scan":
        progress.setMax(100);
        progress.setMessage(getString(R.string.meme_scanning));
        progress.setTitle(getString(R.string.meme_scan_connect_title));
        progress.setProgressStyle(ProgressDialog.STYLE_SPINNER);
        progress.setCancelable(false);
        /*
        progress.setButton(DialogInterface.BUTTON_NEGATIVE, getString(R.string.cancel),
            new OnClickListener() {
              @Override
              public void onClick(DialogInterface dialogInterface, int i) {
        if (mListener != null) {
          mListener.doNegativeClick("meme_connect");
        }
              }
            });
            */
        break;
    case "meme_connect":
        progress.setMax(100);
        progress.setMessage(getString(R.string.meme_scanning));
        progress.setTitle(getString(R.string.meme_scan_connect_title));
        progress.setProgressStyle(ProgressDialog.STYLE_SPINNER);
        progress.setCancelable(false);
        progress.setButton(DialogInterface.BUTTON_NEGATIVE, getString(R.string.cancel), new OnClickListener() {
            @Override
            public void onClick(DialogInterface dialogInterface, int i) {
                if (mListener != null) {
                    mListener.doNegativeClick("meme_connect");
                }
            }
        });
        break;
    case "hue_search":
        progress.setProgressStyle(ProgressDialog.STYLE_SPINNER);
        progress.setMessage(getString(R.string.hue_searching));
        progress.setCancelable(false);
        break;
    case "hue_connect":
        progress.setProgressStyle(ProgressDialog.STYLE_SPINNER);
        progress.setMessage(getString(R.string.hue_push_link_button));
        progress.setCancelable(false);
        break;
    case "spotify_loading":
        progress.setProgressStyle(ProgressDialog.STYLE_SPINNER);
        progress.setMessage(getString(R.string.spotify_loading));
        progress.setCancelable(false);
        break;
    }

    return progress;
}

From source file:com.paramedic.mobshaman.activities.LoginActivity.java

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_login);

    // Session Manager
    session = new SessionManager(getApplicationContext());
    configuration = configuration.getInstance(this);

    /** Muestro un dialogo spinner (no dejo que usuario use UI) **/
    progressDialog = new ProgressDialog(this);
    progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
    progressDialog.setCancelable(true);//from  w w w . j  av a 2s.c om

    // Email, Password input text
    txtUsername = (EditText) findViewById(R.id.txtUsername);
    txtPassword = (EditText) findViewById(R.id.txtPassword);
    btnLogin = (Button) findViewById(R.id.btnLogin);
    btnLogin.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View arg0) {
            login();
        }
    });
}

From source file:com.paramedic.mobshaman.activities.AccessTimeActivity.java

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    getSupportActionBar().setHomeButtonEnabled(true);
    getSupportActionBar().setDisplayHomeAsUpEnabled(true);
    pDialog = new ProgressDialog(this);
    pDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
    configuration = Configuration.getInstance(this);
    intent = new Intent(this, ServiciosActivity.class);
    setContentView(R.layout.activity_access_time);
    initializeUI();/*from w  w w.  j av a  2 s.c  om*/
}