Android : Is it possible to change the behaviour of a dialog button after the dialog has been created?

on Wednesday, October 1, 2014


I am preparing a login dialog that can change to a register dialog.


It has a custom view and contains a clickable text view that I use to switch between the register display and login display.


When a user clicks it I change the title of the dialog and I display or vanish the input box for retyping the password.


However, I can't change the text or the OnClick function of the positive button.


the setPositiveButton method only exists for DialogBuilder but not for the dialog itself.


Do I have to rebuild the entire dialog or is there a way to change the button "on the fly"?


0 comments:

Post a Comment