From f99d193598b514271176d28aa99a2e4a3e7a51a1 Mon Sep 17 00:00:00 2001 From: max Date: Thu, 29 Aug 2024 16:42:24 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BF=AE=E6=94=B9=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E5=88=97=E8=A1=A8=20UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ui/im/recent/holder/RecentViewHolder.java | 4 +- .../adapter/ContactsIndicatorAdapter.java | 10 +- .../ui/user/adapter/UserInfoMedalAdapter.kt | 51 ++- .../titles/SimplePagerTitleView.java | 2 +- app/src/main/res/layout-v28/fragment_me.xml | 356 ------------------ .../res/layout/activity_convert_diamond.xml | 6 +- app/src/main/res/layout/fragment_me.xml | 15 +- .../res/layout/home_recommend_item_rank.xml | 37 +- .../res/layout/maint_tab_red_poin_layout.xml | 4 +- .../nim_recent_contact_list_item_new.xml | 19 +- .../res/layout/user_info_data_fragment.xml | 4 +- .../main/res/layout/user_info_item_medal.xml | 10 +- app/src/main/res/values-ar/strings.xml | 1 + app/src/main/res/values-zh-rTW/strings.xml | 3 +- app/src/main/res/values/strings.xml | 1 + 15 files changed, 123 insertions(+), 400 deletions(-) delete mode 100644 app/src/main/res/layout-v28/fragment_me.xml diff --git a/app/src/main/java/com/chwl/app/ui/im/recent/holder/RecentViewHolder.java b/app/src/main/java/com/chwl/app/ui/im/recent/holder/RecentViewHolder.java index 215cacf15..7099bd46c 100644 --- a/app/src/main/java/com/chwl/app/ui/im/recent/holder/RecentViewHolder.java +++ b/app/src/main/java/com/chwl/app/ui/im/recent/holder/RecentViewHolder.java @@ -79,9 +79,9 @@ public abstract class RecentViewHolder extends RecyclerViewHolder mTitleList; - private int textSize = 16; - private float minScale = 1f; + private int textSize = 20; + private float minScale = 0.8f; private boolean showIndicator = true; private OnItemSelectListener mOnItemSelectListener; @@ -37,8 +39,8 @@ public class ContactsIndicatorAdapter extends CommonNavigatorAdapter { @Override public IPagerTitleView getTitleView(Context context, final int i) { ScaleTransitionPagerTitleView scaleTransitionPagerTitleView = new ScaleTransitionPagerTitleView(context, true); - scaleTransitionPagerTitleView.setNormalColor(ContextCompat.getColor(context, R.color.color_84868A)); - scaleTransitionPagerTitleView.setSelectedColor(ContextCompat.getColor(context, R.color.color_1E1E1F)); + scaleTransitionPagerTitleView.setNormalColor(ContextCompat.getColor(context, R.color.color_313131)); + scaleTransitionPagerTitleView.setSelectedColor(ContextCompat.getColor(context, R.color.color_313131)); scaleTransitionPagerTitleView.setMinScale(minScale); scaleTransitionPagerTitleView.setTextSize(textSize); int padding = UIUtil.dip2px(context, 16); diff --git a/app/src/main/java/com/chwl/app/ui/user/adapter/UserInfoMedalAdapter.kt b/app/src/main/java/com/chwl/app/ui/user/adapter/UserInfoMedalAdapter.kt index 10d9ebb1e..7b6671bda 100644 --- a/app/src/main/java/com/chwl/app/ui/user/adapter/UserInfoMedalAdapter.kt +++ b/app/src/main/java/com/chwl/app/ui/user/adapter/UserInfoMedalAdapter.kt @@ -6,11 +6,58 @@ import com.chad.library.adapter.base.BaseViewHolder import com.chwl.app.R import com.chwl.app.ui.utils.load import com.chwl.core.user.bean.MedalBean +import com.chwl.library.download.DownloadManager +import com.chwl.library.download.DownloadRequest +import com.chwl.library.download.DownloadTask +import com.chwl.library.download.FileDownloadListener +import com.chwl.library.utils.PathHelper +import com.tencent.qgame.animplayer.AnimConfig +import com.tencent.qgame.animplayer.AnimView +import com.tencent.qgame.animplayer.inter.IAnimListener +import com.tencent.qgame.animplayer.util.ScaleType +import java.io.File class UserInfoMedalAdapter : BaseQuickAdapter(R.layout.user_info_item_medal) { override fun convert(helper: BaseViewHolder, item: MedalBean) { - val imageView = helper.getView(R.id.iv_image) - imageView.load(item.picUrl) + item.picUrl?.let { + if (it.replace("\n", "").lowercase().endsWith("mp4")) { + val mp4View = helper.getView(R.id.iv_mp4) + mp4View.setScaleType(ScaleType.FIT_XY) + mp4View.setLoop(Int.MAX_VALUE) + mp4View.setAnimListener(object : IAnimListener { + override fun onFailed(errorType: Int, errorMsg: String?) { + + } + + override fun onVideoComplete() { + + } + + override fun onVideoDestroy() { + + } + + override fun onVideoRender(frameIndex: Int, config: AnimConfig?) { + + } + + override fun onVideoStart() { + + } + }) + val filePath = PathHelper.generateResourcesFilePath(it) + val request = DownloadRequest.build(it, filePath, "", null, 600000L) + DownloadManager.download(request, object : FileDownloadListener() { + override fun onDownloadCompleted(task: DownloadTask) { + val path = task.getRequest().getPath() + mp4View.startPlay(File(path)) + } + }) + } else { + val imageView = helper.getView(R.id.iv_image) + imageView.load(item.picUrl) + } + } } } \ No newline at end of file diff --git a/app/src/main/java/com/chwl/app/ui/widget/magicindicator/buildins/commonnavigator/titles/SimplePagerTitleView.java b/app/src/main/java/com/chwl/app/ui/widget/magicindicator/buildins/commonnavigator/titles/SimplePagerTitleView.java index f017eff78..4eb1f81de 100644 --- a/app/src/main/java/com/chwl/app/ui/widget/magicindicator/buildins/commonnavigator/titles/SimplePagerTitleView.java +++ b/app/src/main/java/com/chwl/app/ui/widget/magicindicator/buildins/commonnavigator/titles/SimplePagerTitleView.java @@ -16,7 +16,7 @@ import com.chwl.app.ui.widget.magicindicator.buildins.commonnavigator.abs.IMeasu * 博客: http://hackware.lucode.net * Created by hackware on 2016/6/26. */ -public class SimplePagerTitleView extends TextView implements IMeasurablePagerTitleView { +public class SimplePagerTitleView extends androidx.appcompat.widget.AppCompatTextView implements IMeasurablePagerTitleView { protected int mSelectedColor; protected int mNormalColor; diff --git a/app/src/main/res/layout-v28/fragment_me.xml b/app/src/main/res/layout-v28/fragment_me.xml deleted file mode 100644 index 87643d93c..000000000 --- a/app/src/main/res/layout-v28/fragment_me.xml +++ /dev/null @@ -1,356 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/src/main/res/layout/activity_convert_diamond.xml b/app/src/main/res/layout/activity_convert_diamond.xml index 8e7906726..eca4ce796 100644 --- a/app/src/main/res/layout/activity_convert_diamond.xml +++ b/app/src/main/res/layout/activity_convert_diamond.xml @@ -121,9 +121,11 @@ android:layout_marginEnd="@dimen/dp_8" android:background="@null" android:digits="1234567890" - android:focusable="true" + android:clickable="false" + android:focusable="false" + android:cursorVisible="false" android:gravity="center_vertical|end" - android:hint="@string/please_enter" + android:hint="@string/gold_transfer_placeholder" android:inputType="number" android:maxLength="18" android:textColor="@color/white" diff --git a/app/src/main/res/layout/fragment_me.xml b/app/src/main/res/layout/fragment_me.xml index 106000af0..eb3579e11 100644 --- a/app/src/main/res/layout/fragment_me.xml +++ b/app/src/main/res/layout/fragment_me.xml @@ -256,18 +256,19 @@ android:layout_marginTop="@dimen/dp_24" android:onClick="@{click}" android:src="@drawable/me_bg_wallet" - app:layout_constraintDimensionRatio="330:210" + app:layout_constraintDimensionRatio="108:80" app:layout_constraintEnd_toStartOf="@id/iv_vip" app:layout_constraintHorizontal_chainStyle="spread_inside" app:layout_constraintStart_toStartOf="@id/line_wallet_start" app:layout_constraintTop_toBottomOf="@id/ll_user_attentions" - app:layout_constraintWidth_percent="0.2933" /> + app:layout_constraintWidth_percent="0.288" /> + app:layout_constraintWidth_percent="0.288" /> + app:layout_constraintWidth_percent="0.288" /> + app:layout_constraintVertical_bias="0" + app:layout_constraintWidth_percent="0.371" /> + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintHorizontal_bias="0.018" + app:layout_constraintVertical_bias="0.982" + app:layout_constraintWidth_percent="0.33" + /> + app:layout_constraintHorizontal_bias="0.982" + app:layout_constraintVertical_bias="0.982" + app:layout_constraintWidth_percent="0.33" /> \ No newline at end of file diff --git a/app/src/main/res/layout/maint_tab_red_poin_layout.xml b/app/src/main/res/layout/maint_tab_red_poin_layout.xml index d45f87934..be5f479ac 100644 --- a/app/src/main/res/layout/maint_tab_red_poin_layout.xml +++ b/app/src/main/res/layout/maint_tab_red_poin_layout.xml @@ -15,8 +15,8 @@ + android:orientation="horizontal" + android:background="@drawable/shape_white_10dp_round"> + + + tools:visibility="gone"> + tools:layout_height="@dimen/dp_150"> + diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml index e7e441682..32dbe34d5 100644 --- a/app/src/main/res/values-ar/strings.xml +++ b/app/src/main/res/values-ar/strings.xml @@ -5294,6 +5294,7 @@ المحفظة يرجى إدخال … + الرجاء إدخال رقم الماس... العد التنازلي ابدأ PK diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index e10e8aeac..8dcb79fda 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -5235,7 +5235,8 @@ 錢包 - 請輸入.. + 請輸入... + 請輸入鑽石數量... 倒計時 開始PK diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index e2f9d0ad4..59814620b 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -5275,6 +5275,7 @@ You cannot join again within 24 hours after leaving Wallet Please enter... + Please enter diamonds... Countdown Start PK