public void addDifficultyTerrain(final Geocache cache) {
        final Context context = parentView.getContext();

        final View layout = activity.getLayoutInflater().inflate(R.layout.cache_information_item, parentView, false);
        layout.findViewById(R.id.addition).setVisibility(GONE);
        parentView.addView(layout);

        final TextView nameView = layout.findViewById(R.id.name);
        nameView.setText(R.string.cache_difficulty_terrain);

        final TextView valueView = layout.findViewById(R.id.value);
        final StringBuilder sb = new StringBuilder();
        if (cache.getDifficulty() > 0) {
            sb.append("D ").append(cache.getDifficulty());
        }
        if (cache.getTerrain() > 0) {
            sb.append(sb.length() > 0 ? SEPARATOR : "").append("T ").append(cache.getTerrain());
        }
        valueView.setText(sb);

        final LinearLayout linearLayout = layout.findViewById(R.id.linearlayout);

        final ImageView catIcon = new ImageView(context);
        catIcon.setBackground(createDTRatingMarker(res, cache.supportsDifficultyTerrain(), cache.getDifficulty(), cache.getTerrain(), 1.47f)); // 1.47 = scaling factor required to make D/T marker the same size as log smileys
        linearLayout.addView(catIcon);
    }
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