From d8e002a8bdcbf4c23c166fbc34472825e8f97326 Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Thu, 28 Mar 2024 14:13:06 +0800 Subject: [PATCH] =?UTF-8?q?fix=20[=E8=8B=B1=E6=96=87=E7=89=88-=E7=94=A8?= =?UTF-8?q?=E6=88=B7-=E9=80=89=E6=8B=A9=E5=A4=9A=E4=B8=AA=E7=88=B1?= =?UTF-8?q?=E5=A5=BD=E5=90=8E=EF=BC=8C=E5=86=85=E5=AE=B9=E4=B8=8E=E6=A0=87?= =?UTF-8?q?=E7=AD=BE=E5=90=8D=E9=9A=94=E5=BC=80=E4=B8=8B=EF=BC=9B=E4=BF=9D?= =?UTF-8?q?=E5=AD=98=E6=88=90=E5=8A=9F=E6=8F=90=E7=A4=BA=E8=AF=AD=E8=BF=98?= =?UTF-8?q?=E6=98=AF=E4=B8=AD=E6=96=87=EF=BC=9B=E4=BF=9D=E5=AD=98=E6=88=90?= =?UTF-8?q?=E5=8A=9F=E5=90=8E=EF=BC=8C=E9=80=89=E6=8B=A9=E7=9A=84=E5=86=85?= =?UTF-8?q?=E5=AE=B9=E9=A1=B9=E4=B9=9F=E6=98=AF=E4=B8=AD=E6=96=87=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=EF=BC=8C=E5=8F=82=E8=80=83=E5=8F=B3=E5=9B=BE]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/yunbao/common/bean/MessageUserInfoBean.java | 10 ++++++++++ .../com/yunbao/main/activity/EditProfileActivity.java | 4 ++-- main/src/main/res/layout/activity_edit_profile.xml | 6 +++--- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/common/src/main/java/com/yunbao/common/bean/MessageUserInfoBean.java b/common/src/main/java/com/yunbao/common/bean/MessageUserInfoBean.java index 1aaa44d..4de3e7d 100644 --- a/common/src/main/java/com/yunbao/common/bean/MessageUserInfoBean.java +++ b/common/src/main/java/com/yunbao/common/bean/MessageUserInfoBean.java @@ -113,6 +113,8 @@ public class MessageUserInfoBean extends BaseModel{ private int is_hello; private String star_name; private String career; + @SerializedName("en_career") + private String enCareer; private String height; private String age; @SerializedName("open_off") @@ -120,6 +122,14 @@ public class MessageUserInfoBean extends BaseModel{ @SerializedName("rong_online") private int rongOnline;//0 在线 非0 其他 + public String getEnCareer() { + return enCareer; + } + + public void setEnCareer(String enCareer) { + this.enCareer = enCareer; + } + public void setOpenOff(int openOff) { this.openOff = openOff; } diff --git a/main/src/main/java/com/yunbao/main/activity/EditProfileActivity.java b/main/src/main/java/com/yunbao/main/activity/EditProfileActivity.java index 9773cb4..3971257 100644 --- a/main/src/main/java/com/yunbao/main/activity/EditProfileActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/EditProfileActivity.java @@ -450,7 +450,7 @@ public class EditProfileActivity extends AbsActivity { .setCareer(cn, en, new com.yunbao.common.http.base.HttpCallback() { @Override public void onSuccess(HttpCallbackModel data) { - ToastUtil.show(data.getMsg()); +// ToastUtil.show(data.getMsg()); ((TextView) findViewById(R.id.occupation)).setText(WordUtil.isNewZh() ? cn : en); } @@ -878,7 +878,7 @@ public class EditProfileActivity extends AbsActivity { @Override public void onSuccess(MessageUserInfoBean data) { userInfoBean = data; - ((TextView) findViewById(R.id.occupation)).setText(data.getInfo().getCareer()); + ((TextView) findViewById(R.id.occupation)).setText(WordUtil.isNewZh()?data.getInfo().getCareer():data.getInfo().getEnCareer()); String height = data.getInfo().getHeight(); if ("0".equals(height) || StringUtil.isEmpty(height)) { // height="170"; diff --git a/main/src/main/res/layout/activity_edit_profile.xml b/main/src/main/res/layout/activity_edit_profile.xml index f7672ec..ca8da3d 100644 --- a/main/src/main/res/layout/activity_edit_profile.xml +++ b/main/src/main/res/layout/activity_edit_profile.xml @@ -494,10 +494,10 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_centerVertical="true" - android:layout_marginLeft="70dp" - android:layout_marginRight="25dp" + android:layout_marginStart="90dp" + android:layout_marginEnd="25dp" android:ellipsize="end" - android:gravity="right" + android:gravity="end" android:singleLine="true" android:textColor="#353535" android:textSize="14sp"