I have an alert with a custom view that I created ...
# anko
t
I have an alert with a custom view that I created with Anko. The alert has a editText and a positive and negative button. I want the positive button to be disabled until there is text in the editText. Does anyone know how to do this? When the text changes in my editText, I'm listening to it with a textChangedListener and setting a property that can be accessed from outside the DSL. But I can't seem to get access to the positive button from anywhere to enable or disable it.
m
You can find these buttons only when the dialog is already shown. In
FragmentDialog
this means using
onStart
.
t
Is there a way I can do that in anko? My code returns a
AlertBuilder<DialogInterface>
. I can't figure out how to get a
FragmentDialog
out of that.
m
Why don't just use plain Android's
AlertDialog.Builder
? 🙂
t
oh, so this isn't really possible in anko?