src/main/java/de/blau/android/util/Snack.java
/**
     * Display an error toast underneath the top action bar
     * 
     * @param context Android Context that called this
     * @param msgRes the message resource to display
     * @param persist persist message as a notification
     */
Display an error toast underneath the top action bar

@param context Android Context that called this
@param msgRes the message resource to display
@param persist persist message as a notification
Display an error toast underneath the top action bar @param context Android Context that called this @param msgRes the message resource to display @param persist persist message as a notification
public static void toastTopError(@Nullable Context context, int msgRes, boolean persist) {
        if (context != null) {
            toastTop(context, msgRes, ThemeUtils.getStyleAttribColorValue(context, R.attr.snack_error, R.color.material_red), Toast.LENGTH_LONG);
            if (persist) {
                Notifications.error(context, R.string.error, context.getString(msgRes), random.nextInt());
            }
        }
    }
public static void toastTopError ( @ Nullable Context context , int msgRes , boolean persist ) { if ( context != null ) { toastTop ( context , msgRes , ThemeUtils . getStyleAttribColorValue ( context , R . attr . snack_error , R . color . material_red ) , Toast . LENGTH_LONG ) ; if ( persist ) { Notifications . error ( context , R . string . error , context . getString ( msgRes ) , random . nextInt ( ) ) ; } } }
Display an error toast underneath the top action bar
Display an error toast underneath the top action bar