优化问题提交

This commit is contained in:
kehaoyuan
2019-07-16 17:42:41 +08:00
parent 6c5da2d787
commit 5b4ddcae1f
4 changed files with 25 additions and 11 deletions

View File

@ -948,12 +948,25 @@ public class DialogUtils {
TextView contentDesTv = contentView.findViewById(R.id.content_des);
TextView negativeTv = contentView.findViewById(R.id.negative);
TextView positiveTv = contentView.findViewById(R.id.positive);
titleTv.setText(title);
negativeTv.setText(negative);
positiveTv.setText(positive);
contentTitleTv.setText(contentTitle);
contentDesTv.setText(contentDes);
if (TextUtils.isEmpty(negative)) {
negativeTv.setVisibility(View.GONE);
} else {
negativeTv.setVisibility(View.VISIBLE);
negativeTv.setText(negative);
}
if (TextUtils.isEmpty(positive)) {
positiveTv.setVisibility(View.GONE);
} else {
positiveTv.setText(positive);
positiveTv.setVisibility(View.VISIBLE);
}
negativeTv.setOnClickListener(view -> {
if (clListener != null) {
clListener.onCancel();