优化问题提交
This commit is contained in:
@ -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();
|
||||
|
||||
Reference in New Issue
Block a user