/** * Creates a simple SuperActivityToast. Don't forget to call {@link SuperToast#show()}. * * @param context An Activity Context * @param type The desired type of the SuperActivityToast * * @return The newly created SuperActivityToast */ public static SuperActivityToast create(@NonNull Context context, @Style.Type int type) { return (SuperActivityToast) new SuperActivityToast(context, type); }
/** * Creates a simple SuperActivityToast. Don't forget to call {@link SuperToast#show()}. * * @param context An Activity Context * @return The newly created SuperActivityToast */ public static SuperActivityToast create(@NonNull Context context) { return (SuperActivityToast) new SuperActivityToast(context); }
/** * Creates a simple SuperActivityToast. Don't forget to call {@link SuperToast#show()}. * * @param context An Activity Context * @param style The desired Style of the SuperActivityToast * @return The newly created SuperActivityToast */ public static SuperActivityToast create(@NonNull Context context, @NonNull Style style) { return (SuperActivityToast) new SuperActivityToast(context, style); }
/** * Creates a simple SuperActivityToast. Don't forget to call {@link SuperToast#show()}. * * @param context An Activity Context * @param style The desired Style of the SuperActivityToast * @param type The desired type of the SuperActivityToast * @return The newly created SuperActivityToast */ public static SuperActivityToast create(@NonNull Context context, @NonNull Style style, @Style.Type int type) { return (SuperActivityToast) new SuperActivityToast(context, style, type); }
/** * Creates a simple SuperActivityToast. Don't forget to call {@link SuperToast#show()}. * * @param context An Activity Context * @param style The desired Style of the SuperActivityToast * @param type The desired type of the SuperActivityToast/ * @param viewGroup the id of a ViewGroup to add the SuperActivityToast to * @return The newly created SuperActivityToast */ public static SuperActivityToast create(@NonNull Context context, @NonNull Style style, @Style.Type int type, @IdRes int viewGroup) { return (SuperActivityToast) new SuperActivityToast(context, style, type, viewGroup); }
/** * Creates a simple SuperActivityToast. Don't forget to call {@link SuperToast#show()}. * * @param context An Activity Context * @param text The desired text to be shown * @param duration The desired duration of the SuperActivityToast * @param style The desired Style of the SuperToast * @return The newly created SuperActivityToast */ public static SuperActivityToast create(@NonNull Context context, @NonNull String text, @Style.Duration int duration, @NonNull Style style) { return (SuperActivityToast) new SuperActivityToast(context, style) .setText(text) .setDuration(duration); }
/** * Creates a simple SuperActivityToast. Don't forget to call {@link SuperToast#show()}. * * @param context An Activity Context * @param text The desired text to be shown * @param duration The desired duration of the SuperActivityToast * @return The newly created SuperActivityToast */ public static SuperActivityToast create(@NonNull Context context, @NonNull String text, @Style.Duration int duration) { return (SuperActivityToast) new SuperActivityToast(context) .setText(text) .setDuration(duration); }
/** * Creates a simple SuperActivityToast. Don't forget to call {@link SuperToast#show()}. * * @param context An Activity Context * @param text The desired text to be shown * @param duration The desired duration of the SuperActivityToast * @param style The desired Style of the SuperToast * @param viewGroup The ViewGroup to attach the SuperActivityToast to * @return The newly created SuperActivityToast */ public static SuperActivityToast create(@NonNull Context context, @NonNull String text, @Style.Duration int duration, @NonNull Style style, @IdRes int viewGroup) { return (SuperActivityToast) new SuperActivityToast(context, style, Style.TYPE_STANDARD, viewGroup) .setText(text) .setDuration(duration); } }
new SuperActivityToast(context, style).fromOrientationChange().show(); else new SuperActivityToast(context, style).show();
final int typeArbiter = random.nextInt(5); switch (typeArbiter) { case 1: superActivityToast = new SuperActivityToast(Playground.this, Style.TYPE_BUTTON); break; case 2: superActivityToast = new SuperActivityToast(Playground.this, Style.TYPE_PROGRESS_BAR); break; case 3: superActivityToast = new SuperActivityToast(Playground.this, Style.TYPE_PROGRESS_CIRCLE); break; default: superActivityToast = new SuperActivityToast(Playground.this); break;
if (!style.isSuperActivityToast) new SuperToast(context, style).show(); else { final SuperActivityToast superActivityToast = new SuperActivityToast(context, style);