package com.kdanmobile.reader.copyfile

import android.app.Dialog
import android.os.Bundle
import android.support.v4.app.DialogFragment
import android.support.v7.app.AlertDialog

class FileCannotOpenDialogFragment : DialogFragment() {

    companion object {
        const val KEY_DIALOG_TITLE = "title"
    }

    override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {

        return AlertDialog.Builder(activity!!)
                .setTitle(arguments?.getString(KEY_DIALOG_TITLE))
                .setPositiveButton(getString(android.R.string.ok)) { dialog, which ->
                    activity?.finish()
                }
                .create()
    }
}
