|
|
@@ -1442,7 +1442,7 @@ public class ViewUtil {
|
|
|
TextView confirmBtn = container.findViewById(R.id.confirm_btn);
|
|
|
confirmBtn.setText(confirmString);
|
|
|
confirmBtn.setOnClickListener((v) -> {
|
|
|
- if(isDismiss) {
|
|
|
+ if (isDismiss) {
|
|
|
dialog.dismiss();
|
|
|
}
|
|
|
confirmListener.onActin(dialog);
|
|
|
@@ -1762,11 +1762,7 @@ public class ViewUtil {
|
|
|
RequestBuilder<Drawable> builder = Glide.with(activity).load(advertising.getAd_img());
|
|
|
builder.apply(new RequestOptions().transform(new RoundedCornersTransformation(activity.getResources().getDimensionPixelSize(R.dimen.content_padding_36), 0, RoundedCornersTransformation.CornerType.BOTTOM)));
|
|
|
builder.into(ad_iv);
|
|
|
- if (advertising.getAd_img().toLowerCase().endsWith("gif")) {
|
|
|
- ViewUtil.setGif(ad_iv, advertising.getAd_img());
|
|
|
- } else {
|
|
|
- ViewUtil.setImage(ad_iv, advertising.getAd_img());
|
|
|
- }
|
|
|
+ ViewUtil.setImage(ad_iv, advertising.getAd_img());
|
|
|
dialog_center_ll.setPadding(0, activity.getResources().getDimensionPixelSize(R.dimen.content_padding_54), 0, 0);
|
|
|
ViewGroup parent = (ViewGroup) dialog_center_ll.getParent();
|
|
|
((FrameLayout.LayoutParams) parent.getLayoutParams()).setMargins(0, 0, 0, 0);
|
|
|
@@ -1857,9 +1853,9 @@ public class ViewUtil {
|
|
|
if (days >= 0 && days <= 7) {
|
|
|
String flag = user.getId() + "_" + user.getVip_time();
|
|
|
int curr = SpUtils.getAsInt("vip_" + flag, -1);
|
|
|
- LogUtil.logI("VIP has " + days + " days"+", record "+curr+" days");
|
|
|
+ LogUtil.logI("VIP has " + days + " days" + ", record " + curr + " days");
|
|
|
if (curr == -1 || days < curr) {
|
|
|
- SpUtils.putAsInt("vip_" + flag, (int)days);
|
|
|
+ SpUtils.putAsInt("vip_" + flag, (int) days);
|
|
|
showConfirmDialog(context, "温馨提示", "您的会员剩余" + days + "天过期, 为保障您的会员权益请立即续费~!",
|
|
|
"下次再说", "立即续费", diag -> {
|
|
|
|
|
|
@@ -2082,11 +2078,7 @@ public class ViewUtil {
|
|
|
}
|
|
|
|
|
|
public static void setGif(ImageView imageView, String url) {
|
|
|
- GlideApp.with(imageView)
|
|
|
- .asGif()
|
|
|
- .load(url)
|
|
|
- .format(DecodeFormat.PREFER_ARGB_8888)
|
|
|
- .into(imageView);
|
|
|
+ GlideImageLoader.setGif(imageView, url);
|
|
|
}
|
|
|
|
|
|
public static void setImage(ImageView imageView, Object object) {
|
|
|
@@ -2099,7 +2091,11 @@ public class ViewUtil {
|
|
|
if (pictures.contains(";")) {
|
|
|
pictures = pictures.split(";")[0];
|
|
|
}
|
|
|
- GlideImageLoader.setImage(imageView, pictures);
|
|
|
+ if (pictures.toLowerCase().endsWith("gif")) {
|
|
|
+ GlideImageLoader.setGif(imageView, pictures);
|
|
|
+ } else {
|
|
|
+ GlideImageLoader.setImage(imageView, pictures);
|
|
|
+ }
|
|
|
}
|
|
|
} else {
|
|
|
GlideImageLoader.setImage(imageView, object);
|