diff --git a/app/src/main/java/com/gh/base/BaseActivity.java b/app/src/main/java/com/gh/base/BaseActivity.java index 4debb0004e..26472827c8 100644 --- a/app/src/main/java/com/gh/base/BaseActivity.java +++ b/app/src/main/java/com/gh/base/BaseActivity.java @@ -24,6 +24,7 @@ import android.widget.RelativeLayout; import android.widget.TextView; import androidx.annotation.NonNull; +import androidx.appcompat.app.AppCompatDelegate; import androidx.core.content.ContextCompat; import androidx.core.view.LayoutInflaterCompat; import androidx.fragment.app.Fragment; @@ -321,15 +322,28 @@ public abstract class BaseActivity extends BaseAppCompatActivity implements Easy if (NightModeUtils.INSTANCE.getSystemMode()) { NightModeUtils.INSTANCE.setNightMode(false); NightModeUtils.INSTANCE.setSystemMode(false); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) { + getDelegate().setLocalNightMode(AppCompatDelegate.MODE_NIGHT_NO); + } } else { NightModeUtils.INSTANCE.setSystemMode(true); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) { + getDelegate().setLocalNightMode(AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM); + } } NightModeUtils.INSTANCE.initNightMode(); }, () -> { if (NightModeUtils.INSTANCE.getSystemMode()) { NightModeUtils.INSTANCE.setNightMode(true); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) { + getDelegate().setLocalNightMode(AppCompatDelegate.MODE_NIGHT_YES); + } } else { + boolean nightMode = NightModeUtils.INSTANCE.getNightMode(); NightModeUtils.INSTANCE.setNightMode(!NightModeUtils.INSTANCE.getNightMode()); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) { + getDelegate().setLocalNightMode(nightMode ? AppCompatDelegate.MODE_NIGHT_NO : AppCompatDelegate.MODE_NIGHT_YES); + } } NightModeUtils.INSTANCE.setSystemMode(false); NightModeUtils.INSTANCE.initNightMode(); diff --git a/app/src/main/java/com/gh/base/fragment/BaseDialogFragment.java b/app/src/main/java/com/gh/base/fragment/BaseDialogFragment.java index 4c41dfe77a..1b2d993260 100644 --- a/app/src/main/java/com/gh/base/fragment/BaseDialogFragment.java +++ b/app/src/main/java/com/gh/base/fragment/BaseDialogFragment.java @@ -1,10 +1,12 @@ package com.gh.base.fragment; import android.app.Dialog; +import android.content.res.Configuration; import android.os.Bundle; import android.view.KeyEvent; import com.gh.common.util.ClickUtils; +import com.gh.common.util.NightModeUtils; import com.gh.gamecenter.R; import com.lightgame.utils.RuntimeUtils; import com.lightgame.utils.Utils; @@ -28,6 +30,14 @@ import androidx.lifecycle.Lifecycle; public class BaseDialogFragment extends DialogFragment { + protected boolean mNightMode; + + @Override + public void onCreate(@Nullable Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + mNightMode = NightModeUtils.INSTANCE.isNightMode(requireContext()); + } + @NonNull @Override public Dialog onCreateDialog(Bundle savedInstanceState) { @@ -95,6 +105,16 @@ public class BaseDialogFragment extends DialogFragment { } } } + + @Override + public void onConfigurationChanged(@NonNull Configuration newConfig) { + super.onConfigurationChanged(newConfig); + onNightModeChange(); + } + + protected void onNightModeChange() { + mNightMode = NightModeUtils.INSTANCE.isNightMode(requireContext()); + } } diff --git a/app/src/main/java/com/gh/common/util/DownloadItemUtils.kt b/app/src/main/java/com/gh/common/util/DownloadItemUtils.kt index a72188ad06..3527b60f67 100644 --- a/app/src/main/java/com/gh/common/util/DownloadItemUtils.kt +++ b/app/src/main/java/com/gh/common/util/DownloadItemUtils.kt @@ -166,6 +166,7 @@ object DownloadItemUtils { hideDownloadBtnIfNoAvailableContent: Boolean = false, pluginLocation: PluginLocation? = PluginLocation.only_game ) { + downloadBtn.background = R.drawable.download_button_normal_style.toDrawable(context) // 控制是否显示下载按钮 downloadBtn.goneIf(!Config.isShowDownload(gameEntity.id) || context.getString(R.string.app_name) == gameEntity.name) // 青少年模式显示查看 diff --git a/app/src/main/java/com/gh/gamecenter/baselist/ListFragment.java b/app/src/main/java/com/gh/gamecenter/baselist/ListFragment.java index 4e9f1b0ca4..6e86ce4243 100644 --- a/app/src/main/java/com/gh/gamecenter/baselist/ListFragment.java +++ b/app/src/main/java/com/gh/gamecenter/baselist/ListFragment.java @@ -6,6 +6,7 @@ import android.widget.LinearLayout; import androidx.annotation.NonNull; import androidx.annotation.Nullable; +import androidx.core.content.ContextCompat; import androidx.lifecycle.Observer; import androidx.lifecycle.ViewModelProviders; import androidx.recyclerview.widget.DefaultItemAnimator; @@ -295,6 +296,7 @@ public abstract class ListFragment( override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) - mCachedView.setBackgroundColor(R.color.white.toColor()) + mCachedView.setBackgroundColor(R.color.background_white.toColor()) } override fun provideListAdapter(): ListAdapter { @@ -55,4 +53,11 @@ class AddUserPlayedGameFragment : ListFragment( mViewModel = viewModelProvider(AddUserPlayedGameViewModel.Factory(userId, true)) return mViewModel } + + override fun onNightModeChange() { + super.onNightModeChange() + mCachedView?.setRootBackgroundColor(R.color.background_white) + mCachedView?.findViewById(R.id.divider)?.setBackgroundColor(R.color.divider.toColor(requireContext())) + mAdapter?.let { it.notifyItemRangeChanged(0, it.itemCount) } + } } \ No newline at end of file diff --git a/app/src/main/java/com/gh/gamecenter/gamecollection/choose/ChooseGamesActivity.kt b/app/src/main/java/com/gh/gamecenter/gamecollection/choose/ChooseGamesActivity.kt index 0769fa62a5..5de67497ca 100644 --- a/app/src/main/java/com/gh/gamecenter/gamecollection/choose/ChooseGamesActivity.kt +++ b/app/src/main/java/com/gh/gamecenter/gamecollection/choose/ChooseGamesActivity.kt @@ -3,18 +3,26 @@ package com.gh.gamecenter.gamecollection.choose import android.content.Context import android.content.Intent import android.os.Bundle +import com.gh.common.util.DisplayUtils import com.gh.gamecenter.NormalActivity +import com.gh.gamecenter.R class ChooseGamesActivity : NormalActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setNavigationTitle("选择游戏") + DisplayUtils.setStatusBarColor(this, if (mNightMode) R.color.black else R.color.white) } override fun provideNormalIntent(): Intent { return getTargetIntent(this, ChooseGamesActivity::class.java, ChooseGamesFragment::class.java) } + override fun onNightModeChange() { + super.onNightModeChange() + DisplayUtils.setStatusBarColor(this, if (mNightMode) R.color.black else R.color.white) + } + companion object { fun getIntent(context: Context): Intent { return getTargetIntent(context, ChooseGamesActivity::class.java, ChooseGamesFragment::class.java) diff --git a/app/src/main/java/com/gh/gamecenter/gamecollection/choose/ChooseGamesAdapter.kt b/app/src/main/java/com/gh/gamecenter/gamecollection/choose/ChooseGamesAdapter.kt index 5289747923..26a130b788 100644 --- a/app/src/main/java/com/gh/gamecenter/gamecollection/choose/ChooseGamesAdapter.kt +++ b/app/src/main/java/com/gh/gamecenter/gamecollection/choose/ChooseGamesAdapter.kt @@ -7,10 +7,8 @@ import android.view.ViewGroup import androidx.core.widget.doOnTextChanged import androidx.recyclerview.widget.RecyclerView import com.gh.base.BaseRecyclerViewHolder -import com.gh.common.util.PatternUtils -import com.gh.common.util.TextHelper -import com.gh.common.util.consume -import com.gh.common.util.toBinding +import com.gh.common.util.* +import com.gh.gamecenter.R import com.gh.gamecenter.baselist.ListAdapter import com.gh.gamecenter.databinding.ItemChooseGamesBinding import com.gh.gamecenter.entity.GameEntity @@ -39,6 +37,13 @@ class ChooseGamesAdapter(context: Context, val dragListener: ItemDragListener) : @SuppressLint("ClickableViewAccessibility") override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) { if (holder is ChooseGamesViewHolder) { + holder.binding.root.setBackgroundColor(R.color.background_white.toColor(mContext)) + holder.binding.recommendContainer.background = R.drawable.bg_shape_f5_radius_6.toDrawable(mContext) + holder.binding.gameNameTv.setTextColor(R.color.text_title.toColor(mContext)) + holder.binding.recommendReasonEt.setTextColor(R.color.text_title.toColor(mContext)) + holder.binding.ratingScoreTv.setTextColor(R.color.text_subtitleDesc.toColor(mContext)) + holder.binding.recommendReasonEt.setHintTextColor(R.color.text_subtitleDesc.toColor(mContext)) + val gameEntity = mEntityList[position] holder.binding.root.tag = gameEntity.id holder.binding.gameNameTv.text = gameEntity.name diff --git a/app/src/main/java/com/gh/gamecenter/gamecollection/choose/ChooseGamesFragment.kt b/app/src/main/java/com/gh/gamecenter/gamecollection/choose/ChooseGamesFragment.kt index bbeea3b7a6..029b7fb08d 100644 --- a/app/src/main/java/com/gh/gamecenter/gamecollection/choose/ChooseGamesFragment.kt +++ b/app/src/main/java/com/gh/gamecenter/gamecollection/choose/ChooseGamesFragment.kt @@ -8,6 +8,7 @@ import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.RecyclerView import com.gh.common.util.DialogHelper import com.gh.common.util.goneIf +import com.gh.common.util.toColor import com.gh.common.util.viewModelProvider import com.gh.gamecenter.R import com.gh.gamecenter.databinding.FragmentChooseGamesBinding @@ -141,4 +142,16 @@ class ChooseGamesFragment : NormalFragment(), ChooseGamesAdapter.ItemDragListene } } + override fun onNightModeChange() { + super.onNightModeChange() + if (::mBinding.isInitialized) { + mBinding.run { + root.setBackgroundColor(R.color.background_white.toColor(requireContext())) + gameCountTv.setTextColor(R.color.text_title.toColor(requireContext())) + addGamesButton.setTextColor(R.color.theme_font.toColor(requireContext())) + addGamesTv.setTextColor(R.color.text_body.toColor(requireContext())) + gamesRv.adapter?.run { notifyItemRangeChanged(0, itemCount) } + } + } + } } \ No newline at end of file diff --git a/app/src/main/java/com/gh/gamecenter/gamecollection/detail/GameCollectionDetailAdapter.kt b/app/src/main/java/com/gh/gamecenter/gamecollection/detail/GameCollectionDetailAdapter.kt index a4997bab5e..6aff8db045 100644 --- a/app/src/main/java/com/gh/gamecenter/gamecollection/detail/GameCollectionDetailAdapter.kt +++ b/app/src/main/java/com/gh/gamecenter/gamecollection/detail/GameCollectionDetailAdapter.kt @@ -25,6 +25,7 @@ import com.gh.common.view.GridSpacingItemColorDecoration import com.gh.gamecenter.GameDetailActivity import com.gh.gamecenter.R import com.gh.gamecenter.adapter.viewholder.GameViewHolder +import com.gh.gamecenter.databinding.GameCollectionDetailNoneGameItemBinding import com.gh.gamecenter.databinding.GameCollectionGameItemBinding import com.gh.gamecenter.databinding.ItemArticleDetailCommentBinding import com.gh.gamecenter.databinding.LayoutGameCollectionAuthTagBinding @@ -51,6 +52,7 @@ open class GameCollectionDetailAdapter( var recommendPrefBitmap: Bitmap? = null val positionAndPackageMap = HashMap() private var mExposureEventArray: SparseArray? = null + private var mItemDecoration: RecyclerView.ItemDecoration? = null override fun setListData(updateData: MutableList?) { mExposureEventArray = SparseArray(updateData?.size ?: 0) @@ -94,10 +96,12 @@ open class GameCollectionDetailAdapter( ) ITEM_GAME_EMPTY -> GameCollectionGameEmptyViewHolder( - mLayoutInflater.inflate( - R.layout.game_collection_detail_none_game_item, - parent, - false + GameCollectionDetailNoneGameItemBinding.bind( + mLayoutInflater.inflate( + R.layout.game_collection_detail_none_game_item, + parent, + false + ) ) ) @@ -128,7 +132,11 @@ open class GameCollectionDetailAdapter( ) } - is GameCollectionGameEmptyViewHolder -> mViewModel.postFirstItemInitOver() + is GameCollectionGameEmptyViewHolder -> { + mViewModel.postFirstItemInitOver() + holder.binding.noneGameContainer.setBackgroundColor(R.color.background_white.toColor(mContext)) + holder.binding.noneGameTv.setTextColor(R.color.text_body.toColor(mContext)) + } is CommentItemViewHolder -> { bindComment(holder.binding, mEntityList[position].commentNormal!!) { deleteCommentEntity -> @@ -164,6 +172,10 @@ open class GameCollectionDetailAdapter( holder.bindView(mIsLoading, mIsNetworkError, mIsOver, R.string.game_collection_load_over_hint) } + is GameCollectionDividerViewHolder -> { + holder.itemView.setBackgroundColor(R.color.background.toColor(mContext)) + } + else -> super.onBindViewHolder(holder, position) } } @@ -180,7 +192,7 @@ open class GameCollectionDetailAdapter( updateSubComment(this, comment) floorHintTv.visibility = View.INVISIBLE - bottomDivider.visibility = View.VISIBLE + bottomDivider.visibility = View.GONE root.setOnClickListener { mContext.startActivity( @@ -274,18 +286,36 @@ open class GameCollectionDetailAdapter( deleteCallBack: ((comment: CommentEntity) -> Unit)? = null ) { binding.run { + root.setBackgroundColor(R.color.background_white.toColor(mContext)) + subCommentContainer.setBackgroundColor(R.color.background.toColor(mContext)) + divider.setBackgroundColor(R.color.text_F8F8F8.toColor(mContext)) + bottomDivider.setBackgroundColor(R.color.divider.toColor(mContext)) + userNameTv.setTextColor(R.color.text_subtitle.toColor(mContext)) + badgeTv.setTextColor(R.color.text_subtitleDesc.toColor(mContext)) + floorHintTv.setTextColor(R.color.text_subtitleDesc.toColor(mContext)) + contentTv.setTextColor(R.color.text_444444.toColor(mContext)) + collapseTv.setTextColor(R.color.theme_font.toColor(mContext)) + firstSubCommentTv.setTextColor(R.color.text_subtitle.toColor(mContext)) + secondSubCommentTv.setTextColor(R.color.text_subtitle.toColor(mContext)) + moreSubCommentBtn.setTextColor(R.color.theme_font.toColor(mContext)) + timeTv.setTextColor(R.color.text_subtitleDesc.toColor(mContext)) + likeCountTv.setTextColor(R.color.text_subtitleDesc.toColor(mContext)) + commentCountTv.setTextColor(R.color.text_subtitleDesc.toColor(mContext)) + if (!comment.images.isNullOrEmpty()) { if (commentPictureRv.adapter == null) { commentPictureRv.apply { layoutManager = GridLayoutManager(context, 3) adapter = CommentPictureAdapter(context, comment.images!!, "") if (itemDecorationCount == 0) { - addItemDecoration(GridSpacingItemColorDecoration(context, 2, R.color.white)) + addItemDecoration(GridSpacingItemColorDecoration(context, 2, R.color.background_white).apply { mItemDecoration = this }) } visibility = View.VISIBLE } } else { (commentPictureRv.adapter as CommentPictureAdapter).checkResetData(comment.images!!) + mItemDecoration?.let { commentPictureRv.removeItemDecoration(it) } + commentPictureRv.addItemDecoration(GridSpacingItemColorDecoration(commentPictureRv.context, 2, R.color.background_white).apply { mItemDecoration = this }) } } else { binding.commentPictureRv.visibility = View.GONE @@ -491,7 +521,7 @@ open class GameCollectionDetailAdapter( } } - inner class GameCollectionGameEmptyViewHolder(view: View) : RecyclerView.ViewHolder(view) + inner class GameCollectionGameEmptyViewHolder(val binding: GameCollectionDetailNoneGameItemBinding) : RecyclerView.ViewHolder(binding.root) inner class GameCollectionDividerViewHolder(view: View) : RecyclerView.ViewHolder(view) @@ -499,17 +529,28 @@ open class GameCollectionDetailAdapter( fun bindView(gameEntity: GameEntity, position: Int, isLast: Boolean) { binding.run { + container.background = R.drawable.reuse_listview_item_style.toDrawable(mContext) + gameCollectionRecommendTv.background = R.drawable.bg_shape_f8_radius_8.toDrawable(mContext) + gameCollectionRecommendTv.setTextColor(R.color.text_subtitleDesc.toColor(mContext)) gameItemIncluded.run { + root.background = R.drawable.reuse_listview_item_style.toDrawable(mContext) + gameKaifuType.setBackgroundColor(R.color.theme.toColor(mContext)) + gameName.setTextColor(R.color.text_title.toColor(mContext)) + gameDes.setTextColor(R.color.text_subtitleDesc.toColor(mContext)) + downloadSpeed.setTextColor(R.color.text_subtitleDesc.toColor(mContext)) + downloadPercentage.setTextColor(R.color.theme_font.toColor(mContext)) + recommendStarPref.setTextColor(R.color.text_subtitleDesc.toColor(mContext)) + gameIconView.displayGameIcon(gameEntity) BindingAdapters.setGameName(gameName, gameEntity, false, null) BindingAdapters.setTextSize(gameRating, if (gameEntity.commentCount > 3) 12 else 10) BindingAdapters.setGameTags(labelList, gameEntity) - gameRating.setCompoundDrawablesWithIntrinsicBounds(if (gameEntity.commentCount > 3) R.drawable.game_horizontal_rating.toDrawable() else null, null, null, null) + gameRating.setCompoundDrawablesWithIntrinsicBounds(if (gameEntity.commentCount > 3) R.drawable.game_horizontal_rating.toDrawable(mContext) else null, null, null, null) gameRating.setPadding(0, 0, if (gameEntity.commentCount > 3) 8F.dip2px() else 0, 0) gameRating.text = if (gameEntity.commentCount > 3) { if (gameEntity.star == 10.0F) "10" else gameEntity.star.toString() } else "" - gameRating.setTextColor(if (gameEntity.commentCount > 3) R.color.theme_font.toColor() else R.color.theme.toColor()) + gameRating.setTextColor(if (gameEntity.commentCount > 3) R.color.theme_font.toColor(mContext) else R.color.theme.toColor(mContext)) gameDes.text = gameEntity.decoratedDes recommendStar.rating = gameEntity.recommendStar.toFloat() } diff --git a/app/src/main/java/com/gh/gamecenter/gamecollection/detail/GameCollectionDetailFragment.kt b/app/src/main/java/com/gh/gamecenter/gamecollection/detail/GameCollectionDetailFragment.kt index e148eea645..8de719225a 100644 --- a/app/src/main/java/com/gh/gamecenter/gamecollection/detail/GameCollectionDetailFragment.kt +++ b/app/src/main/java/com/gh/gamecenter/gamecollection/detail/GameCollectionDetailFragment.kt @@ -6,8 +6,10 @@ import android.graphics.Color import android.os.Bundle import android.view.View import android.view.ViewGroup +import android.widget.LinearLayout import androidx.appcompat.app.AppCompatActivity import androidx.constraintlayout.widget.ConstraintLayout +import androidx.core.content.ContextCompat import androidx.core.view.ViewCompat import androidx.lifecycle.Lifecycle import androidx.recyclerview.widget.RecyclerView @@ -130,7 +132,7 @@ class GameCollectionDetailFragment : insets.consumeSystemWindowInsets() } - root.setBackgroundColor(Color.WHITE) + root.setBackgroundColor(R.color.background_white.toColor(requireContext())) mSkeletonScreen = Skeleton.bind(listSkeleton) .shimmer(true) .angle(Constants.SHIMMER_ANGLE) @@ -243,12 +245,12 @@ class GameCollectionDetailFragment : mListViewModel.getGameCollectionDetail() mReuseNoConn?.visibility = View.GONE showSkeleton(true) - mBinding?.root?.setBackgroundColor(Color.WHITE) + mBinding?.root?.setBackgroundColor(R.color.background_white.toColor(requireContext())) } } - DisplayUtils.setStatusBarColor(requireActivity(), R.color.white, true) - mBinding?.toolbarContainer?.setBackgroundColor(Color.WHITE) + DisplayUtils.setStatusBarColor(requireActivity(), R.color.background_white, !mNightMode) + mBinding?.toolbarContainer?.setBackgroundColor(R.color.background_white.toColor(requireContext())) mBinding?.backIv?.setImageResource(R.drawable.ic_bar_back) mListLoading?.visibility = View.GONE @@ -328,10 +330,10 @@ class GameCollectionDetailFragment : squareIv.setImageResource(R.drawable.ic_game_collection_square_light) toolbarUserContainer.visibility = View.GONE } else { - DisplayUtils.setStatusBarColor(requireActivity(), R.color.white, true) - toolbarContainer.setBackgroundColor(Color.WHITE) + DisplayUtils.setStatusBarColor(requireActivity(), R.color.background_white, !mNightMode) + toolbarContainer.setBackgroundColor(R.color.background_white.toColor(requireContext())) backIv.setImageResource(R.drawable.ic_bar_back) - squareIv.setImageResource(R.drawable.ic_game_collection_square) + squareIv.setImageResource(if (mNightMode) R.drawable.ic_game_collection_square_light else R.drawable.ic_game_collection_square) toolbarUserContainer.visibility = View.VISIBLE } } @@ -486,9 +488,9 @@ class GameCollectionDetailFragment : ): View { return LayoutGameCollectionTagBinding.inflate(layoutInflater).apply { divider.goneIf(isLast) - divider.setBackgroundColor(R.color.theme_alpha_20.toColor()) + divider.setBackgroundColor(R.color.theme_alpha_20.toColor(requireContext())) contentTv.text = content - contentTv.setTextColor(R.color.theme_font.toColor()) + contentTv.setTextColor(R.color.theme_font.toColor(requireContext())) }.root } @@ -510,7 +512,7 @@ class GameCollectionDetailFragment : visibility = View.VISIBLE text = if (isFollow) "已关注" else "关注" setBackgroundResource(if (isFollow) R.drawable.button_round_f5f5f5 else R.drawable.button_round_2496ff_alpha_10) - setTextColor(if (isFollow) R.color.text_subtitleDesc.toColor() else R.color.theme.toColor()) + setTextColor(if (isFollow) R.color.text_subtitleDesc.toColor(requireContext()) else R.color.theme.toColor(requireContext())) } } @@ -556,10 +558,10 @@ class GameCollectionDetailFragment : bottomStarTv.text = mListViewModel.getStarText() if (mEntity?.me?.isFavorite == true) { bottomStarIv.setImageResource(R.drawable.ic_article_detail_stared_bottom_bar) - bottomStarTv.setTextColor(R.color.theme_font.toColor()) + bottomStarTv.setTextColor(R.color.theme_font.toColor(requireContext())) } else { bottomStarIv.setImageResource(R.drawable.ic_article_detail_star_bottom_bar) - bottomStarTv.setTextColor(R.color.text_subtitle.toColor()) + bottomStarTv.setTextColor(R.color.text_subtitle.toColor(requireContext())) } } } @@ -569,10 +571,10 @@ class GameCollectionDetailFragment : bottomLikeTv.text = mListViewModel.getLikeText() if (mEntity?.me?.isVoted == true) { bottomLikeIv.setImageResource(R.drawable.ic_article_detail_liked_bottom_bar) - bottomLikeTv.setTextColor(R.color.theme_font.toColor()) + bottomLikeTv.setTextColor(R.color.theme_font.toColor(requireContext())) } else { bottomLikeIv.setImageResource(R.drawable.ic_article_detail_like_bottom_bar) - bottomLikeTv.setTextColor(R.color.text_subtitle.toColor()) + bottomLikeTv.setTextColor(R.color.text_subtitle.toColor(requireContext())) } } } @@ -1021,4 +1023,52 @@ class GameCollectionDetailFragment : shareType ) } + + override fun onNightModeChange() { + super.onNightModeChange() + mAdapter?.let { it.notifyItemRangeChanged(0, it.itemCount) } + mBinding?.run { + appbar.setBackgroundColor(R.color.background_white.toColor(requireContext())) + mListRv.setBackgroundColor(R.color.background_white.toColor(requireContext())) + tagContainer.setBackgroundColor(R.color.background_white.toColor(requireContext())) + playedContainer.setBackgroundColor(R.color.background_white.toColor(requireContext())) + divider.setBackgroundColor(R.color.divider.toColor(requireContext())) + toolbarUserName.setTextColor(R.color.text_title.toColor(requireContext())) + playedTv.setTextColor(R.color.text_subtitleDesc.toColor(requireContext())) + playedPro.progressDrawable = R.drawable.progressbar_played_game_blue_style.toDrawable(requireContext()) + updateFollowView() + videoItem.run { + container.background = R.drawable.bg_game_collection_video_item.toDrawable(requireContext()) + nameTv.setTextColor(R.color.text_title.toColor(requireContext())) + videoItemDesTv.setTextColor(R.color.text_subtitleDesc.toColor(requireContext())) + userNameTv.setTextColor(R.color.text_subtitle.toColor(requireContext())) + videoItemFollowTv.setTextColor(R.color.theme_font.toColor(requireContext())) + } + inputContainer.run { + bottomContainer.setBackgroundColor(R.color.background_white.toColor(requireContext())) + replyTv.setBackgroundColor(R.color.background.toColor(requireContext())) + replyTv.setTextColor(R.color.text_body.toColor(requireContext())) + bottomShareTv.setTextColor(R.color.text_subtitle.toColor(requireContext())) + bottomLikeTv.setTextColor(R.color.text_subtitle.toColor(requireContext())) + bottomStarTv.setTextColor(R.color.text_subtitle.toColor(requireContext())) + bottomCommentTv.setTextColor(R.color.text_subtitle.toColor(requireContext())) + } + fixedTopFilterView.run { + filterView.setBackgroundColor(R.color.background_white.toColor(requireContext())) + divider.setBackgroundColor(R.color.divider.toColor(requireContext())) + commentHintTv.setTextColor(R.color.text_title.toColor(requireContext())) + commentHintCountTv.setTextColor(R.color.text_subtitleDesc.toColor(requireContext())) + orderSfv.run { + setContainerBackground(R.drawable.button_round_f5f5f5.toDrawable(requireContext())) + setIndicatorBackground(R.drawable.progressbar_game_collection_primary.toDrawable(requireContext())) + setTextColor(ContextCompat.getColorStateList(requireContext(), R.color.game_collection_rg_button_selector)) + } + } + for (i in 0 until tagList.childCount) { + val tagBinding = LayoutGameCollectionTagBinding.bind(tagList.getChildAt(i) as LinearLayout) + tagBinding.divider.setBackgroundColor(R.color.theme_alpha_20.toColor(requireContext())) + tagBinding.contentTv.setTextColor(R.color.theme_font.toColor(requireContext())) + } + } + } } \ No newline at end of file diff --git a/app/src/main/java/com/gh/gamecenter/gamecollection/detail/GameCollectionShareDialog.kt b/app/src/main/java/com/gh/gamecenter/gamecollection/detail/GameCollectionShareDialog.kt index bc83622268..144738a98a 100644 --- a/app/src/main/java/com/gh/gamecenter/gamecollection/detail/GameCollectionShareDialog.kt +++ b/app/src/main/java/com/gh/gamecenter/gamecollection/detail/GameCollectionShareDialog.kt @@ -7,6 +7,7 @@ import android.view.ViewGroup import androidx.appcompat.app.AppCompatActivity import com.gh.common.dialog.BaseDraggableDialogFragment import com.gh.common.util.* +import com.gh.gamecenter.R import com.gh.gamecenter.databinding.DialogGameCollectionShareBinding import com.gh.gamecenter.entity.NormalShareEntity import com.gh.gamecenter.eventbus.EBShare @@ -108,6 +109,17 @@ class GameCollectionShareDialog : BaseDraggableDialogFragment() { override fun getRootView(): View = mBinding.root override fun getDragCloseView(): View = mBinding.dragClose + override fun onNightModeChange() { + super.onNightModeChange() + mBinding.run { + container.background = R.drawable.game_detail_more_dialog_background.toDrawable(requireContext()) + cancelTv.background = R.drawable.bg_shape_f5_radius_999.toDrawable(requireContext()) + dividerLine1.setBackgroundColor(R.color.divider.toColor(requireContext())) + cancelTv.setTextColor(R.color.text_subtitle.toColor(requireContext())) + titleTv.setTextColor(R.color.text_title.toColor(requireContext())) + } + } + companion object { const val KEY_SHARE = "share" const val REQUEST_CODE = 1105 diff --git a/app/src/main/java/com/gh/gamecenter/gamecollection/detail/conversation/GameCollectionCommentConversationFragment.kt b/app/src/main/java/com/gh/gamecenter/gamecollection/detail/conversation/GameCollectionCommentConversationFragment.kt index e868027ac6..b3ffb1710a 100644 --- a/app/src/main/java/com/gh/gamecenter/gamecollection/detail/conversation/GameCollectionCommentConversationFragment.kt +++ b/app/src/main/java/com/gh/gamecenter/gamecollection/detail/conversation/GameCollectionCommentConversationFragment.kt @@ -6,6 +6,7 @@ import android.content.Intent import android.os.Bundle import android.view.LayoutInflater import android.view.View +import androidx.core.content.ContextCompat import com.ethanhua.skeleton.Skeleton import com.gh.common.AppExecutor import com.gh.common.syncpage.SyncDataEntity @@ -168,4 +169,32 @@ class GameCollectionCommentConversationFragment : BaseCommentFragment(R.id.postTv)?.background = R.drawable.textview_concern_red_up_round.toDrawable(this) + if (::mBinding.isInitialized) { + mBinding.run { + root.setBackgroundColor(R.color.background_white.toColor(this@GameCollectionEditActivity)) + labelDivider.setBackgroundColor(R.color.divider.toColor(this@GameCollectionEditActivity)) + gameDivider.setBackgroundColor(R.color.divider.toColor(this@GameCollectionEditActivity)) + activityDivider.setBackgroundColor(R.color.divider.toColor(this@GameCollectionEditActivity)) + titleDivider.setBackgroundColor(R.color.divider.toColor(this@GameCollectionEditActivity)) + introduceDivider.setBackgroundColor(R.color.divider.toColor(this@GameCollectionEditActivity)) + placeholderView.background = R.drawable.bg_shape_f5_radius_8.toDrawable(this@GameCollectionEditActivity) + selfOnlyCb.background = R.drawable.border_round_stroke_0dot5_eee_999.toDrawable(this@GameCollectionEditActivity) + uploadPictureTv.setTextColor(R.color.text_body.toColor(this@GameCollectionEditActivity)) + labelTipTv.setTextColor(R.color.text_body.toColor(this@GameCollectionEditActivity)) + gamesTv.setTextColor(R.color.text_title.toColor(this@GameCollectionEditActivity)) + gamesTipTv.setTextColor(R.color.text_body.toColor(this@GameCollectionEditActivity)) + activityTv.setTextColor(R.color.text_title.toColor(this@GameCollectionEditActivity)) + gameCollectionTitleEt.setTextColor(R.color.text_title.toColor(this@GameCollectionEditActivity)) + gameCollectionIntroduceEt.setTextColor(R.color.text_title.toColor(this@GameCollectionEditActivity)) + introduceSizeTv.setTextColor(R.color.text_body.toColor(this@GameCollectionEditActivity)) + normsLinkTv.setTextColor(R.color.theme_font.toColor(this@GameCollectionEditActivity)) + selfOnlyCb.setTextColor(R.color.text_subtitleDesc.toColor(this@GameCollectionEditActivity)) + labelTipTv.setHintTextColor(R.color.text_subtitleDesc.toColor(this@GameCollectionEditActivity)) + gamesTipTv.setHintTextColor(R.color.text_subtitleDesc.toColor(this@GameCollectionEditActivity)) + activityTipTv.setHintTextColor(R.color.text_subtitleDesc.toColor(this@GameCollectionEditActivity)) + gameCollectionTitleEt.setHintTextColor(R.color.text_body.toColor(this@GameCollectionEditActivity)) + gameCollectionIntroduceEt.setHintTextColor(R.color.text_body.toColor(this@GameCollectionEditActivity)) + for (i in 0 until mBinding.gameCollectionTagsContainer.childCount) { + mBinding.gameCollectionTagsContainer.getChildAt(i)?.findViewById(R.id.tagNameTv)?.setTextColor(R.color.text_title.toColor(this@GameCollectionEditActivity)) + mBinding.gameCollectionTagsContainer.getChildAt(i)?.findViewById(R.id.divider)?.setBackgroundColor(R.color.text_title.toColor(this@GameCollectionEditActivity)) + } + } + } + } companion object { diff --git a/app/src/main/java/com/gh/gamecenter/gamecollection/square/GameCollectionSquareFragment.kt b/app/src/main/java/com/gh/gamecenter/gamecollection/square/GameCollectionSquareFragment.kt index 9bc40c355b..0c9c1cfaf9 100644 --- a/app/src/main/java/com/gh/gamecenter/gamecollection/square/GameCollectionSquareFragment.kt +++ b/app/src/main/java/com/gh/gamecenter/gamecollection/square/GameCollectionSquareFragment.kt @@ -486,6 +486,7 @@ class GameCollectionSquareFragment : LazyListFragment { + holder.binding.hintTv.setTextColor(R.color.text_body.toColor(holder.binding.root.context)) holder.binding.selectedTagFlexbox.removeAllViews() holder.binding.hintTv.goneIf(selectedTagEntityList.size != 0) for (tag in selectedTagEntityList) { @@ -69,6 +68,7 @@ class GameCollectionTagAdapter( val data = mTagList[if (singleChoice) position else position - 1] holder.binding.tagFlexbox.removeAllViews() holder.binding.titleTv.text = data.categoryName + holder.binding.titleTv.setTextColor(R.color.text_title.toColor(holder.binding.root.context)) holder.binding.titleTv.setPadding( 16F.dip2px(), if (position == 0) 40F.dip2px() else 10F.dip2px(), diff --git a/app/src/main/java/com/gh/gamecenter/gamecollection/tag/GameCollectionTagSelectActivity.kt b/app/src/main/java/com/gh/gamecenter/gamecollection/tag/GameCollectionTagSelectActivity.kt index b854360a34..3d21629830 100644 --- a/app/src/main/java/com/gh/gamecenter/gamecollection/tag/GameCollectionTagSelectActivity.kt +++ b/app/src/main/java/com/gh/gamecenter/gamecollection/tag/GameCollectionTagSelectActivity.kt @@ -3,6 +3,7 @@ package com.gh.gamecenter.gamecollection.tag import android.content.Context import android.content.Intent import android.os.Bundle +import com.gh.common.util.DisplayUtils import com.gh.gamecenter.NormalActivity import com.gh.gamecenter.R import com.gh.gamecenter.entity.TagInfoEntity @@ -11,6 +12,7 @@ class GameCollectionTagSelectActivity : NormalActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) + DisplayUtils.setStatusBarColor(this, if (mNightMode) R.color.black else R.color.white) setNavigationTitle("选择标签") if (intent.getBundleExtra(NORMAL_FRAGMENT_BUNDLE)?.getBoolean(KEY_IS_SINGLE_CHOICE) == false) { setToolbarMenu(R.menu.menu_save) @@ -19,6 +21,11 @@ class GameCollectionTagSelectActivity : NormalActivity() { } } + override fun onNightModeChange() { + super.onNightModeChange() + DisplayUtils.setStatusBarColor(this, if (mNightMode) R.color.black else R.color.white) + } + companion object { const val KEY_IS_SINGLE_CHOICE = "single_choice" const val KEY_SINGLE_SELECTED_TAG = "single_selected_tag" diff --git a/app/src/main/java/com/gh/gamecenter/gamecollection/tag/GameCollectionTagSelectFragment.kt b/app/src/main/java/com/gh/gamecenter/gamecollection/tag/GameCollectionTagSelectFragment.kt index adf873f23a..79ad442210 100644 --- a/app/src/main/java/com/gh/gamecenter/gamecollection/tag/GameCollectionTagSelectFragment.kt +++ b/app/src/main/java/com/gh/gamecenter/gamecollection/tag/GameCollectionTagSelectFragment.kt @@ -9,6 +9,7 @@ import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.SimpleItemAnimator import com.gh.common.util.NewLogUtils +import com.gh.common.util.toColor import com.gh.common.util.viewModelProvider import com.gh.gamecenter.R import com.gh.gamecenter.databinding.FragmentGameCollectionTagSelectBinding @@ -114,6 +115,15 @@ class GameCollectionTagSelectFragment : NormalFragment() { requireActivity().finish() } + override fun onNightModeChange() { + super.onNightModeChange() + mBinding.root.setBackgroundColor(R.color.background_white.toColor(requireContext())) + mBinding.selectedTagScrollView.setBackgroundColor(R.color.background_white.toColor(requireContext())) + if (::mAdapter.isInitialized) { + mAdapter.notifyItemRangeChanged(0, mAdapter.itemCount) + } + } + companion object { const val SELECTED_TAG = "selected_tag" } diff --git a/app/src/main/java/com/gh/gamecenter/qa/comment/base/BaseCommentAdapter.kt b/app/src/main/java/com/gh/gamecenter/qa/comment/base/BaseCommentAdapter.kt index 6d3e7cd9a9..0ada54b148 100644 --- a/app/src/main/java/com/gh/gamecenter/qa/comment/base/BaseCommentAdapter.kt +++ b/app/src/main/java/com/gh/gamecenter/qa/comment/base/BaseCommentAdapter.kt @@ -7,6 +7,7 @@ import android.view.View import android.view.ViewGroup import androidx.annotation.StringRes import androidx.appcompat.app.AppCompatActivity +import androidx.core.content.ContextCompat import androidx.recyclerview.widget.GridLayoutManager import androidx.recyclerview.widget.RecyclerView import com.gh.common.constant.ItemViewType @@ -22,6 +23,7 @@ import com.gh.gamecenter.baselist.ListAdapter import com.gh.gamecenter.baselist.LoadStatus import com.gh.gamecenter.baselist.LoadType import com.gh.gamecenter.databinding.ItemArticleDetailCommentBinding +import com.gh.gamecenter.databinding.ItemArticleDetailCommentEmptyBinding import com.gh.gamecenter.databinding.ItemArticleDetailCommentFooterBinding import com.gh.gamecenter.databinding.PieceArticleDetailCommentFilterBinding import com.gh.gamecenter.entity.CommentEntity @@ -103,20 +105,24 @@ abstract class BaseCommentAdapter( ITEM_ERROR_EMPTY -> { CommentErrorViewHolder( - mLayoutInflater.inflate( - R.layout.item_article_detail_comment_empty, - parent, - false + ItemArticleDetailCommentEmptyBinding.bind( + mLayoutInflater.inflate( + R.layout.item_article_detail_comment_empty, + parent, + false + ) ) ) } ITEM_ERROR_CONNECTION -> { CommentErrorViewHolder( - mLayoutInflater.inflate( - R.layout.item_article_detail_comment_empty, - parent, - false + ItemArticleDetailCommentEmptyBinding.bind( + mLayoutInflater.inflate( + R.layout.item_article_detail_comment_empty, + parent, + false + ) ) ) } @@ -194,6 +200,11 @@ abstract class BaseCommentAdapter( is CommentFooterViewHolder -> { holder.bindView(mIsLoading, mIsNetworkError, mIsOver) } + + is CommentErrorViewHolder -> { + holder.binding.container.setBackgroundColor(R.color.background_white.toColor(mContext)) + holder.binding.hintTv.setTextColor(R.color.text_body.toColor(mContext)) + } } } @@ -228,7 +239,7 @@ abstract class BaseCommentAdapter( } } - inner class CommentErrorViewHolder(view: View) : RecyclerView.ViewHolder(view) + inner class CommentErrorViewHolder(val binding: ItemArticleDetailCommentEmptyBinding) : RecyclerView.ViewHolder(binding.root) inner class CommentFilterViewHolder(var binding: PieceArticleDetailCommentFilterBinding) : RecyclerView.ViewHolder(binding.root) { fun bindView( @@ -238,6 +249,16 @@ abstract class BaseCommentAdapter( gameCollection: Boolean? = null ) { binding.run { + filterView.setBackgroundColor(R.color.background_white.toColor(mContext)) + divider.setBackgroundColor(R.color.divider.toColor(mContext)) + commentHintTv.setTextColor(R.color.text_title.toColor(mContext)) + commentHintCountTv.setTextColor(R.color.text_subtitleDesc.toColor(mContext)) + orderSfv.run { + setContainerBackground(R.drawable.button_round_f5f5f5.toDrawable(mContext)) + setIndicatorBackground(R.drawable.progressbar_game_collection_primary.toDrawable(mContext)) + setTextColor(ContextCompat.getColorStateList(mContext, R.color.game_collection_rg_button_selector)) + } + val commentCount = mViewModel.commentCount commentHintTv.text = when { article != null -> { @@ -576,7 +597,7 @@ abstract class BaseCommentAdapter( layoutManager = GridLayoutManager(context, 3) adapter = CommentPictureAdapter(context, comment.images!!, entrance) if (itemDecorationCount == 0) { - addItemDecoration(GridSpacingItemColorDecoration(context, 2, R.color.white)) + addItemDecoration(GridSpacingItemColorDecoration(context, 2, R.color.background_white)) } } } else { diff --git a/app/src/main/java/com/gh/gamecenter/qa/comment/base/BaseCommentFragment.kt b/app/src/main/java/com/gh/gamecenter/qa/comment/base/BaseCommentFragment.kt index bfc881586b..f83e8d4f36 100644 --- a/app/src/main/java/com/gh/gamecenter/qa/comment/base/BaseCommentFragment.kt +++ b/app/src/main/java/com/gh/gamecenter/qa/comment/base/BaseCommentFragment.kt @@ -1,13 +1,10 @@ package com.gh.gamecenter.qa.comment.base -import android.graphics.drawable.InsetDrawable import android.os.Bundle import android.view.View import android.widget.TextView import androidx.core.content.ContextCompat import androidx.recyclerview.widget.RecyclerView -import com.gh.common.util.DisplayUtils -import com.gh.common.util.toDrawable import com.gh.common.view.CustomDividerItemDecoration import com.gh.common.view.SegmentedFilterView import com.gh.common.view.vertical_recycler.SnappingLinearLayoutManager @@ -15,7 +12,6 @@ import com.gh.gamecenter.R import com.gh.gamecenter.baselist.ListFragment import com.gh.gamecenter.gamecollection.detail.conversation.GameCollectionCommentConversationFragment import com.gh.gamecenter.qa.comment.conversation.CommentConversationFragment -import com.zhihu.matisse.listener.OnCheckedListener abstract class BaseCommentFragment : ListFragment() { @@ -26,6 +22,8 @@ abstract class BaseCommentFragment : ListFragment< protected lateinit var skeletonView: View protected lateinit var orderSfv: SegmentedFilterView + protected var mItemDecoration: RecyclerView.ItemDecoration? = null + override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) findView() @@ -107,6 +105,7 @@ abstract class BaseCommentFragment : ListFragment< } itemDecoration.setDrawable(drawable!!) + mItemDecoration = itemDecoration return itemDecoration } @@ -123,4 +122,12 @@ abstract class BaseCommentFragment : ListFragment< return (provideListAdapter() as BaseCommentAdapter).filterVH } + override fun onNightModeChange() { + super.onNightModeChange() + if (mListRv != null) { + mListRv.removeItemDecoration(mItemDecoration) + mListRv.addItemDecoration(itemDecoration) + } + } + } \ No newline at end of file diff --git a/app/src/main/java/com/gh/gamecenter/video/label/VideoLabelAdapter.kt b/app/src/main/java/com/gh/gamecenter/video/label/VideoLabelAdapter.kt index 9114ccf5cc..968deb2ac2 100644 --- a/app/src/main/java/com/gh/gamecenter/video/label/VideoLabelAdapter.kt +++ b/app/src/main/java/com/gh/gamecenter/video/label/VideoLabelAdapter.kt @@ -4,8 +4,11 @@ import android.content.Context import android.view.ViewGroup import androidx.recyclerview.widget.RecyclerView import com.gh.base.BaseRecyclerViewHolder +import com.gh.common.util.setRootBackgroundColor import com.gh.common.util.toBinding +import com.gh.common.util.toColor import com.gh.common.util.visibleIf +import com.gh.gamecenter.R import com.gh.gamecenter.databinding.VideoLabelItemBinding import com.gh.gamecenter.entity.ActivityLabelEntity import com.lightgame.adapter.BaseRecyclerAdapter @@ -33,6 +36,12 @@ class VideoLabelAdapter( override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) { if (holder is VideoLabelViewHolder) { + holder.binding.run { + root.setRootBackgroundColor(R.color.background_white) + titleTv.setTextColor(R.color.text_title.toColor(mContext)) + contentTv.setTextColor(R.color.text_subtitleDesc.toColor(mContext)) + } + val activityLabelEntity = entityList[position] holder.binding.titleTv.text = activityLabelEntity.name holder.binding.contentTv.text = activityLabelEntity.desc.ifEmpty { activityLabelEntity.remark } diff --git a/app/src/main/res/drawable-night-xxxhdpi/ic_menu_game_collection_square.webp b/app/src/main/res/drawable-night-xxxhdpi/ic_menu_game_collection_square.webp new file mode 100644 index 0000000000..831b141f80 Binary files /dev/null and b/app/src/main/res/drawable-night-xxxhdpi/ic_menu_game_collection_square.webp differ diff --git a/app/src/main/res/drawable/bg_game_collection_video_item.xml b/app/src/main/res/drawable/bg_game_collection_video_item.xml index e770a278ab..81c0b8a0ec 100644 --- a/app/src/main/res/drawable/bg_game_collection_video_item.xml +++ b/app/src/main/res/drawable/bg_game_collection_video_item.xml @@ -2,8 +2,8 @@ \ No newline at end of file diff --git a/app/src/main/res/drawable/border_round_stroke_0dot5_eee_999.xml b/app/src/main/res/drawable/border_round_stroke_0dot5_eee_999.xml index 72f260b37f..8048495a44 100644 --- a/app/src/main/res/drawable/border_round_stroke_0dot5_eee_999.xml +++ b/app/src/main/res/drawable/border_round_stroke_0dot5_eee_999.xml @@ -2,7 +2,7 @@ - + diff --git a/app/src/main/res/drawable/choose_game_collection_cover_type_selector.xml b/app/src/main/res/drawable/choose_game_collection_cover_type_selector.xml index e955778760..71204e8eef 100644 --- a/app/src/main/res/drawable/choose_game_collection_cover_type_selector.xml +++ b/app/src/main/res/drawable/choose_game_collection_cover_type_selector.xml @@ -3,5 +3,5 @@ - + \ No newline at end of file diff --git a/app/src/main/res/drawable/divider_article_detail_comment.xml b/app/src/main/res/drawable/divider_article_detail_comment.xml index 117951aa2b..afcec90eec 100644 --- a/app/src/main/res/drawable/divider_article_detail_comment.xml +++ b/app/src/main/res/drawable/divider_article_detail_comment.xml @@ -3,7 +3,7 @@ - + diff --git a/app/src/main/res/layout/activity_game_collection_edit.xml b/app/src/main/res/layout/activity_game_collection_edit.xml index 866268f521..8c30133b3f 100644 --- a/app/src/main/res/layout/activity_game_collection_edit.xml +++ b/app/src/main/res/layout/activity_game_collection_edit.xml @@ -3,7 +3,7 @@ xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" - android:background="@color/white" + android:background="@color/background_white" android:orientation="vertical"> @@ -134,6 +134,7 @@ android:hint="请至少添加一个标签" android:includeFontPadding="false" android:textColor="@color/text_body" + android:textColorHint="@color/text_subtitleDesc" android:textSize="@dimen/secondary_size" /> diff --git a/app/src/main/res/layout/fragment_article_detail_comment.xml b/app/src/main/res/layout/fragment_article_detail_comment.xml index 016cbdaca0..1a278644bc 100644 --- a/app/src/main/res/layout/fragment_article_detail_comment.xml +++ b/app/src/main/res/layout/fragment_article_detail_comment.xml @@ -6,6 +6,7 @@ android:layout_height="match_parent"> diff --git a/app/src/main/res/layout/fragment_game_collection_detail.xml b/app/src/main/res/layout/fragment_game_collection_detail.xml index e854a6aae3..4c4e2a6ca0 100644 --- a/app/src/main/res/layout/fragment_game_collection_detail.xml +++ b/app/src/main/res/layout/fragment_game_collection_detail.xml @@ -16,7 +16,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:fitsSystemWindows="true" - android:background="@color/white" + android:background="@color/background_white" android:gravity="center" app:elevation="0dp" app:layout_behavior="com.gh.common.view.FixAppBarLayoutBehavior"> @@ -51,7 +51,7 @@ android:layout_width="match_parent" android:layout_height="44dp" android:scrollbars="none" - android:background="@color/white" + android:background="@color/background_white" android:nestedScrollingEnabled="false"> + android:background="@color/background_white"> diff --git a/app/src/main/res/layout/fragment_game_collection_square.xml b/app/src/main/res/layout/fragment_game_collection_square.xml index 1e362c419f..74f6f8782e 100644 --- a/app/src/main/res/layout/fragment_game_collection_square.xml +++ b/app/src/main/res/layout/fragment_game_collection_square.xml @@ -50,6 +50,7 @@ android:layout_height="66dp" /> + android:background="@color/background_white"> + android:background="@color/background_white"> + android:background="@color/background_white"> + android:background="#2496FF"> + android:background="@color/background_white"> diff --git a/app/src/main/res/layout/item_choose_games.xml b/app/src/main/res/layout/item_choose_games.xml index f22182628f..73b752ca58 100644 --- a/app/src/main/res/layout/item_choose_games.xml +++ b/app/src/main/res/layout/item_choose_games.xml @@ -4,7 +4,7 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="@color/white" + android:background="@color/background_white" android:paddingRight="16dp" android:paddingBottom="16dp"> @@ -42,6 +42,7 @@ tools:text="御龙正版授权" /> diff --git a/app/src/main/res/layout/piece_article_input_container.xml b/app/src/main/res/layout/piece_article_input_container.xml index 9c2e10547f..b97a59d6b2 100644 --- a/app/src/main/res/layout/piece_article_input_container.xml +++ b/app/src/main/res/layout/piece_article_input_container.xml @@ -6,7 +6,7 @@ android:layout_width="match_parent" android:layout_height="56dp" android:layout_alignParentBottom="true" - android:background="@color/white" + android:background="@color/background_white" android:clickable="true" android:focusable="true" tools:showIn="@layout/fragment_article_detail"> diff --git a/app/src/main/res/layout/video_label_item.xml b/app/src/main/res/layout/video_label_item.xml index 2eacc17561..e9eb49bd78 100644 --- a/app/src/main/res/layout/video_label_item.xml +++ b/app/src/main/res/layout/video_label_item.xml @@ -4,7 +4,7 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="@color/white" + android:background="@color/background_white" android:paddingLeft="16dp" android:paddingTop="20dp" android:paddingRight="16dp" diff --git a/app/src/main/res/values-night/colors.xml b/app/src/main/res/values-night/colors.xml index 9d871c2492..d00d37054a 100644 --- a/app/src/main/res/values-night/colors.xml +++ b/app/src/main/res/values-night/colors.xml @@ -31,6 +31,7 @@ #121212 #000000 + #00121212 #333333 @@ -164,7 +165,7 @@ @color/background #c7c7c7 #d6d5ff - #f8f8f8 + @color/background #e5e5e5 #e6e6e6 #ECF6FF @@ -217,9 +218,9 @@ #FA8500 #f67722 #989898 - #444444 + @color/text_title #777777 - #f2f2f2 + @color/background #292929 #00DD08 #E0FFF9 @@ -249,8 +250,8 @@ #242529 #ebebeb #4BC7FF - #F8F8F8 - #F0F0F0 + @color/background + @color/background #00DBB0 #00B8B8 #00D7B0 diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 82f28cb8d6..65dcd51f2e 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -32,6 +32,7 @@ #F5F5F5 #FFFFFF + #00F5F5F5 #EEEEEE