# Toasty **Repository Path**: wangjian348/Toasty ## Basic Information - **Project Name**: Toasty - **Description**: The usual Toast, but with steroids. - **Primary Language**: Unknown - **License**: LGPL-3.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2021-05-26 - **Last Updated**: 2021-05-27 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## Gradle Dependency ``` implementation "io.openharmony.tpc.thirdlib:Toasty:1.0.1" ``` # Toasty The usual Toast, but with steroids. ## Usage To display an error Toast: ``` java Toasty.error(yourContext, "This is an error toast.", Toast.LENGTH_SHORT, true); ``` To display a success Toast: ``` java Toasty.success(yourContext, "Success!", Toast.LENGTH_SHORT, true); ``` To display an info Toast: ``` java Toasty.info(yourContext, "Here is some info for you.", Toast.LENGTH_SHORT, true); ``` To display a warning Toast: ``` java Toasty.warning(yourContext, "Beware of the dog.", Toast.LENGTH_SHORT, true); ``` To display the usual Toast: ``` java Toasty.normal(yourContext, "Normal toast w/o icon"); ``` To display the usual Toast with icon: ``` java Toasty.normal(yourContext, "Normal toast w/ icon", yourIconDrawable); ``` You can also create your custom Toasts with the `custom()` method: ``` java Toasty.custom(yourContext, "I'm a custom Toast", yourIconDrawable, tintColor, duration, withIcon, shouldTint);