private static String[] getDefinedFonts(Context ctx, Field[] fields) {
        ArrayList<String> fieldArray = new ArrayList<>();
        for (Field field : fields) {
            if (field.getName().contains("define_font_")) {
                fieldArray.add(getStringResourceByName(ctx, field.getName()));
            }
        }
        return fieldArray.toArray(new String[0]);
    }
private static String [ ] getDefinedFonts ( Context ctx , Field [ ] fields ) { ArrayList < String > fieldArray = new ArrayList < > ( ) ; for ( Field field : fields ) { if ( field . getName ( ) . contains ( "define_font_" ) ) { fieldArray . add ( getStringResourceByName ( ctx , field . getName ( ) ) ) ; } } return fieldArray . toArray ( new String [ 0 ] ) ; }
A helper method to get a String[] out of a fieldArray

@param fields R.strings.class.getFields()
@return a String[] with the string ids we need