“cara membuat dialog kemajuan secara terprogram di Android” Kode Jawaban

cara membuat dialog kemajuan secara terprogram di Android

ProgressDialog progress = new ProgressDialog(this);
progress.setTitle("Loading");
progress.setMessage("Wait while loading...");
progress.setCancelable(false); // disable dismiss by tapping outside of the dialog
progress.show();
// To dismiss the dialog
progress.dismiss(); //do not include with above code
Ad9an

Android ProgressDialog Kustom

dependencies {
...
   compile 'com.github.d-max:spots-dialog:0.4@aar'
}
Xenophobic Xenomorph

Android ProgressDialog Kustom

private AlertDialog progressDialog;
progressDialog = new SpotsDialog(mContext, R.style.Custom);

//Am using it in an AsyncTask. So in  my onPreExecute, I do this:
public void onPreExecute() {
  super.onPreExecute();
  progressDialog.show();
  ...
 }

//dismiss in onPostExecute
public void onPostExecute(){
   progressDialog.dismiss();
 } 
Xenophobic Xenomorph

Android ProgressDialog Kustom

<style name="Custom" parent="android:Theme.DeviceDefault.Dialog">
    <item name="DialogTitleAppearance">@android:style/TextAppearance.Medium</item>
    <item name="DialogTitleText">Please Wait</item>
    <item name="DialogSpotColor">@android:color/holo_orange_dark</item>
    <item name="DialogSpotCount">8</item>
</style>
Xenophobic Xenomorph

Jawaban yang mirip dengan “cara membuat dialog kemajuan secara terprogram di Android”

Pertanyaan yang mirip dengan “cara membuat dialog kemajuan secara terprogram di Android”

Lebih banyak jawaban terkait untuk “cara membuat dialog kemajuan secara terprogram di Android” di Java

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya