Forked from dhawalhshah/ProgressDialogFragment.java
Last active
August 29, 2015 14:14
-
-
Save XuNeal/0fe26a9c0d1bac188bad to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ProgressDialogFragment extends DialogFragment { | |
public static LoadingDialogFragment newInstance() { | |
ProgressDialogFragment frag = new ProgressDialogFragment (); | |
frag.setCancelable(false); | |
return frag; | |
} | |
@Override | |
public Dialog onCreateDialog(Bundle savedInstanceState) { | |
final ProgressDialog dialog = new ProgressDialog(getActivity()); | |
dialog.setMessage(getString(R.string.loading_text)); | |
dialog.setIndeterminate(true); | |
dialog.setOnKeyListener(keyListener); | |
return dialog; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment