| | |
| | | import com.tejia.lijin.app.util.ad.ExpressAdManager; |
| | | import com.wpc.library.util.SystemCommon; |
| | | import com.wpc.library.util.common.DimenUtils; |
| | | import com.wpc.library.util.common.StringUtils; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | public static class Builder { |
| | | private Activity context; |
| | | IDialogButtonClick dialogButtonClickListener; |
| | | private String btnName; |
| | | private String link; |
| | | |
| | | public Builder(Activity context) { |
| | | this.context = context; |
| | | } |
| | | |
| | | |
| | | public Builder setLeftBtnInfo(String btnName, String link) { |
| | | this.btnName = btnName; |
| | | this.link = link; |
| | | return this; |
| | | } |
| | | |
| | | public Builder setOnButtonClickListener(IDialogButtonClick dialogCloseListener) { |
| | | this.dialogButtonClickListener = dialogCloseListener; |
| | |
| | | final TextView tv_create = mAquery.id(R.id.tv_create).getTextView(); |
| | | final TextView tv_fanli = mAquery.id(R.id.tv_fanli).getTextView(); |
| | | |
| | | if (!StringUtils.isNullOrEmpty(btnName)) { |
| | | tv_create.setVisibility(View.VISIBLE); |
| | | tv_create.setText(btnName); |
| | | } else { |
| | | tv_create.setVisibility(View.GONE); |
| | | tv_create.setText(btnName); |
| | | } |
| | | |
| | | |
| | | GradientDrawable gradientDrawable = new GradientDrawable(); |
| | | gradientDrawable.setStroke(1, Color.parseColor("#F53245")); |
| | | gradientDrawable.setColor(Color.WHITE); |
| | |
| | | tv_create.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | if (!StringUtils.isNullOrEmpty(link)) { |
| | | context.startActivity(new Intent(context, ShareBrowserActivity.class).putExtra("url", link)); |
| | | } |
| | | if (dialogButtonClickListener != null) |
| | | dialogButtonClickListener.onLeftClick(); |
| | | } |