From e9a3e8aa2fdd361e381d23a699b01488cf074b95 Mon Sep 17 00:00:00 2001 From: hch <16607480311@163.com> Date: Fri, 22 Mar 2024 10:13:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E5=AD=9711?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/res/layout/activity_user_home.xml | 6 ++--- common/src/main/res/values-en-rUS/string.xml | 2 +- common/src/main/res/values-en-rUS/strings.xml | 15 ++++++++--- common/src/main/res/values-zh-rHK/strings.xml | 9 ++++++- common/src/main/res/values-zh-rTW/strings.xml | 9 ++++++- common/src/main/res/values-zh/strings.xml | 13 +++++++--- common/src/main/res/values/strings.xml | 11 ++++++-- .../activity/CommunityDetailsActivity.java | 16 ++++++------ .../main/activity/UserHomeActivity.java | 26 ++++++++++++------- .../video/views/VideoPlayWrapViewHolder.java | 2 +- 10 files changed, 76 insertions(+), 33 deletions(-) diff --git a/common/src/main/res/layout/activity_user_home.xml b/common/src/main/res/layout/activity_user_home.xml index 6ca4ac9..1f483e2 100644 --- a/common/src/main/res/layout/activity_user_home.xml +++ b/common/src/main/res/layout/activity_user_home.xml @@ -482,7 +482,7 @@ @@ -581,7 +581,7 @@ @@ -649,7 +649,7 @@ diff --git a/common/src/main/res/values-en-rUS/string.xml b/common/src/main/res/values-en-rUS/string.xml index 84f93b7..41ea0ef 100644 --- a/common/src/main/res/values-en-rUS/string.xml +++ b/common/src/main/res/values-en-rUS/string.xml @@ -966,7 +966,7 @@ Limited ride And limited avatar frame Already collected Image quality selection More Settings - view more + see more The gift is on the way... start pk Remaining count :%s diff --git a/common/src/main/res/values-en-rUS/strings.xml b/common/src/main/res/values-en-rUS/strings.xml index 7ddc3d2..17f7824 100644 --- a/common/src/main/res/values-en-rUS/strings.xml +++ b/common/src/main/res/values-en-rUS/strings.xml @@ -1,7 +1,14 @@ - 真人认证 - 工会 - 已拉黑,无法查看 - 取消黑名单 + Real person + tradeUnion + Blocked and cannot be viewed + Cancel blacklist + Are you sure you want to delete the picture? + Upload successful + upload failed + Add up to 9 pictures + not interested + people liked it + 主播守護團 \ No newline at end of file diff --git a/common/src/main/res/values-zh-rHK/strings.xml b/common/src/main/res/values-zh-rHK/strings.xml index 1c5ef0b..4101e6a 100644 --- a/common/src/main/res/values-zh-rHK/strings.xml +++ b/common/src/main/res/values-zh-rHK/strings.xml @@ -1462,10 +1462,17 @@ 打招呼 回復 個人動態 - 真人认证 + 真人認證 工会 在線 離線 已拉黑,无法查看 取消黑名单 + 確定刪除圖片? + 上传成功 + 删除成功 + 最多添加9張圖片 + 不感興趣 + 人觉得很赞 + 主播守護團 diff --git a/common/src/main/res/values-zh-rTW/strings.xml b/common/src/main/res/values-zh-rTW/strings.xml index 61017c3..745ec8b 100644 --- a/common/src/main/res/values-zh-rTW/strings.xml +++ b/common/src/main/res/values-zh-rTW/strings.xml @@ -1461,11 +1461,18 @@ 打招呼 回復 個人動態 - 真人认证 + 真人認證 工会 在線 離線 已拉黑,无法查看 取消黑名单 + 確定刪除圖片? + 上传成功 + 删除成功 + 最多添加9張圖片 + 不感興趣 + 人觉得很赞 + 主播守護團 diff --git a/common/src/main/res/values-zh/strings.xml b/common/src/main/res/values-zh/strings.xml index a6b5b2b..f13e3b2 100644 --- a/common/src/main/res/values-zh/strings.xml +++ b/common/src/main/res/values-zh/strings.xml @@ -1458,11 +1458,18 @@ 打招呼 回復 個人動態 - 真人认证 + 真人認證 工会 在線 離線 - 獲讚 + 獲贊 已拉黑,无法查看 - 取消黑名单 + 取消黑名單 + 確定刪除圖片? + 上传成功 + 删除成功 + 最多添加9張圖片 + 不感興趣 + 人觉得很赞 + 主播守護團 diff --git a/common/src/main/res/values/strings.xml b/common/src/main/res/values/strings.xml index 9864896..2f58e37 100644 --- a/common/src/main/res/values/strings.xml +++ b/common/src/main/res/values/strings.xml @@ -1482,11 +1482,18 @@ Limited ride And limited avatar frame Online Offline 个人动态 - 真人认证 + Real person 工会 - Like + Liked 已拉黑,无法查看 取消黑名单 + 確定刪除圖片? + 上传成功 + 删除成功 + 最多添加9張圖片 + 不感興趣 + 人觉得很赞 + 主播守護團 diff --git a/main/src/main/java/com/yunbao/main/activity/CommunityDetailsActivity.java b/main/src/main/java/com/yunbao/main/activity/CommunityDetailsActivity.java index 0ed25f6..ebad92c 100644 --- a/main/src/main/java/com/yunbao/main/activity/CommunityDetailsActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/CommunityDetailsActivity.java @@ -148,12 +148,12 @@ public class CommunityDetailsActivity extends AbsActivity { public void callback(Integer isAttention) { if (isAttention == 1) { ImgLoader.display(CommunityDetailsActivity.this, R.mipmap.icon_like_followed, followIcon); - followName.setText("已关注"); + followName.setText(getResources().getString(R.string.following)); followName.setTextColor(Color.parseColor("#777777")); followLayout.setBackground(getResources().getDrawable(R.drawable.bg_main_com_type_1)); } else { ImgLoader.display(CommunityDetailsActivity.this, R.mipmap.icon_like_follow, followIcon); - followName.setText("关注"); + followName.setText(getResources().getString(R.string.follow)); followName.setTextColor(getResources().getColor(R.color.white)); followLayout.setBackground(getResources().getDrawable(R.drawable.bg_main_com_type)); } @@ -173,11 +173,11 @@ public class CommunityDetailsActivity extends AbsActivity { if (activeBean.getIs_love().equals("1")) { activeBean.setIs_love("0"); ImgLoader.display(CommunityDetailsActivity.this, R.mipmap.icon_like01, like); - likeCount.setText(Integer.parseInt(activeBean.getLove_num()) - 1 + "人觉得很赞"); + likeCount.setText(Integer.parseInt(activeBean.getLove_num()) - 1 + getResources().getString(com.yunbao.main.R.string.person_like)); } else { activeBean.setIs_love("1"); ImgLoader.display(CommunityDetailsActivity.this, R.mipmap.icon_like, like); - likeCount.setText(Integer.parseInt(activeBean.getLove_num()) + 1 + "人觉得很赞"); + likeCount.setText(Integer.parseInt(activeBean.getLove_num()) + 1 + getResources().getString(com.yunbao.main.R.string.person_like)); } } } @@ -189,8 +189,8 @@ public class CommunityDetailsActivity extends AbsActivity { @Override public void onClick(View v) { SparseArray array = new SparseArray<>(); - array.append(0, "举报"); - array.append(1, "不感兴趣"); + array.append(0, getResources().getString(R.string.report)); + array.append(1, getResources().getString(R.string.not_interested)); DialogUitl.showStringArrayDialog(CommunityDetailsActivity.this, array, new DialogUitl.StringArrayDialogCallback() { @Override public void onItemClick(String text, int tag) { @@ -365,12 +365,12 @@ public class CommunityDetailsActivity extends AbsActivity { } if (activeBean.getIs_attention().equals("1")) {//关注 ImgLoader.display(CommunityDetailsActivity.this, R.mipmap.icon_like_followed, followIcon); - followName.setText("已关注"); + followName.setText(getResources().getString(R.string.following)); followName.setTextColor(Color.parseColor("#777777")); followLayout.setBackground(getResources().getDrawable(R.drawable.bg_main_com_type_1)); } else { ImgLoader.display(CommunityDetailsActivity.this, R.mipmap.icon_like_follow, followIcon); - followName.setText("关注"); + followName.setText(getResources().getString(R.string.follow)); followName.setTextColor(getResources().getColor(R.color.white)); followLayout.setBackground(getResources().getDrawable(R.drawable.bg_main_com_type)); } diff --git a/main/src/main/java/com/yunbao/main/activity/UserHomeActivity.java b/main/src/main/java/com/yunbao/main/activity/UserHomeActivity.java index de6073c..829eba0 100644 --- a/main/src/main/java/com/yunbao/main/activity/UserHomeActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/UserHomeActivity.java @@ -2,6 +2,7 @@ package com.yunbao.main.activity; import android.Manifest; import android.annotation.SuppressLint; +import android.app.Dialog; import android.content.Intent; import android.content.pm.PackageManager; import android.database.Cursor; @@ -326,8 +327,13 @@ public class UserHomeActivity extends AbsActivity { @Override public void onImgDel(UserHomeImgBean activeBean, int position) { - bannerImgList.remove(position); - uploadImg(false); + DialogUitl.showSimpleDialog(mContext, getResources().getString(com.yunbao.main.R.string.user_home_img_del_dialog), new DialogUitl.SimpleCallback() { + @Override + public void onConfirmClick(Dialog dialog, String content) { + bannerImgList.remove(position); + uploadImg(false); + } + }); } }); mBanner.setAutoPlay(false).setPages(bannerImgList, new UserHomeImgsViewHolder()).setOnPageChangeListener(new ViewPager.OnPageChangeListener() { @@ -452,12 +458,12 @@ public class UserHomeActivity extends AbsActivity { public void callback(Integer isAttention) { if (isAttention == 1) { ImgLoader.display(UserHomeActivity.this, R.mipmap.icon_like_followed, followIcon); - followName.setText("已关注"); + followName.setText(getResources().getString(R.string.following)); followName.setTextColor(Color.parseColor("#777777")); followLayout.setBackground(getResources().getDrawable(R.drawable.bg_main_com_type_1)); } else { ImgLoader.display(UserHomeActivity.this, R.mipmap.icon_like_follow, followIcon); - followName.setText("关注"); + followName.setText(getResources().getString(R.string.follow)); followName.setTextColor(getResources().getColor(R.color.white)); followLayout.setBackground(getResources().getDrawable(R.drawable.bg_main_com_type)); } @@ -478,7 +484,7 @@ public class UserHomeActivity extends AbsActivity { itemLayout03.setVisibility(View.GONE); itemLayout04.setVisibility(View.GONE); } - moreText.setText("查看更多"); + moreText.setText(getResources().getString(R.string.moer)); ImgLoader.display(mContext, R.mipmap.icon_down, moreIcon); } else { if (isAnchor) { @@ -490,7 +496,7 @@ public class UserHomeActivity extends AbsActivity { itemLayout03.setVisibility(View.VISIBLE); itemLayout04.setVisibility(View.VISIBLE); } - moreText.setText("收起"); + moreText.setText(getResources().getString(R.string.video_comment_collapsed)); ImgLoader.display(mContext, R.mipmap.icon_up, moreIcon); } isShowcase = !isShowcase; @@ -535,6 +541,8 @@ public class UserHomeActivity extends AbsActivity { public void onClick(View v) { if (bannerImgList.size() < 9) { selectImg(); + }else{ + ToastUtil.show(getResources().getString(com.yunbao.main.R.string._9)); } } }); @@ -549,7 +557,7 @@ public class UserHomeActivity extends AbsActivity { public void onClick(View v) { String temp = userInfo.getCheckBlack().get(0).getU2t().equals("0") ? getResources().getString(R.string.black_add) : getResources().getString(com.yunbao.main.R.string.cancel_back); SparseArray array = new SparseArray<>(); - array.append(1, "不感興趣"); + array.append(1, getResources().getString(com.yunbao.main.R.string.not_interested)); array.append(0, getResources().getString(R.string.report)); array.append(2, temp); DialogUitl.showStringArrayDialog(UserHomeActivity.this, array, new DialogUitl.StringArrayDialogCallback() { @@ -736,9 +744,9 @@ public class UserHomeActivity extends AbsActivity { public void onSuccess(int code, String msg, String[] info) { if (code == 0 && info != null) { if (isUp) { - ToastUtil.show("上传成功"); + ToastUtil.show(getResources().getString(com.yunbao.main.R.string.upload_success)); } else { - ToastUtil.show("删除成功"); + ToastUtil.show(getResources().getString(com.yunbao.main.R.string.upload_failed)); } mBanner.setPages(bannerImgList, new UserHomeImgsViewHolder()).start(); tempList = new ArrayList<>(); diff --git a/video/src/main/java/com/yunbao/video/views/VideoPlayWrapViewHolder.java b/video/src/main/java/com/yunbao/video/views/VideoPlayWrapViewHolder.java index 4b454c3..71fe57c 100644 --- a/video/src/main/java/com/yunbao/video/views/VideoPlayWrapViewHolder.java +++ b/video/src/main/java/com/yunbao/video/views/VideoPlayWrapViewHolder.java @@ -143,7 +143,7 @@ public class VideoPlayWrapViewHolder extends AbsViewHolder implements View.OnCli @Override public void onClick(View v) { SparseArray array = new SparseArray<>(); - array.append(0, "举报"); + array.append(0, mContext.getResources().getString(com.yunbao.common.R.string.report)); array.append(1, "不感兴趣"); DialogUitl.showStringArrayDialog(mContext, array, new DialogUitl.StringArrayDialogCallback() { @Override