Alertdialog - Don't close the window after clicking the OK button

Hey,

The alertdialog should not close after clicking the OK button. At best, the OK button should be deactivated and gray and only after input should the button be activated and colored.

  var builder = AlertDialog.Builder(this)
            builder.setTitle("Hinzufügen")
            builder.setMessage("Füge etwas deiner Liste hinzu!")

            var input = EditText(this)
            input.hint="Hinzufügen"
            input.inputType = InputType.TYPE_CLASS_TEXT
            builder.setView(input)
            input.addTextChangedListener {}


            builder.setPositiveButton("OK") { _, _ ->               //logik die Passiert bei Button drücken(ok-button vom alert)
                if (input.text.isNotEmpty()){
                    shoppingItems.add(input.text.toString())
                    Toast.makeText(applicationContext, "Hinzugefügt", Toast.LENGTH_SHORT).show()
                }else{
                    Toast.makeText(applicationContext, "Nichts eingetragen!", Toast.LENGTH_SHORT).show()
                }
                itemAdapter.notifyDataSetChanged()
            }


            builder.setNegativeButton("Abbrechen"){_, _ ->
                Toast.makeText(applicationContext,"Abgebrochen", Toast.LENGTH_SHORT).show()

            }


            itemAdapter.notifyDataSetChanged()
            builder.show()

thx for help