Ejemplo n.º 1
0
        public static Dialog GetCustomDialog(Context aContext, string aTitle, int aDialogLayoutResId, SetupViewDelegate aSetupViewDelegate, EventHandler <DialogClickEventArgs> aOnCloseHandler)
        {
            AlertDialog.Builder lBuilder = new AlertDialog.Builder(aContext);
            lBuilder.SetTitle(aTitle);

            View lView = LayoutInflater.FromContext(aContext).Inflate(aDialogLayoutResId, null);

            if (aSetupViewDelegate != null)
            {
                lView = aSetupViewDelegate(lView);
            }
            lBuilder.SetView(lView);

            lBuilder.SetPositiveButton(Resource.String.close, aOnCloseHandler);
            AlertDialog lDlg = lBuilder.Create();

            lDlg.Window.SetBackgroundDrawableResource(Resource.Drawable.default_dialog);
            return(lDlg);
        }
Ejemplo n.º 2
0
 public static Dialog GetCustomDialog(Context aContext, int aTitleResId, int aDialogLayoutResId, SetupViewDelegate aSetupViewDelegate, EventHandler <DialogClickEventArgs> aOnCloseHandler)
 {
     return(GetCustomDialog(aContext, aContext.GetString(aTitleResId), aDialogLayoutResId, aSetupViewDelegate, aOnCloseHandler));
 }