Customize the Update Dialog UI
masterYou can provide your own Dialog implementation by setting a CustomVersionDialogListener.
Requirements:
- Use the
contextprovided in the callback to instantiate your dialog. - The dialog must contain a 'Confirm Download' button with the ID
@id/versionchecklib_version_dialog_commit. - If you include a 'Cancel' button, it must have the ID
@id/versionchecklib_version_dialog_cancel. - Use the
UIData(passed asversionBundle) to retrieve custom data you set during the request phase.
builder.setCustomVersionDialogListener((context, versionBundle) -> {
BaseDialog baseDialog = new BaseDialog(context, R.style.BaseDialog, R.layout.custom_dialog_one_layout);
TextView textView = baseDialog.findViewById(R.id.tv_msg);
textView.setText(versionBundle.getContent());
return baseDialog;
});