1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-30 21:22:26 -05:00
k-9/src/com/fsck/k9/fragment/ProgressDialogFragment.java
cketti bbcc4988ba Converted message view to a fragment
The fragment should be fully functional. The only thing missing is the
animation when showing the next/previous message.
2012-10-05 18:14:07 +02:00

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;
}
}