private void refreshGui(final WherigoThingDetailsBinding binding, final int pageToDisplay) {
        final int page = pageToDisplay < 0 || pageToDisplay >= texts.length ? 0 : pageToDisplay;
        final String message = this.texts[page];
        final Media media = this.media == null || this.media.length == 0 ? null : (page >= this.media.length ? this.media[0] : this.media[page]);

        binding.description.setText(WherigoGame.get().toDisplayText(message));
        if (media != null) {
            binding.media.setMedia(media);
        }
        binding.debugBox.setVisibility(WherigoGame.get().isDebugModeForCartridge() ? VISIBLE : GONE);
        if (WherigoGame.get().isDebugModeForCartridge()) {
            //noinspection SetTextI18n (debug info only)
            binding.debugInfo.setText("Wherigo Dialog");
        }

        binding.headerInformation.setVisibility(texts.length > 1 ? View.VISIBLE : View.GONE);
        binding.headerInformation.setText(LocalizationUtils.getString(R.string.wherigo_dialog_push_page, String.valueOf(page + 1), String.valueOf(texts.length)));
    }
Handles display of an OpenWIG push dialog. The following description is copied for reference from OpenWIG code
<p>
Shows a multi-page dialog to the user.
<p>
If another dialog or input is open, it should be closed before displaying this dialog.
<p>
While the dialog is open, user should only be able to continue by clicking one of its buttons. Button1 flips to
next page, and when at end, invokes the callback with parameter "Button1", regardless of value of button1.
Button2 immediately closes the dialog and invokes callback with parameter "Button2".
If the dialog is closed by another API call, callback should be invoked with null parameter.
@param texts texts of individual pages of dialog
@param media pictures for individual pages of dialog
@param button1 label for primary button. If null, "OK" is used.
@param button2 label for secondary button. If null, the button is not displayed.
@param callback callback to call when closing the dialog, or null
main/src/main/java/cgeo/geocaching/wherigo/WherigoPushDialogProvider.java