mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-30 21:22:26 -05:00
bbcc4988ba
The fragment should be fully functional. The only thing missing is the animation when showing the next/previous message.
36 lines
928 B
Java
36 lines
928 B
Java
package com.fsck.k9.fragment;
|
|
|
|
import android.app.Dialog;
|
|
import android.app.ProgressDialog;
|
|
import android.os.Bundle;
|
|
|
|
import com.actionbarsherlock.app.SherlockDialogFragment;
|
|
|
|
|
|
public class ProgressDialogFragment extends SherlockDialogFragment {
|
|
private static final String ARG_TITLE = "title";
|
|
|
|
public static ProgressDialogFragment newInstance(String title) {
|
|
ProgressDialogFragment fragment = new ProgressDialogFragment();
|
|
|
|
Bundle args = new Bundle();
|
|
args.putString(ARG_TITLE, title);
|
|
fragment.setArguments(args);
|
|
|
|
return fragment;
|
|
}
|
|
|
|
|
|
@Override
|
|
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
|
Bundle args = getArguments();
|
|
String title = args.getString(ARG_TITLE);
|
|
|
|
ProgressDialog dialog = new ProgressDialog(getActivity());
|
|
dialog.setIndeterminate(true);
|
|
dialog.setTitle(title);
|
|
|
|
return dialog;
|
|
}
|
|
}
|