[英]Notify what text was changed in textview
How can I notify that a text has been changed in a dialog? 如何通知对话框中的文本已更改?
I am making a fingerprint, when it succeeds I would like to exchange the message displayed in the textview of it. 我正在制作指纹,当指纹成功时,我想交换它的文本视图中显示的消息。
public void showDialog(){
AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(getActivity());
LayoutInflater inflater = this.getLayoutInflater();
View dialogView = inflater.inflate(R.layout.alert_dialog_digital, null);
TextView textFinger = dialogView.findViewById(R.id.text_finger);
dialogBuilder.setView(dialogView);
alertDialog = dialogBuilder.create();
alertDialog.show();
textFinger.setText(texto);
dialogView.findViewById(R.id.buttonCancelar).setOnClickListener(view -> {
fingerPrintAuthHelper.stopAuth();
alertDialog.dismiss();
});
}
@Override
public void onAuthSuccess(FingerprintManager.CryptoObject cryptoObject) {
texto = "Sucesso";
alertDialog.show();
presenter.sendData(bundle.getString(USER), bundle.getString(PASS));
FragmentUtils.navigateTo(getActivity(), TermsOfUseFragment.TAG, new TermsOfUseFragment(), R.id.fragmentContainer);
}
@Override
public void onAuthSuccess(FingerprintManager.CryptoObject cryptoObject) {
texto = "Sucesso";
textFinger.setText(texto); //Change to this
presenter.sendData(bundle.getString(USER), bundle.getString(PASS));
FragmentUtils.navigateTo(getActivity(), TermsOfUseFragment.TAG, new TermsOfUseFragment(), R.id.fragmentContainer);
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.