I am trying to show a progressbar when a button is clicked. When i test the app it force closes / stops. My app works fine before the progressbar code is added in.
also
ProgressDialog progressDialog = new ProgressDialog(this);
progressDialog.setProgressStyle(R.style.NewDialog);
progressDialog.setMessage("Loading...");
Paste the below in your styles.xml New Dialog :
When you want to show you can cuse progressDialog.show() and to hide you can use progressDialog.dismiss().