Native Toast is a native extensions that allows the use of custom toast messages. Additionally to the default toast style provided by the Android system, the extensions allows the use of extremely customized messages, includes HTML ones.

Among the available toast styles there are a profile toast, an image toast, a profile sketch toast, a header toast, an alert toast and an HTML toast.

Sample

// initialize the extension
var _ex:Toast = new Toast();

// Use this method to create a custom toast with the following configuration
_ex.ShowCustomMessage("MYFLASHLAB :)", 25, false, 100, 0, 10, 50, 50,"0x00aa00","0xaa00ff","0xffffff", Toast.GRAVITY_RIGHT);

// Use this method to create a default toast style
_ex.ShowDefaultMessage("MYFLASHLAB", false);

// Use this method to use a bitmap as the toast
_ex.ShowImageToast(bm.bitmapData, true, 300, 100, 200, 60, 15, 30, 70);

// Use this method to create a toast with a bitmap and a text right to it
_ex.ShowProfileToast("MYFLASHLAB", 20, bm.bitmapData, true, 130, 130, 200, 90, 20, 60, 20);

// Use this method to create a toast with a bitmap and a text over it
_ex.ShowProfileSketchToast("MYFLASHLAB", 20, bm.bitmapData, true, 140, 140,"0x000000","0xffffff",Toast.GRAVITY_TOP);

// Use this method to create a toast with a bitmap and a text below it
_ex.ShowHeaderToast("MYFLASHLAB", 20, bm.bitmapData, false, 120, 120, 150, 50, 10, 40, 10, "0xffaa00", "0xaaff55", "0xffaaff", Toast.GRAVITY_CENTER);

// Use this method to create a default AlertToast
_ex.ShowAlertToast("MYFLASHLAB", Toast.ALERT_TYPE_SUCCESS, true, "0xaaaaff", Toast.GRAVITY_LEFT);

// Use this method to create a custom AlertToast
_ex.ShowCustomAlertToast("MYFLASHLAB", true,bm.bitmapData, bm.bitmapData, bm.bitmapData, 40, 40, 0, 0, 40, 40,"0xaa2500",Toast.GRAVITY_CENTER);

// Use this method to create a toast which supports html as its content
_ex.ShowHtmlToast("

THIS IS A HTML TEXT

", true);
Air Native Extension, Android . URL.