From 5b813aff88a250f4c35138eaa90b310028868c01 Mon Sep 17 00:00:00 2001 From: hch <16607480311@163.com> Date: Wed, 17 Jan 2024 11:12:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/res/layout/dialog_del_sys_msg.xml | 8 +-- common/src/main/res/values-en-rUS/string.xml | 2 + common/src/main/res/values-zh-rHK/strings.xml | 1 + common/src/main/res/values-zh-rTW/strings.xml | 2 + common/src/main/res/values-zh/strings.xml | 2 + common/src/main/res/values/strings.xml | 2 + .../live/activity/CompensateActivity.java | 52 ++++++------------- .../main/res/layout/activity_compensate.xml | 12 ++--- 8 files changed, 36 insertions(+), 45 deletions(-) diff --git a/common/src/main/res/layout/dialog_del_sys_msg.xml b/common/src/main/res/layout/dialog_del_sys_msg.xml index 3ef23ead4..691d65d14 100644 --- a/common/src/main/res/layout/dialog_del_sys_msg.xml +++ b/common/src/main/res/layout/dialog_del_sys_msg.xml @@ -26,26 +26,26 @@ android:orientation="horizontal"> diff --git a/common/src/main/res/values-en-rUS/string.xml b/common/src/main/res/values-en-rUS/string.xml index 52ccbcbbf..1a4af54ee 100644 --- a/common/src/main/res/values-en-rUS/string.xml +++ b/common/src/main/res/values-en-rUS/string.xml @@ -1445,4 +1445,6 @@ Limited ride And limited avatar frame Information Unmute Mute + + Cancel diff --git a/common/src/main/res/values-zh-rHK/strings.xml b/common/src/main/res/values-zh-rHK/strings.xml index 46ff1fc27..d10050f16 100644 --- a/common/src/main/res/values-zh-rHK/strings.xml +++ b/common/src/main/res/values-zh-rHK/strings.xml @@ -1444,4 +1444,5 @@ 直播通行證 + 取消 diff --git a/common/src/main/res/values-zh-rTW/strings.xml b/common/src/main/res/values-zh-rTW/strings.xml index e17bbbf4f..1018b7ee1 100644 --- a/common/src/main/res/values-zh-rTW/strings.xml +++ b/common/src/main/res/values-zh-rTW/strings.xml @@ -1443,4 +1443,6 @@ 直播通行證 + 取消 + diff --git a/common/src/main/res/values-zh/strings.xml b/common/src/main/res/values-zh/strings.xml index 472ac39c6..7649f4799 100644 --- a/common/src/main/res/values-zh/strings.xml +++ b/common/src/main/res/values-zh/strings.xml @@ -1440,4 +1440,6 @@ 直播通行證 + 取消 + diff --git a/common/src/main/res/values/strings.xml b/common/src/main/res/values/strings.xml index 1b5e11e88..e40c4c050 100644 --- a/common/src/main/res/values/strings.xml +++ b/common/src/main/res/values/strings.xml @@ -1449,4 +1449,6 @@ Limited ride And limited avatar frame BattlePass + Cancel + diff --git a/live/src/main/java/com/yunbao/live/activity/CompensateActivity.java b/live/src/main/java/com/yunbao/live/activity/CompensateActivity.java index d6d8371bb..a3f24c18f 100644 --- a/live/src/main/java/com/yunbao/live/activity/CompensateActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/CompensateActivity.java @@ -6,6 +6,7 @@ import android.text.format.DateUtils; import android.view.View; import android.view.ViewOutlineProvider; import android.widget.Button; +import android.widget.ImageView; import android.widget.TextView; import androidx.recyclerview.widget.LinearLayoutManager; @@ -22,6 +23,7 @@ import com.yunbao.common.CommonAppConfig; import com.yunbao.common.Constants; import com.yunbao.common.activity.AbsActivity; import com.yunbao.common.bean.IMLoginModel; +import com.yunbao.common.glide.ImgLoader; import com.yunbao.common.http.HttpCallback; import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.utils.RouteUtil; @@ -51,7 +53,6 @@ import java.util.Map; @Route(path = RouteUtil.PATH_COMPENSATE_ACTIVITY) public class CompensateActivity extends AbsActivity { - Banner banner_me; TextView content; TextView time; RecyclerView recyclerView; @@ -59,6 +60,8 @@ public class CompensateActivity extends AbsActivity { String msgId, mBanner, mContent, link; Button submit; + ImageView imgContent; + @Override protected int getLayoutId() { return R.layout.activity_compensate; @@ -75,6 +78,7 @@ public class CompensateActivity extends AbsActivity { content = findViewById(R.id.content); submit = findViewById(R.id.submit); time = findViewById(R.id.time); + imgContent = findViewById(R.id.img_content); recyclerView = findViewById(R.id.hor_recycler); recyclerView.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.HORIZONTAL, false)); @@ -94,13 +98,6 @@ public class CompensateActivity extends AbsActivity { time.setText(sdf.format(currenTimeZone)); content.setText(mContent); - banner_me = findViewById(R.id.banner_me); - banner_me.setOutlineProvider(new ViewOutlineProvider() { - @Override - public void getOutline(View view, Outline outline) { - outline.setRoundRect(0, 0, view.getWidth(), view.getHeight(), 10); - } - }); if (!getIntent().getBooleanExtra("receive", false)) { submit.setBackground(mContext.getDrawable(R.mipmap.icon_sys_received)); submit.setText(getString(R.string.receive2)); @@ -130,13 +127,19 @@ public class CompensateActivity extends AbsActivity { getMessageGiftInfo(); if (!StringUtils.isEmpty(mBanner)) { - List mBannerList = new ArrayList<>(); - SlideBean slideBean = new SlideBean(); - slideBean.setSlide_pic(mBanner); - slideBean.setSlide_url(link); - mBannerList.add(slideBean); - showBanner(mBannerList); + ImgLoader.display(mContext, mBanner, imgContent); + + IMLoginModel userInfo = IMLoginManager.get(mContext).getUserInfo(); + StringBuffer urlBuffer = new StringBuffer(); + urlBuffer.append(link).append("&uid=").append(userInfo.getId()).append("&token=").append(userInfo.getToken()).append("&isZh=").append(WordUtil.isNewZh() ? "1" : 0); + findViewById(R.id.lt_advertisement).setVisibility(View.VISIBLE); + findViewById(R.id.lt_advertisement).setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + mContext.startActivity(new Intent(mContext, ZhuangBanActivity.class).putExtra("url", urlBuffer.toString())); + } + }); } } @@ -149,25 +152,4 @@ public class CompensateActivity extends AbsActivity { } }); } - - private void showBanner(List mBannerList) { - banner_me.setAutoPlay(true).setPages(mBannerList, new CustomMyViewHolder()).setDelayTime(3000).setBannerStyle(BannerConfig.NOT_INDICATOR).setOnBannerClickListener(new OnBannerClickListener() { - @Override - public void onBannerClick(List datas, int p) { - if (mBannerList != null) { - if (p >= 0 && p < mBannerList.size()) { - SlideBean bean = mBannerList.get(p); - if (!bean.getSlide_url().equals("")) { - - IMLoginModel userInfo = IMLoginManager.get(mContext).getUserInfo(); - StringBuffer urlBuffer = new StringBuffer(); - urlBuffer.append(bean.getSlide_url()).append("&uid=").append(userInfo.getId()).append("&token=").append(userInfo.getToken()).append("&isZh=").append(WordUtil.isNewZh() ? "1" : 0); - mContext.startActivity(new Intent(mContext, ZhuangBanActivity.class).putExtra("url", urlBuffer.toString())); - - } - } - } - } - }).start(); - } } diff --git a/live/src/main/res/layout/activity_compensate.xml b/live/src/main/res/layout/activity_compensate.xml index a4dafaf6e..890092289 100644 --- a/live/src/main/res/layout/activity_compensate.xml +++ b/live/src/main/res/layout/activity_compensate.xml @@ -80,13 +80,13 @@ app:cardCornerRadius="10dp" app:cardElevation="0dp"> - + android:layout_height="87dp" + android:layout_centerHorizontal="true" + android:scaleType="centerCrop" /> +