Source:
public CaptchaHandler(final Activity activity, final WikiSite wiki, final ProgressDialog progressDialog, final View primaryView, final String prevTitle, final String submitButtonText) { this.activity = activity; this.wiki = wiki; this.progressDialog = progressDialog; this.primaryView = primaryView; this.prevTitle = prevTitle; TextView requestAccountText = activity.findViewById(R.id.request_account_textview); captchaContainer = activity.findViewById(R.id.captcha_container); captchaImage = activity.findViewById(R.id.captcha_image); captchaText = ((TextInputLayout) activity.findViewById(R.id.captcha_text)).getEditText(); captchaProgress = activity.findViewById(R.id.captcha_image_progress); TextView submitButton = activity.findViewById(R.id.captcha_submit_button); if (submitButtonText != null) { submitButton.setText(submitButtonText); submitButton.setVisibility(View.VISIBLE); } requestAccountText.setText(StringUtil.fromHtml(activity.getString(R.string.edit_section_captcha_request_an_account_message))); requestAccountText.setMovementMethod(new LinkMovementMethodExt( (@NonNull String url) -> FeedbackUtil.showAndroidAppRequestAnAccount(activity))); captchaImage.setOnClickListener((v) -> { captchaProgress.setVisibility(View.VISIBLE); new CaptchaClient().request(wiki, new CaptchaClient.Callback() { @Override public void success(@NonNull Call<Captcha> call, @NonNull CaptchaResult result) { captchaResult = result; captchaProgress.setVisibility(View.GONE); handleCaptcha(true); } @Override public void failure(@NonNull Call<Captcha> call, @NonNull Throwable caught) { cancelCaptcha(); captchaProgress.setVisibility(View.GONE); FeedbackUtil.showError(activity, caught); } }); }); }

Target:
public CaptchaHandler(final Activity activity, final WikiSite wiki, final ProgressDialog progressDialog, final View primaryView, final String prevTitle, final String submitButtonText) { this.activity = activity; this.wiki = wiki; this.progressDialog = progressDialog; this.primaryView = primaryView; this.prevTitle = prevTitle; TextView requestAccountText = activity.findViewById(R.id.request_account_textview); captchaContainer = activity.findViewById(R.id.captcha_container); captchaImage = activity.findViewById(R.id.captcha_image); captchaText = ((TextInputLayout) activity.findViewById(R.id.captcha_text)).getEditText(); captchaProgress = activity.findViewById(R.id.captcha_image_progress); TextView submitButton = activity.findViewById(R.id.captcha_submit_button); if (submitButtonText != null) { submitButton.setText(submitButtonText); submitButton.setVisibility(View.VISIBLE); } requestAccountText.setText(StringUtil.fromHtml(activity.getString(R.string.edit_section_captcha_request_an_account_message))); requestAccountText.setMovementMethod(new LinkMovementMethodExt((url) -> FeedbackUtil.showAndroidAppRequestAnAccount(activity))); captchaImage.setOnClickListener((v) -> { captchaProgress.setVisibility(View.VISIBLE); new CaptchaClient().request(wiki, new CaptchaClient.Callback() { @Override public void success(@NonNull Call<Captcha> call, @NonNull CaptchaResult result) { captchaResult = result; captchaProgress.setVisibility(View.GONE); handleCaptcha(true); } @Override public void failure(@NonNull Call<Captcha> call, @NonNull Throwable caught) { cancelCaptcha(); captchaProgress.setVisibility(View.GONE); FeedbackUtil.showError(activity, caught); } }); }); }