Skip to content

Commit

Permalink
Trying to solve both issue #33 and issue #60.
Browse files Browse the repository at this point in the history
  • Loading branch information
GrenderG committed Apr 22, 2018
1 parent 79cec86 commit 4550c10
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions toasty/src/main/java/es/dmoral/toasty/Toasty.java
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public static Toast custom(@NonNull Context context, @NonNull CharSequence messa
public static Toast custom(@NonNull Context context, @NonNull CharSequence message, Drawable icon,
@ColorInt int tintColor, int duration,
boolean withIcon, boolean shouldTint) {
final Toast currentToast = new Toast(context);
final Toast currentToast = Toast.makeText(context, "", duration);
final View toastLayout = ((LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE))
.inflate(R.layout.toast_layout, null);
final ImageView toastIcon = toastLayout.findViewById(R.id.toast_icon);
Expand Down Expand Up @@ -196,7 +196,6 @@ public static Toast custom(@NonNull Context context, @NonNull CharSequence messa
toastTextView.setTypeface(currentTypeface);
toastTextView.setTextSize(TypedValue.COMPLEX_UNIT_SP, textSize);

currentToast.setDuration(duration);
currentToast.setView(toastLayout);
return currentToast;
}
Expand Down

0 comments on commit 4550c10

Please sign in to comment.