From 424efdafcfa70311d4a73f01a432d505db3e0984 Mon Sep 17 00:00:00 2001 From: liuyirong Date: Wed, 9 Nov 2022 17:22:59 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E3=80=90=E5=85=89=E7=8E=AF=E5=8A=A9?= =?UTF-8?q?=E6=89=8BV5.15.0=E5=90=8C=E6=AD=A5=E6=AD=A3=E5=BC=8F=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E3=80=91=E7=99=BB=E5=BD=95=E9=97=AA=E9=80=80=20https:?= =?UTF-8?q?//jira.shanqu.cc/browse/GHZS-116?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gh/gamecenter/collection/AnswerAdapter.java | 6 ++++++ .../gh/gamecenter/collection/ArticleAdapter.java | 6 ++++++ .../collection/CommunityArticleAdapter.kt | 6 ++++++ .../collection/GamesCollectionAdapter.kt | 6 ++++++ .../com/gh/gamecenter/collection/VideoAdapter.kt | 7 +++++++ .../com/gh/gamecenter/game/GameItemViewHolder.kt | 1 + .../gamecenter/history/HistoryGameListAdapter.kt | 6 ++++++ .../simulatorgame/SimulatorGameListAdapter.kt | 2 ++ .../com/gh/vspace/VDownloadManagerAdapter.kt | 10 ++++++++-- .../ic_selector_default.webp | Bin 170 -> 0 bytes .../drawable-xxxhdpi/ic_selector_default.webp | Bin 186 -> 0 bytes .../ic_video_setting_select.webp | Bin 1820 -> 0 bytes .../main/res/drawable/selector_ic_simulator.xml | 7 ------- app/src/main/res/layout/category_game_item.xml | 3 +-- app/src/main/res/layout/discovery_game_item.xml | 3 +-- app/src/main/res/layout/game_item.xml | 3 +-- .../res/layout/item_vgame_download_manager.xml | 1 - app/src/main/res/layout/popup_history_option.xml | 3 +-- module_common/build.gradle | 2 ++ .../gh/gamecenter/common/view/DrawableView.kt | 12 ++++++++++++ module_login/build.gradle | 2 ++ .../gh/gamecenter/login/view/LoginFragment.java | 10 ++++++++++ .../res/drawable/selector_login_checkbox.xml | 5 ----- .../src/main/res/layout/fragment_login.xml | 3 +-- 24 files changed, 79 insertions(+), 25 deletions(-) delete mode 100644 app/src/main/res/drawable-night-xxxhdpi/ic_selector_default.webp delete mode 100644 app/src/main/res/drawable-xxxhdpi/ic_selector_default.webp delete mode 100644 app/src/main/res/drawable-xxxhdpi/ic_video_setting_select.webp delete mode 100644 app/src/main/res/drawable/selector_ic_simulator.xml delete mode 100644 module_login/src/main/res/drawable/selector_login_checkbox.xml diff --git a/app/src/main/java/com/gh/gamecenter/collection/AnswerAdapter.java b/app/src/main/java/com/gh/gamecenter/collection/AnswerAdapter.java index bb3e562a36..90460eb8e8 100644 --- a/app/src/main/java/com/gh/gamecenter/collection/AnswerAdapter.java +++ b/app/src/main/java/com/gh/gamecenter/collection/AnswerAdapter.java @@ -14,6 +14,7 @@ import com.gh.gamecenter.common.syncpage.ISyncAdapterHandler; import com.gh.common.util.CollectionUtils; import com.gh.gamecenter.common.utils.DialogHelper; import com.gh.gamecenter.common.utils.ExtensionsKt; +import com.gh.gamecenter.common.view.DrawableView; import com.gh.gamecenter.core.utils.DisplayUtils; import com.gh.gamecenter.R; import com.gh.gamecenter.common.viewholder.FooterViewHolder; @@ -232,6 +233,11 @@ public class AnswerAdapter extends ListAdapter implements ISyncAda } }); + mPopupBinding.checkAllCb.setCompoundDrawablesWithIntrinsicBounds( + DrawableView.getCheckSelectorDrawable( + mContext + ), null, null, null + ); mPopupBinding.checkAllCb.setOnClickListener(v -> { if (mPopupBinding.checkAllCb.isChecked()) { selectItems.clear(); diff --git a/app/src/main/java/com/gh/gamecenter/collection/ArticleAdapter.java b/app/src/main/java/com/gh/gamecenter/collection/ArticleAdapter.java index 29fb72f981..92e1865e47 100644 --- a/app/src/main/java/com/gh/gamecenter/collection/ArticleAdapter.java +++ b/app/src/main/java/com/gh/gamecenter/collection/ArticleAdapter.java @@ -16,6 +16,7 @@ import com.gh.gamecenter.common.callback.OnListClickListener; import com.gh.gamecenter.common.constant.ItemViewType; import com.gh.gamecenter.common.utils.DialogHelper; import com.gh.gamecenter.common.utils.ExtensionsKt; +import com.gh.gamecenter.common.view.DrawableView; import com.gh.gamecenter.core.utils.DisplayUtils; import com.gh.gamecenter.common.utils.ImageUtils; import com.gh.common.util.NewsUtils; @@ -361,6 +362,11 @@ public class ArticleAdapter extends ListAdapter { } }); + mPopupBinding.checkAllCb.setCompoundDrawablesWithIntrinsicBounds( + DrawableView.getCheckSelectorDrawable( + mContext + ), null, null, null + ); mPopupBinding.checkAllCb.setOnClickListener(v -> { if (mPopupBinding.checkAllCb.isChecked()) { selectItems.clear(); diff --git a/app/src/main/java/com/gh/gamecenter/collection/CommunityArticleAdapter.kt b/app/src/main/java/com/gh/gamecenter/collection/CommunityArticleAdapter.kt index 4f648ab149..dc065b10d7 100644 --- a/app/src/main/java/com/gh/gamecenter/collection/CommunityArticleAdapter.kt +++ b/app/src/main/java/com/gh/gamecenter/collection/CommunityArticleAdapter.kt @@ -18,6 +18,7 @@ import com.gh.gamecenter.common.utils.* import com.gh.gamecenter.databinding.CommunityAnswerItemBinding import com.gh.gamecenter.databinding.PopupHistoryOptionBinding import com.gh.gamecenter.common.entity.CommunityEntity +import com.gh.gamecenter.common.view.DrawableView import com.gh.gamecenter.history.ManageOption import com.gh.gamecenter.qa.answer.CommunityAnswerItemViewHolder import com.gh.gamecenter.qa.article.detail.ArticleDetailActivity @@ -172,6 +173,11 @@ class CommunityArticleAdapter( }, extraConfig = DialogHelper.Config(centerTitle = true, centerContent = true)) } + mPopupBinding?.checkAllCb?.setCompoundDrawablesWithIntrinsicBounds( + DrawableView.getCheckSelectorDrawable( + mContext + ), null, null, null + ) mPopupBinding?.checkAllCb?.setOnClickListener { if (mPopupBinding?.checkAllCb?.isChecked == true) { selectItems.clear() diff --git a/app/src/main/java/com/gh/gamecenter/collection/GamesCollectionAdapter.kt b/app/src/main/java/com/gh/gamecenter/collection/GamesCollectionAdapter.kt index 88d788f1eb..594922a157 100644 --- a/app/src/main/java/com/gh/gamecenter/collection/GamesCollectionAdapter.kt +++ b/app/src/main/java/com/gh/gamecenter/collection/GamesCollectionAdapter.kt @@ -24,6 +24,7 @@ import com.gh.gamecenter.adapter.viewholder.GameCollectionItemViewHolder import com.gh.gamecenter.common.baselist.ListAdapter import com.gh.gamecenter.collection.GamesCollectionFragment.Companion.TYPE_USER import com.gh.gamecenter.common.utils.* +import com.gh.gamecenter.common.view.DrawableView import com.gh.gamecenter.core.utils.* import com.gh.gamecenter.databinding.ItemGameCollectionFlexTagBinding import com.gh.gamecenter.databinding.PopupHistoryOptionBinding @@ -424,6 +425,11 @@ class GamesCollectionAdapter( }, extraConfig = DialogHelper.Config(centerTitle = true, centerContent = true)) } + mPopupBinding?.checkAllCb?.setCompoundDrawablesWithIntrinsicBounds( + DrawableView.getCheckSelectorDrawable( + mContext + ), null, null, null + ) mPopupBinding?.checkAllCb?.setOnClickListener { if (mPopupBinding?.checkAllCb?.isChecked == true) { selectItems.clear() diff --git a/app/src/main/java/com/gh/gamecenter/collection/VideoAdapter.kt b/app/src/main/java/com/gh/gamecenter/collection/VideoAdapter.kt index c0208f049d..1be5a7f3ae 100644 --- a/app/src/main/java/com/gh/gamecenter/collection/VideoAdapter.kt +++ b/app/src/main/java/com/gh/gamecenter/collection/VideoAdapter.kt @@ -3,6 +3,7 @@ package com.gh.gamecenter.collection import android.app.Activity import android.content.Context import android.content.Intent +import android.graphics.drawable.StateListDrawable import android.view.Gravity import android.view.LayoutInflater import android.view.View @@ -17,6 +18,7 @@ import com.gh.gamecenter.R import com.gh.gamecenter.common.viewholder.FooterViewHolder import com.gh.gamecenter.common.baselist.ListAdapter import com.gh.gamecenter.common.utils.* +import com.gh.gamecenter.common.view.DrawableView import com.gh.gamecenter.databinding.PopupHistoryOptionBinding import com.gh.gamecenter.databinding.VideoNewItemBinding import com.gh.gamecenter.entity.MyVideoEntity @@ -166,6 +168,11 @@ class VideoAdapter( }, extraConfig = DialogHelper.Config(centerTitle = true, centerContent = true)) } + mPopupBinding?.checkAllCb?.setCompoundDrawablesWithIntrinsicBounds( + DrawableView.getCheckSelectorDrawable( + mContext + ), null, null, null + ) mPopupBinding?.checkAllCb?.setOnClickListener { if (mPopupBinding?.checkAllCb?.isChecked == true) { selectItems.clear() diff --git a/app/src/main/java/com/gh/gamecenter/game/GameItemViewHolder.kt b/app/src/main/java/com/gh/gamecenter/game/GameItemViewHolder.kt index 05d14be663..c1b312d3e5 100644 --- a/app/src/main/java/com/gh/gamecenter/game/GameItemViewHolder.kt +++ b/app/src/main/java/com/gh/gamecenter/game/GameItemViewHolder.kt @@ -32,6 +32,7 @@ class GameItemViewHolder(var binding: GameItemBinding) : BaseRecyclerViewHolder< ) { binding.run { root.background = R.drawable.reuse_listview_item_style.toDrawable(root.context) + selectIv.setImageDrawable(DrawableView.getCheckSelectorDrawable(root.context)) gameKaifuType.setBackgroundColor(R.color.theme.toColor(root.context)) gameName.setTextColor(R.color.text_title.toColor(root.context)) gameDes.setTextColor(R.color.text_subtitleDesc.toColor(root.context)) diff --git a/app/src/main/java/com/gh/gamecenter/history/HistoryGameListAdapter.kt b/app/src/main/java/com/gh/gamecenter/history/HistoryGameListAdapter.kt index 087bb2f957..a4d0c570d6 100644 --- a/app/src/main/java/com/gh/gamecenter/history/HistoryGameListAdapter.kt +++ b/app/src/main/java/com/gh/gamecenter/history/HistoryGameListAdapter.kt @@ -16,6 +16,7 @@ import com.gh.gamecenter.common.viewholder.FooterViewHolder import com.gh.gamecenter.adapter.viewholder.GameViewHolder import com.gh.gamecenter.common.baselist.ListAdapter import com.gh.gamecenter.common.utils.* +import com.gh.gamecenter.common.view.DrawableView import com.gh.gamecenter.core.utils.* import com.gh.gamecenter.databinding.GameItemBinding import com.gh.gamecenter.databinding.PopupHistoryOptionBinding @@ -149,6 +150,11 @@ class HistoryGameListAdapter(context: Context, private val mViewModel: HistoryGa }, extraConfig = DialogHelper.Config(centerTitle = true, centerContent = true)) } + mPopupBinding?.checkAllCb?.setCompoundDrawablesWithIntrinsicBounds( + DrawableView.getCheckSelectorDrawable( + mContext + ), null, null, null + ) mPopupBinding?.checkAllCb?.setOnClickListener { if (mPopupBinding?.checkAllCb?.isChecked == true) { selectItems.clear() diff --git a/app/src/main/java/com/gh/gamecenter/simulatorgame/SimulatorGameListAdapter.kt b/app/src/main/java/com/gh/gamecenter/simulatorgame/SimulatorGameListAdapter.kt index 8a40c219ab..b704dc5fca 100644 --- a/app/src/main/java/com/gh/gamecenter/simulatorgame/SimulatorGameListAdapter.kt +++ b/app/src/main/java/com/gh/gamecenter/simulatorgame/SimulatorGameListAdapter.kt @@ -36,6 +36,7 @@ import com.gh.gamecenter.common.baselist.ListAdapter import com.gh.gamecenter.common.callback.BiCallback import com.gh.gamecenter.common.constant.EntranceConsts import com.gh.gamecenter.common.utils.* +import com.gh.gamecenter.common.view.DrawableView import com.gh.gamecenter.core.utils.* import com.gh.gamecenter.databinding.SimulatorGameItemBinding import com.gh.gamecenter.databinding.SimulatorHeaderViewBinding @@ -199,6 +200,7 @@ class SimulatorGameListAdapter( recommendStar.rating = gameEntity.recommendStar.toFloat() } gameItemIncluded.recentPlayedTag.goneIf(!gameEntity.isRecentlyPlayed) + gameItemIncluded.selectIv.setImageDrawable(DrawableView.getCheckSelectorDrawable(mContext)) gameItemIncluded.selectIv.goneIf(!mShowSelectFlag) gameItemIncluded.selectIv.isChecked = mSelectList[position - 1] gameItemIncluded.selectIv.setOnClickListener { diff --git a/app/src/main/java/com/gh/vspace/VDownloadManagerAdapter.kt b/app/src/main/java/com/gh/vspace/VDownloadManagerAdapter.kt index 1e8ef50fd7..8256b02dab 100644 --- a/app/src/main/java/com/gh/vspace/VDownloadManagerAdapter.kt +++ b/app/src/main/java/com/gh/vspace/VDownloadManagerAdapter.kt @@ -25,6 +25,7 @@ import com.gh.gamecenter.common.baselist.LoadType import com.gh.gamecenter.common.constant.Constants import com.gh.gamecenter.common.constant.ItemViewType import com.gh.gamecenter.common.utils.* +import com.gh.gamecenter.common.view.DrawableView import com.gh.gamecenter.core.AppExecutor import com.gh.gamecenter.core.runOnIoThread import com.gh.gamecenter.core.utils.CurrentActivityHolder @@ -136,7 +137,7 @@ class VDownloadManagerAdapter( holder.binding.descTv.goneIf(!mViewModel.isTypeDownloaded() || gameEntity.des?.isEmpty() == true) holder.binding.descTv.text = gameEntity.des - holder.binding.selectIv.setImageDrawable(R.drawable.selector_ic_simulator.toDrawable(mContext)) + holder.binding.selectIv.setImageDrawable(DrawableView.getCheckSelectorDrawable(mContext)) holder.binding.selectIv.goneIf(mCurrentOption == ManageOption.OPTION_MANAGER) holder.binding.selectIv.isChecked = selectItems.contains(gameEntity.id) @@ -242,6 +243,11 @@ class VDownloadManagerAdapter( extraConfig = DialogHelper.Config(centerTitle = true) ) } + mPopupBinding?.checkAllCb?.setCompoundDrawablesWithIntrinsicBounds( + DrawableView.getCheckSelectorDrawable( + mContext + ), null, null, null + ) mPopupBinding?.checkAllCb?.setOnClickListener { if (mPopupBinding?.checkAllCb?.isChecked == true) { selectItems.clear() @@ -261,7 +267,7 @@ class VDownloadManagerAdapter( checkAllCb.setTextColor(R.color.text_title.toColor(mContext)) selectNumTv.setTextColor(R.color.theme_font.toColor(mContext)) checkAllCb.setCompoundDrawablesWithIntrinsicBounds( - R.drawable.selector_ic_simulator.toDrawable(mContext), + DrawableView.getCheckSelectorDrawable(mContext), null, null, null diff --git a/app/src/main/res/drawable-night-xxxhdpi/ic_selector_default.webp b/app/src/main/res/drawable-night-xxxhdpi/ic_selector_default.webp deleted file mode 100644 index 413ca90ee1abba491b52f8ffc3702d87abb2c310..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 170 zcmWIYbaPw8z`zjh>J$(bU=hIuWD5W>KNvas1bCzXd5qx;1RNMdOaujgELXpCZQEKG z@zYyb^&3x^CQY1}%`39NGI`J$(bU=hIuWD5W>KNvas1b7qzd5q}`OeU$AR)64m^~LyPe@DZI z@4{1Ty21*gvTxtoqu6iklFAb1W9;JgneXF;U#q;f@noyUr+2*Ae`{N=L}gLcJ%+B= zVayZW?|r4tATL_L{)CO;POJ3(2QRGC9CfPKn7C#0iDYGP%DTK)|NrM_{~vA!pj#BA hfHoU2GR$Sv5&*i1(Lqgh2?KKh!@u7@LY^=%003%}LU8~9 diff --git a/app/src/main/res/drawable-xxxhdpi/ic_video_setting_select.webp b/app/src/main/res/drawable-xxxhdpi/ic_video_setting_select.webp deleted file mode 100644 index ac383d42cbdc9d8f38d0c5a474cd27fa8b68c6d1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1820 zcmV+%2jlosNk&E#2LJ$9MM6+kP&il$0000G0000#002J#06|PpNHPHc00DqoYunT2 zx^WmPHMaWu3^h0X>qbX=j=$e0>=m#NfBUvKir54{ zNfa{q`BNPzhR5#|idlS*GYiLZ_eG|l*%t?rgNQ_m8i|xFrO1|LD{nWJ+gq%#aZZ!h zG<8eUb~N2YGaYG;Jp2lO2!A2|d&~cB_}?ubH}JT{$4x$N<9UP6TYTQc^EO{M;B^aM zH{o>~UN_=(D_%GAbvxcS(0vQuH{pF7-Z#>HE8RE$$G#o^-#`FXP&gpG1polBApo5L zDnI~000000C9ndlH3j$w;0IO%2n;F0sI531NFQA|FYNgkNO|xegeN< zKSzE5KTW>+d%!<{dH{8xeh&ViYx;Ss)9>0YVXq6f@$LcqL-{ZCPs(54|N8yl9>5=>|9*#xK^)tTW zKyXpd_FA^rsDDZoJ%_Comw5wU|MitO8bDMo4Z@AOd@SjalD?*l+GlV>frs|k|1ZK* zu!KBL7xP~bxCo&UTBX7}4&3I1@BbY}wIC#ZyaEy^>xOwI{r(w|pbSFTEOAW9241*N zkP4pcDF)lsRzi+fSR&;4RmWtvO-u`Yo$XX3J$431B1YG5*7pD9db>13eF5b`|Cv}F z4+rEh48VCamS*f$<|?1gAmO9GA1?M0jlP?9(qu&-REudckxz{&$gfsYrHL$sG9f}O zfpSn(NTSi{_Wr1yVEYDqy{E^H<2@6+4Tb8+r2i&S^R0||I=s~x-paH|ieP_gVcV?m zCw(1z{}qSyTmFIq{kvFruDRh$wivLS;dJ@_rW=d#gz1eLaFVg0qkG=A5O!w^J|P=H zYrrstO|17D9dT`xi~qtQu?`%f>%vZbz0z?8Zc@eV6iJM(=Ha+mf^6lXkniRt{3c6E zZ5%2e4Q4Qb<5{PvgC^DdQ72X&U0Ga!u{>m!@qz`*Z*tTFCGuH!IZ&v)#I%U zC)j%BNW;m)N*8jCPS|<87lb8^3s$kkcL%bkPA79}idVkJ(sQQRjhjiA|GEdx@{q{z zUpOE9j20NzD4Q-Pt*8&aQlZI|n6wD8!!NSLDLy#>!)K6J8arr@gwM<2_R#bx?GipV zFB4ErS&AD59NCbwT3$5SVo*6zIZk(q6z@;S2J~_;HZwQ`T&NF}E?DPUWqc&i8NkTgQpUUp=aU zS?Qc;kIfMGqs{uenHMiLqVxU7dH(T|4xQYSNzd=qE`gJ?eLQ?Kf|S^8$lzY)TOXMdjs=5(!a9a_kDZP7!59_L?5ep+we4 z1vX-zq{M0R(=2vF;1V!IZ>W^J{`;-8V<=wax6BkAuS78k+`3=^;t+QZ{Aw82sC{kq9xLUGd?n3=W)%vrfAM>^ zQc%KIlTo6}@StZ;x=;E)#;0I>w)Onu3Cw@#W6%HVGbF6a&Kv7i$Z8js^P3)>9X54; zwPdwmb+v~j1O7_@V-T|&`G=1PG=2*>;~Pj$nLuJBY541DGqJ6N$n!;A>~`}6vG=&} zj}R-QC>sBJaJ@k#)gu=e?IxnjhH%R!<0mj{x1xZ=UlfYqN?}Z&q?d|Dx4jfPQTyZ6 zck$pQB*>p6 - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout/category_game_item.xml b/app/src/main/res/layout/category_game_item.xml index 1ea9217a64..0d02708e98 100644 --- a/app/src/main/res/layout/category_game_item.xml +++ b/app/src/main/res/layout/category_game_item.xml @@ -36,8 +36,7 @@ app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toRightOf="@+id/game_order" app:layout_constraintRight_toLeftOf="@+id/gameIconView" - app:layout_constraintTop_toTopOf="parent" - app:srcCompat="@drawable/selector_ic_simulator" /> + app:layout_constraintTop_toTopOf="parent" /> + app:layout_constraintTop_toTopOf="parent" /> + app:layout_constraintTop_toTopOf="parent" /> + android:textColor="@color/text_title" /> - - - - \ No newline at end of file diff --git a/module_login/src/main/res/layout/fragment_login.xml b/module_login/src/main/res/layout/fragment_login.xml index 19077c2b24..d8be02066f 100644 --- a/module_login/src/main/res/layout/fragment_login.xml +++ b/module_login/src/main/res/layout/fragment_login.xml @@ -184,8 +184,7 @@ android:id="@+id/checkIv" android:layout_width="24dp" android:layout_height="24dp" - android:padding="4dp" - android:src="@drawable/selector_login_checkbox" /> + android:padding="4dp" />