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:android.hawkencompanionapp.activities.BaseActivity.java

public void displayUILoadingSpinner(String msg) {
    mProgressDialog = new ProgressDialog(this, ProgressDialog.THEME_HOLO_DARK);
    mProgressDialog.setCanceledOnTouchOutside(false);
    mProgressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
    mProgressDialog.setTitle(getString(R.string.spinner_title_loading));
    mProgressDialog.setMessage(msg);//from   w w  w .  j a  va 2s .com
    mProgressDialog.show();
}

From source file:com.gigathinking.simpleapplock.Upgrade.java

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.layout_upgrade);
    getActionBar().setDisplayHomeAsUpEnabled(true);
    mDialog = new ProgressDialog(this, ProgressDialog.STYLE_SPINNER);
    mDialog.setMessage(getString(R.string.processing));
    mDialog.show();/*from  w ww  .j  a  v a  2 s .c o  m*/
    findViewById(R.id.id_btn_upgrade).setOnClickListener(this);
    mPrefs = PreferenceManager.getDefaultSharedPreferences(this);
    new GetSKUDetails().execute();
}

From source file:com.paramedic.mobshaman.fragments.HistoriaClinicaFragment.java

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {

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

    return super.onCreateView(inflater, container, savedInstanceState);
}

From source file:com.wms.ezyoukuuploader.sdk.task.FetchYoukuAccessTokenTask.java

protected void onPreExecute() {
    progressDialog = DialogUtil.showWaitingProgressDialog(context, ProgressDialog.STYLE_SPINNER,
            context.getString(R.string.authorizingUser), false);
}

From source file:com.example.maproot.MainActivity.java

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    ////from w w  w . j  a v a 2  s . c om
    progressDialog = new ProgressDialog(this);
    progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
    progressDialog.setMessage("??......");
    progressDialog.hide();

    //?
    markerPoints = new ArrayList<LatLng>();

    SupportMapFragment mapfragment = (SupportMapFragment) getSupportFragmentManager()
            .findFragmentById(R.id.map);

    gMap = mapfragment.getMap();

    //??
    LatLng location = new LatLng(33.590205, 130.419238);

    LatLng e_l = new LatLng(33.590638, 130.412498);

    gMap.moveCamera(CameraUpdateFactory.newLatLngZoom(location, 15));
    MarkerOptions options = new MarkerOptions();
    MarkerOptions end = new MarkerOptions();

    options.position(location);
    options.title("??");
    options.snippet(location.toString());

    end.position(e_l);
    end.title("??");
    end.snippet(e_l.toString());

    // ?
    gMap.addMarker(options);
    gMap.addMarker(end);

}

From source file:com.xargsgrep.portknocker.asynctask.RetrieveApplicationsAsyncTask.java

@Override
protected void onPreExecute() {
    FragmentManager fragmentManager = activity.getSupportFragmentManager();

    FragmentTransaction ft = fragmentManager.beginTransaction();
    Fragment prev = fragmentManager.findFragmentByTag(ProgressDialogFragment.TAG);
    if (prev != null)
        ft.remove(prev);//from  ww  w .  j  a va  2 s .  co  m
    ft.addToBackStack(null);

    ProgressDialogFragment dialogFragment = ProgressDialogFragment.newInstance(
            activity.getString(R.string.progress_dialog_retrieving_applications), true,
            ProgressDialog.STYLE_SPINNER);
    dialogFragment.setCancelable(false);
    dialogFragment.show(ft, ProgressDialogFragment.TAG);
}

From source file:org.quizreader.android.PageReadActivity.java

/** Called when the activity is first created. */
@SuppressLint("SetJavaScriptEnabled")
@Override/*from   w  w  w  .j a va  2s  .c  o m*/
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.page_read);
    // immediately pop up loading dialog
    dialog = new ProgressDialog(this);
    dialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
    dialog.setMessage("loading page");
    dialog.show();
    // set up webview
    WebView webview = (WebView) findViewById(R.id.webView);
    webview.setWebViewClient(new QRWebViewClient());
    webview.setWebChromeClient(new WebChromeClient() {
        public boolean onConsoleMessage(ConsoleMessage cm) {
            Log.d("QuizReader", cm.message() + ", line " + cm.lineNumber() + " " + cm.sourceId());
            return true;
        }
    });
    WebSettings webSettings = webview.getSettings();
    webSettings.setJavaScriptEnabled(true);
    webview.addJavascriptInterface(new QuizReaderInterface(), "qr");
    try {
        random = new Random();
        wordDao = new WordDao(this);
        qzzFile = new QzzFile(title.getFilepath(), this);
        URL htmlURL = qzzFile.getHTML(title.getId(), title.getSection());
        if (htmlURL == null) { // beyond the last section
            setResult(RESULT_END_TITLE);
            finish();
        }
        String externalForm = htmlURL.toExternalForm();
        webview.loadUrl(externalForm + "?paragraph=" + title.getParagraph());
    } catch (Exception ex) {
        webview.loadData(ex.toString(), "text/plain", null);
    }
}

From source file:com.nextgis.maplibui.util.NGWTrackLayerCreateTask.java

@Override
protected void onPreExecute() {
    super.onPreExecute();
    mProgress = new ProgressDialog(mActivity);
    mProgress.setProgressStyle(ProgressDialog.STYLE_SPINNER);
    mProgress.setCanceledOnTouchOutside(false);
    mProgress.setOnCancelListener(new DialogInterface.OnCancelListener() {
        @Override/*ww w  .j av  a2  s.c om*/
        public void onCancel(DialogInterface dialogInterface) {
            mIsCancelled = true;
        }
    });
    mProgress.setMessage(mActivity.getString(R.string.message_loading));
    ControlHelper.lockScreenOrientation(mActivity);
    mProgress.show();
}

From source file:thiru.in.basicauthwebview.Authenticate.java

@Override
protected void onPreExecute() {
    super.onPreExecute();
    progDailog = new ProgressDialog(this.context);
    progDailog.setMessage("Loading...");
    progDailog.setIndeterminate(false);//  w  w w. j  ava  2  s.  c  o  m
    progDailog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
    progDailog.setCancelable(true);
    Log.i("OnPreExecute", "Show");
    progDailog.show();
}

From source file:com.grarak.romswitcher.Utils.Utils.java

public static void displayprogress(String message, final Context context) {
    mProgressDialog = new ProgressDialog(context);
    mProgressDialog.setMessage(message);
    mProgressDialog.setIndeterminate(false);
    mProgressDialog.setOnDismissListener(new DialogInterface.OnDismissListener() {
        @Override//from  w w w.j a v a 2s  .  co  m
        public void onDismiss(DialogInterface dialog) {
            ((Activity) context).finish();
        }
    });
    mProgressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
    mProgressDialog.show();
}