package com.example.download;

import android.app.Dialog;
import android.app.DialogFragment;
import android.app.ProgressDialog;
import android.os.Bundle;

public class ProgressDialogFragment extends DialogFragment {
    @Override
    public Dialog onCreateDialog(Bundle savedInstanceState) {
        ProgressDialog pd = new ProgressDialog(getActivity());
        pd.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
        String downloading = getResources().getString(
                R.string.downloading);
        pd.setMessage(downloading);
        pd.setCancelable(false);
        pd.setProgress(0);
        return pd;
    }
}