C# Class Plugin.Toasts.ToastNotificatorImplementation

Inheritance: IToastNotificator
显示文件 Open project: adamped/Toasts.Forms.Plugin

Public Methods

Method Description
HideAll ( ) : void
Init ( Android.App.Activity activity, IToastLayoutCustomRenderer customRenderer = null ) : void

You can pass your custom renderer for toast layout, in case of null DefaultToastLayoutRenderer will be used

Notify ( ToastNotificationType type, string title, string description, System.TimeSpan duration, object context = null, bool clickable = true ) : Task
NotifySticky ( ToastNotificationType type, string title, string description, object context = null, bool clickable = true, CancellationToken cancellationToken = newCancellationToken(), bool modal = false ) : Task
ToastNotificatorImplementation ( ) : System

Method Details

HideAll() public method

public HideAll ( ) : void
return void

Init() public static method

You can pass your custom renderer for toast layout, in case of null DefaultToastLayoutRenderer will be used
public static Init ( Android.App.Activity activity, IToastLayoutCustomRenderer customRenderer = null ) : void
activity Android.App.Activity The current activity. In Xamarin Forms pass the instance of the MainActity e.g. Init(this);
customRenderer IToastLayoutCustomRenderer
return void

Notify() public method

public Notify ( ToastNotificationType type, string title, string description, System.TimeSpan duration, object context = null, bool clickable = true ) : Task
type ToastNotificationType
title string
description string
duration System.TimeSpan
context object
clickable bool
return Task

NotifySticky() public method

public NotifySticky ( ToastNotificationType type, string title, string description, object context = null, bool clickable = true, CancellationToken cancellationToken = newCancellationToken(), bool modal = false ) : Task
type ToastNotificationType
title string
description string
context object
clickable bool
cancellationToken System.Threading.CancellationToken
modal bool
return Task

ToastNotificatorImplementation() public method

public ToastNotificatorImplementation ( ) : System
return System