android - MvvmCross: how to correctly handle rotation when displaying alert/progressbar -
when android device rotated, activity recreated.
if display alert/progress bar mvvmcross view model (or else requiring living activity instance), recommended way of handling rotation?
-----added example-----
currently working using mvp style.
presenter has reference view interface, , can call methods view.displaydialog, view.displayerror or view.displayprogress.
android implementation this:
var dialog = alertdialog.builder(this)
or
toast.maketext(basecontext, message, toastlength.long);
or
_progressdialog = new progressdialog(this); _progressdialog.settitle(title); _progressdialog.setmessage(message); _progressdialog.setcancelable(false); _progressdialog.show();
in these cases reference context (i.e. activity) necessary.
now, moving mvvm style , mvvmcross, how change kind of code?
Comments
Post a Comment