private void translateListing() {
            final CacheDetailActivity cda = (CacheDetailActivity) getActivity();
            final OfflineTranslateUtils.Language sourceLng = cda.translationStatus.getSourceLanguage();

            if (cda.translationStatus.isTranslated()) {
                cda.translationStatus.setNotTranslated();
                reloadDescription(cda, cache, true, 0, cda.descriptionStyle, null, null, null);
                if (TextUtils.containsHtml(cache.getHint())) {
                    binding.hint.setText(HtmlCompat.fromHtml(cache.getHint(), HtmlCompat.FROM_HTML_MODE_LEGACY, new HtmlImage(cache.getGeocode(), false, false, false), null), TextView.BufferType.SPANNABLE);
                } else {
                    binding.hint.setText(cache.getHint());
                }
                binding.descriptionTranslateNote.setText(String.format(getString(R.string.translator_language_detected), sourceLng));
                return;
            }

            cda.translationStatus.startTranslation(2, cda, cda.findViewById(R.id.description_translate_button));

            OfflineTranslateUtils.getTranslator(cda, cda.translationStatus, sourceLng,
                unsupportedLng -> {
                    cda.translationStatus.abortTranslation();
                    binding.descriptionTranslateNote.setText(getResources().getString(R.string.translator_language_unsupported, unsupportedLng));
                }, modelDownloading -> binding.descriptionTranslateNote.setText(R.string.translator_model_download_notification),
    translator -> {
                    if (null == translator) {
                        binding.descriptionTranslateNote.setText(R.string.translator_translation_initerror);
                        return;
                    }

                    final Consumer<Exception> errorConsumer = error -> {
                        binding.descriptionTranslateNote.setText(getResources().getText(R.string.translator_translation_error, error.getMessage()));
                        binding.descriptionTranslateButton.setEnabled(false);
                    };
                    reloadDescription(cda, cache, true, 0, cda.descriptionStyle, translator, cda.translationStatus, errorConsumer);
                    OfflineTranslateUtils.translateParagraph(translator, cda.translationStatus, binding.hint.getText().toString(), binding.hint::setText, errorConsumer);
                });
        }
Show/hide buttons, set text in favorite line and box
main/src/main/java/cgeo/geocaching/CacheDetailActivity.java