Skip to content

Instantly share code, notes, and snippets.

@skydoves
Created April 27, 2022 02:09
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 skydoves/5dfce7d707439bb1b6cc85d58b076a3f to your computer and use it in GitHub Desktop.
Save skydoves/5dfce7d707439bb1b6cc85d58b076a3f to your computer and use it in GitHub Desktop.
dialog_fragment_example
class LocationServiceConfirmationDialogFragment : DialogFragment() {
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog =
AlertDialog.Builder(requireContext())
.setMessage(getString(R.string.location_service_confirmation))
.setPositiveButton(getString(R.string.agree)) { _, _ -> }
.setNegativeButton(getString(R.string.disagree)) { _, _ -> }
.create()
companion object {
const val TAG = "LocationServiceConfirmationDialogFragment"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment