fix [修复-没有背景墙图片展示问题]

This commit is contained in:
hch 2024-03-26 17:31:45 +08:00
parent 453de855b9
commit fe2af299cb

View File

@ -5,12 +5,10 @@ import android.annotation.SuppressLint;
import android.app.Dialog;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.database.Cursor;
import android.graphics.Color;
import android.graphics.Outline;
import android.net.Uri;
import android.os.Build;
import android.provider.MediaStore;
import android.util.SparseArray;
import android.view.View;
import android.view.ViewOutlineProvider;
@ -271,7 +269,7 @@ public class UserHomeActivity extends AbsActivity {
tagList.add(userInfo.getUserHomeTopInfo().getAge() + (WordUtil.isNewZh() ? "" : "years old"));
}
if (!StringUtil.isEmpty(userInfo.getUserHomeTopInfo().getHeight())) {
tagList.add(userInfo.getUserHomeTopInfo().getHeight()+"cm");
tagList.add(userInfo.getUserHomeTopInfo().getHeight() + "cm");
}
if (!StringUtil.isEmpty(userInfo.getUserHomeTopInfo().getCareer())) {
tagList.add(userInfo.getUserHomeTopInfo().getCareer());
@ -354,6 +352,9 @@ public class UserHomeActivity extends AbsActivity {
public void onConfirmClick(Dialog dialog, String content) {
bannerImgList.remove(position);
uploadImg(false);
if (bannerImgList.isEmpty()) {
bannerImgList.add(userInfo.getUserHomeTopInfo().getUser_avatar());
}
}
});
}
@ -761,6 +762,12 @@ public class UserHomeActivity extends AbsActivity {
}
private void uploadImg(boolean isUp) {
for (int i = 0; i < bannerImgList.size(); i++) {
if (bannerImgList.get(i).equals(userInfo.getUserHomeTopInfo().getUser_avatar())) {
bannerImgList.remove(i);
break;
}
}
CommonHttpUtil.uploadUserInfoImg(new Gson().toJson(bannerImgList), new com.yunbao.common.http.HttpCallback() {
@Override
public void onSuccess(int code, String msg, String[] info) {