Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Update README for v1.2.0.
  • Loading branch information
GrenderG authored Apr 27, 2017
1 parent 0b447dd commit 42e7fe5
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,33 @@ allprojects {
}
```

Dependency
--
## Dependency

Add this to your module's `build.gradle` file (make sure the version matches the JitPack badge above):

```gradle
dependencies {
...
compile 'com.github.GrenderG:Toasty:1.1.5'
compile 'com.github.GrenderG:Toasty:1.2.0'
}
```

Usage
--
## Configuration

This step is optional, but if you want you can configure some Toasty parameters. Place this anywhere in your app:

```java
Toasty.Config.getInstance()
.setErrorColor(@ColorInt int errorColor) // optional
.setInfoColor(@ColorInt int infoColor) // optional
.setSuccessColor(@ColorInt int successColor) // optional
.setWarningColor(@ColorInt int warningColor) // optional
.setTextColor(@ColorInt int textColor) // optional
.setToastTypeface(AssetManager assetManager, String fontPath) // optional
.apply(); // required
```

## Usage

Each method always returns a `Toast` object, so you can customize the Toast much more. **DON'T FORGET THE `show()` METHOD!**

Expand Down Expand Up @@ -68,7 +81,8 @@ Toasty.normal(yourContext, "Normal toast w/ icon", yourIconDrawable).show();

You can also create your custom Toasts with the `custom()` method:
``` java
Toasty.custom(yourContext, "I'm a custom Toast", yourIconDrawable, textColor, tintColor, duration, withIcon, shouldTint).show();
Toasty.custom(yourContext, "I'm a custom Toast", yourIconDrawable, tintColor, duration, withIcon,
shouldTint).show();
```
### Extra
[You can pass formatted text to Toasty!](https://github.com/GrenderG/Toasty/blob/master/app/src/main/java/es/dmoral/toastysample/MainActivity.java#L76-L93)
Expand Down

0 comments on commit 42e7fe5

Please sign in to comment.