private View addStars(final int nameId, final float value, final int max) {
        final View layout = activity.getLayoutInflater().inflate(R.layout.cache_information_item, parentView, false);
        final TextView nameView = layout.findViewById(R.id.name);
        final TextView valueView = layout.findViewById(R.id.value);

        nameView.setText(activity.getString(nameId));
        valueView.setText(String.format(Locale.getDefault(), activity.getString(R.string.cache_rating_of_new), value, max));

        final RatingBar layoutStars = layout.findViewById(R.id.stars);
        layoutStars.setNumStars(max);
        layoutStars.setRating(value);
        layoutStars.setVisibility(View.VISIBLE);

        parentView.addView(layout);
        return layout;
    }
Create a "name: value" line with html content.

@param nameId  the resource of the name field
@param value   the initial value
@param geocode the geocode for image getter
@return a pair made of the whole "name: value" line (to be able to hide it for example) and of the value (to update it)
main/src/main/java/cgeo/geocaching/ui/CacheDetailsCreator.java