Skip to content

Commit

Permalink
v.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
GrenderG committed Jan 18, 2017
1 parent 08a512d commit 6de3719
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 9 deletions.
6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,15 @@ Add this to your module's `build.gradle` file (make sure the version matches the
```gradle
dependencies {
...
compile 'com.github.GrenderG:Toasty:1.0'
compile 'com.github.GrenderG:Toasty:1.1'
}
```

Usage
--

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

To display an error Toast:

``` java
Expand Down Expand Up @@ -60,7 +62,7 @@ To display the usual Toast with icon:
Toasty.normal(yourContext, "Normal toast w/ icon", yourIconDrawable).show();
```

You can also create your custom Toasts with the `custom` method:
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, true).show();
```
Expand All @@ -75,4 +77,4 @@ Screenshots
<img src="https://raw.githubusercontent.com/GrenderG/Toasty/master/art/scr3.png" width="250">
<img src="https://raw.githubusercontent.com/GrenderG/Toasty/master/art/scr4.png" width="250">
<img src="https://raw.githubusercontent.com/GrenderG/Toasty/master/art/scr5.png" width="250">
<img src="https://raw.githubusercontent.com/GrenderG/Toasty/master/art/scr6.png" width="250">
<img src="https://raw.githubusercontent.com/GrenderG/Toasty/master/art/scr6.png" width="250">
4 changes: 2 additions & 2 deletions toasty/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ android {
defaultConfig {
minSdkVersion 9
targetSdkVersion 25
versionCode 10
versionName "1.0"
versionCode 11
versionName "1.1"

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

Expand Down
8 changes: 4 additions & 4 deletions toasty/src/main/java/es/dmoral/toasty/Toasty.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ public static Toast normal(@NonNull Context context, @NonNull String message, in
}

public static Toast warning(@NonNull Context context, @NonNull String message) {
return info(context, message, Toast.LENGTH_SHORT, true);
return warning(context, message, Toast.LENGTH_SHORT, true);
}

public static Toast warning(@NonNull Context context, @NonNull String message, int duration) {
return info(context, message, duration, true);
return warning(context, message, duration, true);
}

public static Toast warning(@NonNull Context context, @NonNull String message, int duration, boolean withIcon) {
Expand All @@ -87,11 +87,11 @@ public static Toast info(@NonNull Context context, @NonNull String message, int
}

public static Toast success(@NonNull Context context, @NonNull String message) {
return error(context, message, Toast.LENGTH_SHORT, true);
return success(context, message, Toast.LENGTH_SHORT, true);
}

public static Toast success(@NonNull Context context, @NonNull String message, int duration) {
return error(context, message, duration, true);
return success(context, message, duration, true);
}

public static Toast success(@NonNull Context context, @NonNull String message, int duration, boolean withIcon) {
Expand Down

0 comments on commit 6de3719

Please sign in to comment.