Created
March 29, 2017 20:40
-
-
Save joshskeen/7be787a85c046e09fafa082ea06ad42f to your computer and use it in GitHub Desktop.
apply trick
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog { | |
return ProgressDialog(context).apply { | |
setMessage(arguments.getString(ARG_MESSAGE)) | |
setProgressStyle(ProgressDialog.STYLE_SPINNER) | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog { | |
val dialog = ProgressDialog(context) | |
val message = arguments.getString(ARG_MESSAGE) | |
dialog.setMessage(message) | |
dialog.setProgressStyle(ProgressDialog.STYLE_SPINNER) | |
return dialog | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment