Android Open Source - PicSync Progress Dialog Fragment






From Project

Back to project page PicSync.

License

The source code is released under:

Apache License

If you think the Android project PicSync listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.darrenmowat.gdcu.ui;
/*  w w w .ja v a  2s .  c  om*/
import android.app.Dialog;
import android.app.ProgressDialog;
import android.os.Bundle;

import com.actionbarsherlock.app.SherlockDialogFragment;
import com.darrenmowat.gdcu.R;

/**
 * Basic DialogFragment which displays a progress spinner
 * 
 * A custom message can be defined via newInstance(String message)
 * 
 * @author Darren Mowat
 * 
 */
public class ProgressDialogFragment extends SherlockDialogFragment {

  /**
   * 
   * @param message - The message to display in the progress dialog
   * @return a new custom instance of ProgressDialogFragment
   */
  public static ProgressDialogFragment newInstance(String message) {
    ProgressDialogFragment frag = new ProgressDialogFragment();
    Bundle b = new Bundle();
    b.putString("msg", message);
    frag.setArguments(b);
    return frag;
  }


  @Override
  public Dialog onCreateDialog(Bundle savedInstanceState) {
    Bundle b = getArguments();
    String message = b.getString("msg");
    if(message == null) {
      message = getResources().getString(R.string.rename_progress);
    }
    final ProgressDialog dialog = new ProgressDialog(getActivity());
    dialog.setMessage(message);
    dialog.setIndeterminate(true);
    dialog.setCancelable(false);
    return dialog;
  }

}




Java Source Code List

com.darrenmowat.gdcu.GDCU.java
com.darrenmowat.gdcu.Keys.java
com.darrenmowat.gdcu.activity.AuthActivity.java
com.darrenmowat.gdcu.activity.RenameFolderActivity.java
com.darrenmowat.gdcu.activity.SettingsActivity.java
com.darrenmowat.gdcu.activity.WebviewActivity.java
com.darrenmowat.gdcu.data.Database.java
com.darrenmowat.gdcu.data.Preferences.java
com.darrenmowat.gdcu.drive.DriveApi.java
com.darrenmowat.gdcu.otto.DataBus.java
com.darrenmowat.gdcu.otto.UploadStatusEventProducer.java
com.darrenmowat.gdcu.otto.UploadStatusEvent.java
com.darrenmowat.gdcu.security.PackageSecurityException.java
com.darrenmowat.gdcu.security.PackageSecurity.java
com.darrenmowat.gdcu.service.GalleryAlarmListener.java
com.darrenmowat.gdcu.service.GalleryObserver.java
com.darrenmowat.gdcu.service.MediaService.java
com.darrenmowat.gdcu.service.MediaThread.java
com.darrenmowat.gdcu.service.Notifier.java
com.darrenmowat.gdcu.service.ServiceUtils.java
com.darrenmowat.gdcu.service.UploadService.java
com.darrenmowat.gdcu.service.UploadThread.java
com.darrenmowat.gdcu.service.helpers.CloudSyncer.java
com.darrenmowat.gdcu.service.helpers.Media.java
com.darrenmowat.gdcu.service.helpers.ServiceIntents.java
com.darrenmowat.gdcu.service.helpers.ThreadCallbacks.java
com.darrenmowat.gdcu.tasks.GetTokenTask.java
com.darrenmowat.gdcu.tasks.RenameFolderTask.java
com.darrenmowat.gdcu.ui.ProgressDialogFragment.java
com.darrenmowat.gdcu.utils.HexConversions.java
com.darrenmowat.gdcu.utils.MD5Utils.java
com.darrenmowat.gdcu.utils.Preconditions.java