|
|
@@ -42,7 +42,6 @@ import com.sheep.gamegroup.util.CommonUtil;
|
|
|
import com.sheep.gamegroup.util.DataUtil;
|
|
|
import com.sheep.gamegroup.util.GlideImageLoader;
|
|
|
import com.sheep.gamegroup.util.ListUtil;
|
|
|
-import com.sheep.gamegroup.util.LogUtil;
|
|
|
import com.sheep.gamegroup.util.StringUtils;
|
|
|
import com.sheep.gamegroup.util.ViewHolder;
|
|
|
import com.sheep.gamegroup.util.ViewUtil;
|
|
|
@@ -255,7 +254,7 @@ public class ActInvitation extends BaseActivity {
|
|
|
Glide.with(SheepApp.getInstance())
|
|
|
.load(file)
|
|
|
.listener(listener)
|
|
|
- .apply(new RequestOptions().override(w, h).transform(new RoundedCorners(getResources().getDimensionPixelSize(R.dimen.content_padding_8))))
|
|
|
+ .apply(new RequestOptions().disallowHardwareConfig().override(w, h).transform(new RoundedCorners(getResources().getDimensionPixelSize(R.dimen.content_padding_8))))
|
|
|
.into(image_full);
|
|
|
updateLayoutParams(index, 500L);
|
|
|
}
|
|
|
@@ -333,7 +332,7 @@ public class ActInvitation extends BaseActivity {
|
|
|
float radius = 4 / 216F;
|
|
|
float topRadius = 2 / 216F;
|
|
|
float logoRadius = rqRadius * 16 / 68;
|
|
|
- GlideImageLoader.saveAndSetRqImage(image_bottom, item.getLink(), (int) (imgWidth * rqRadius));
|
|
|
+ GlideImageLoader.saveAndSetRqImageDisHardConfig(image_bottom, item.getLink(), (int) (imgWidth * rqRadius));
|
|
|
//重新设置logo的宽高
|
|
|
ViewGroup.LayoutParams layoutParams = image_logo.getLayoutParams();
|
|
|
layoutParams.width = (int) (imgWidth * logoRadius);
|
|
|
@@ -400,7 +399,7 @@ public class ActInvitation extends BaseActivity {
|
|
|
ImageView ask_to_share_item_img = itemView.findViewById(R.id.ask_to_share_item_img);
|
|
|
TextView ask_to_share_item_name = itemView.findViewById(R.id.ask_to_share_item_name);
|
|
|
final int position = holder.getAdapterPosition();
|
|
|
- GlideImageLoader.setImage(ask_to_share_item_img, getNetImgByName(imgList.get(position)));
|
|
|
+ GlideImageLoader.setImageDisHardConfig(ask_to_share_item_img, getNetImgByName(imgList.get(position)));
|
|
|
ask_to_share_item_name.setText(nameList.get(position));
|
|
|
itemView.setOnClickListener(new View.OnClickListener() {
|
|
|
@Override
|
|
|
@@ -412,13 +411,15 @@ public class ActInvitation extends BaseActivity {
|
|
|
PictureInvitationEntity picItem = ListUtil.getItem(mPictureList, curPosition);
|
|
|
if (picItem != null && picItem.isLoaded()) {
|
|
|
try {
|
|
|
- String fileName = String.format(Locale.CHINA, "share%d%s%d.jpg", position, BuildConfig.FLAVOR, picItem.getPicture().hashCode());
|
|
|
+ String fileName = String.format(Locale.CHINA, "share%d%s%d.jpg", curPosition, BuildConfig.FLAVOR, picItem.getPicture().hashCode());
|
|
|
file = new File(ClassFileHelper.DIR, fileName);
|
|
|
if (!file.exists()) {
|
|
|
file = ViewUtil.saveImage(viewList.get(curPosition), ClassFileHelper.DIR, fileName);
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
+ G.showToast(e.getMessage());
|
|
|
+ return;
|
|
|
}
|
|
|
} else {
|
|
|
G.showToast("图片正在加载中,请稍等");
|