Skip to content

Instantly share code, notes, and snippets.

@illuzor
Last active September 15, 2018 20:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save illuzor/bb2d68b960902a296920e3b73a7a8eda to your computer and use it in GitHub Desktop.
Save illuzor/bb2d68b960902a296920e3b73a7a8eda to your computer and use it in GitHub Desktop.
import android.app.AlertDialog
import android.app.Dialog
import android.os.Bundle
import android.view.LayoutInflater
import android.widget.TextView
import androidx.fragment.app.DialogFragment
import com.illuzor.lesson.wallpapers.R
class ProgressDialog : DialogFragment() {
lateinit var title: String
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
val container = LayoutInflater.from(context).inflate(R.layout.dialog_progress, null)
container.findViewById<TextView>(R.id.tv_title).text = title
return AlertDialog.Builder(activity)
.setView(container)
.create()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment