| | |
| | | IDialogButtonClick dialogButtonClickListener; |
| | | private String btnName; |
| | | private String link; |
| | | private Integer iconResourceId; |
| | | private String message; |
| | | |
| | | public Builder(Activity context) { |
| | | this.context = context; |
| | |
| | | public Builder setLeftBtnInfo(String btnName, String link) { |
| | | this.btnName = btnName; |
| | | this.link = link; |
| | | return this; |
| | | } |
| | | |
| | | public Builder setMessage(String message) { |
| | | this.message = message; |
| | | return this; |
| | | } |
| | | |
| | | |
| | | public Builder setIconResource(Integer resourceId) { |
| | | this.iconResourceId = resourceId; |
| | | return this; |
| | | } |
| | | |
| | |
| | | AQuery mAquery = new AQuery(layout); |
| | | final TextView tv_create = mAquery.id(R.id.tv_create).getTextView(); |
| | | final TextView tv_fanli = mAquery.id(R.id.tv_fanli).getTextView(); |
| | | //icon_goods_detail_notify |
| | | if (iconResourceId != null) { |
| | | //隐藏 |
| | | mAquery.id(R.id.iv_icon).visibility(View.VISIBLE); |
| | | mAquery.id(R.id.iv_icon).image(iconResourceId); |
| | | } else { |
| | | mAquery.id(R.id.iv_icon).visibility(View.GONE); |
| | | } |
| | | |
| | | if (message != null) { |
| | | mAquery.id(R.id.tv_message).text(message); |
| | | } |
| | | |
| | | |
| | | if (!StringUtils.isNullOrEmpty(btnName)) { |
| | | tv_create.setVisibility(View.VISIBLE); |