ALERT DIALOG with edittext

ChristopheBERNARDChristopheBERNARD ✭✭✭✭BEMember ✭✭✭✭

Hello all,

i'm a beginner with MVVMCross and actually i'm trying to migrate my app make with xamarin android to xamarin android MVVM cross.

I would like to know if it's possible to make a alert dialog and inside of this alert dialog add an input (edit text) ?
And of course get the text inside a method ?

I've find a sample alert dialog with two button (YES / NO) and return the value => this code works fine

public Task ShowDialogAsync(string message, string title, string OKButtonContent, string CancelButtonContent)
var tcs = new System.Threading.Tasks.TaskCompletionSource();

        var mvxTopActivity = MvvmCross.Platform.Mvx.Resolve<MvvmCross.Platform.Droid.Platform.IMvxAndroidCurrentTopActivity>();
        AlertDialog.Builder builder = new AlertDialog.Builder(mvxTopActivity.Activity);
               .SetPositiveButton(OKButtonContent, (s, args) =>
               .SetNegativeButton(CancelButtonContent, (s, args) =>

        return tcs.Task;

but if i add inside an edit text never time i receive the value i type ...

I'm a beginner with MVVMCross , can someone tell me if it's possible to do that ?
Any sample or link would be great ...

thanks for you time

Best Answers


  • ChristopheBERNARDChristopheBERNARD ✭✭✭✭ BEMember ✭✭✭✭

    any idea ? thanks for all

  • ChristopheBERNARDChristopheBERNARD ✭✭✭✭ BEMember ✭✭✭✭

    Hello @kenneth.lee
    thanks a lot for these links that's exactly what i want ...

    actually we evaluate MVVMCross ...

    Just last think, do you know if it's possible to add a style to the prompt dialog ?
    because when i run a test sample the result is ok but we doesn't like the design (color, and so on)

    Thanks for sharing your knowledge that's great

  • ChristopheBERNARDChristopheBERNARD ✭✭✭✭ BEMember ✭✭✭✭

    re @kenneth.lee

    a last word if you have time :) i block on the loading controls
    Mvx.Resolve().Loading("PROGRESS TITLE", ......

    The second parameter is a ACTION => How i can do that ?


  • ChristopheBERNARDChristopheBERNARD ✭✭✭✭ BEMember ✭✭✭✭

    Hello @kenneth.lee thanks a LOT for your time

    for ACTION i've find here is it how i do that :
    Mvx.Resolve<IUserDialogs>().Loading("PROGRESS TITLE", () => HideLoading(), "CANCEL", true, MaskType.Clear);
    () => HideLoading => it's a method who cancel the progress bar ...
    ACR User dialog is really nice but for to find sample it's more complicate ...i'm beginner with MVVMCross ...

    thanks and have a nice wkend kenneth

  • ChristopheBERNARDChristopheBERNARD ✭✭✭✭ BEMember ✭✭✭✭

    Hello @kenneth.lee great nice to find help

    have a nice day

Sign In or Register to comment.