@@ -306,10 +306,11 @@ object DialogFactory {
306306 @StringRes positive : Int ,
307307 @StringRes negative : Int ,
308308 inputListener : InputListener ,
309- defaultText : String
309+ defaultText : String ? = null,
310+ hintText : String ? = null
310311 ): AlertDialog {
311- return getSimpleInputDialogBuilder(context, titleResource, positive,
312- negative, inputListener, defaultText, InputType .TYPE_TEXT_VARIATION_URI ).create()
312+ return getSimpleInputDialogBuilder(context, titleResource, positive, negative,
313+ inputListener, defaultText, hintText , InputType .TYPE_TEXT_VARIATION_URI ).create()
313314 }
314315
315316 private fun getSimpleInputDialogBuilder (
@@ -319,6 +320,7 @@ object DialogFactory {
319320 @StringRes negative : Int ,
320321 inputListener : InputListener ,
321322 defaultText : String? ,
323+ hintText : String? ,
322324 inputType : Int
323325 ): AlertDialog .Builder {
324326 val builder = MaterialAlertDialogBuilder (context)
@@ -331,6 +333,7 @@ object DialogFactory {
331333 input.maxLines = 8
332334 }
333335 if (defaultText != null ) input.setText(defaultText)
336+ if (hintText != null ) input.hint = hintText
334337
335338 val padding = DisplayMetricsUtil .dpToPx(16 )
336339 builder.setView(input, padding, 0 , padding, 0 )
0 commit comments