public static Toast Show(string viewName, IUIViewGroup viewGroup, string text, float duration, UILayout layout, Action callback) { if (string.IsNullOrEmpty(viewName)) { viewName = ViewName; } IUIViewLocator locator = GetUIViewLocator(); ToastView view = locator.LoadView <ToastView>(viewName); if (view == null) { throw new NotFoundException("Not found the \"ToastView\"."); } if (viewGroup == null) { viewGroup = GetCurrentViewGroup(); } Toast toast = new Toast(view, viewGroup, text, duration, layout, callback); toast.Show(); return(toast); }
protected Toast(ToastView view, IUIViewGroup viewGroup, string text, float duration, UILayout layout, Action callback) { this.view = view; this.viewGroup = viewGroup; this.text = text; this.duration = duration; this.layout = layout; this.callback = callback; }
public static Toast Show(string viewName, IUIViewGroup viewGroup, string text, float duration, UILayout layout, Action callback) { if (string.IsNullOrEmpty(viewName)) { viewName = ViewName; } ApplicationContext context = Context.GetApplicationContext(); IUIViewLocator locator = context.GetService <IUIViewLocator>(); ToastView view = locator.LoadView <ToastView>(viewName); Toast toast = new Toast(viewGroup, text, duration, layout); toast.View = view; toast.Show(); return(toast); }
public static Toast Show(string viewName, IUIViewGroup viewGroup, string text, float duration, UILayout layout, Action callback) { if (string.IsNullOrEmpty(viewName)) { viewName = ViewName; } ApplicationContext context = Context.GetApplicationContext(); IUIViewLocator locator = context.GetService <IUIViewLocator>(); ToastView view = locator.LoadView <ToastView>(viewName); if (view == null) { throw new NotFoundException("Not found the \"ToastView\"."); } Toast toast = new Toast(view, viewGroup, text, duration, layout); toast.Show(); return(toast); }
protected Toast(ToastView view, IUIViewGroup viewGroup, string text, float duration, UILayout layout) : this(view, viewGroup, text, duration, layout, null) { }
protected Toast(ToastView view, IUIViewGroup viewGroup, string text, float duration) : this(view, viewGroup, text, duration, null, null) { }