diff --git a/app/src/main/java/com/gh/gamecenter/gamecollection/square/GameCollectionSquareAdapter.kt b/app/src/main/java/com/gh/gamecenter/gamecollection/square/GameCollectionSquareAdapter.kt index 5bbd218935..d4fc1285ec 100644 --- a/app/src/main/java/com/gh/gamecenter/gamecollection/square/GameCollectionSquareAdapter.kt +++ b/app/src/main/java/com/gh/gamecenter/gamecollection/square/GameCollectionSquareAdapter.kt @@ -165,7 +165,7 @@ class GameCollectionSquareAdapter( countTv.text = "+ ${it - 3}" } gamesCollectionEntity.count?.hot?.let { - hotTv.text = it.toString() + hotTv.text = if (it > 10000) "10000+" else it.toString() } userTv.text = gamesCollectionEntity.user?.name playedGameProgress.max = gamesCollectionEntity.count?.game?: 0 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 d7e44a23fb..6e70b53a5c 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 @@ -30,6 +30,7 @@ import com.gh.gamecenter.gamecollection.publish.GameCollectionEditActivity import com.gh.gamecenter.gamecollection.tag.GameCollectionTagSelectActivity import com.gh.gamecenter.gamecollection.tag.GameCollectionTagSelectFragment import com.gh.gamecenter.personal.PersonalFragment +import com.gh.gamecenter.qa.CommunityFragment import com.google.android.material.appbar.AppBarLayout import org.greenrobot.eventbus.Subscribe import org.greenrobot.eventbus.ThreadMode @@ -72,6 +73,22 @@ class GameCollectionSquareFragment : LazyListFragment(R.id.fab)?.visibility = View.GONE + } + } + + override fun onFragmentResume() { + super.onFragmentResume() + if (mUseAlternativeLayout) { + val rootView = (parentFragment as HomeSearchToolWrapperFragment).view + rootView?.findViewById(R.id.fab)?.visibility = View.VISIBLE + } + } + override fun isAutomaticLoad() = false override fun onRealLayoutInflated(inflatedView: View) { @@ -197,19 +214,12 @@ class GameCollectionSquareFragment : LazyListFragment 0) { + if (dy > CommunityFragment.FOLLOW_HINT_TRIGGER_HEIGHT) { setFabStatus(mDefaultBinding.fab, View.GONE) + } else if (dy < -CommunityFragment.FOLLOW_HINT_TRIGGER_HEIGHT) { + setFabStatus(mDefaultBinding.fab, View.VISIBLE) } } }) @@ -226,6 +236,7 @@ class GameCollectionSquareFragment : LazyListFragment 0) { + if (dy > CommunityFragment.FOLLOW_HINT_TRIGGER_HEIGHT) { setFabStatus(fabView, View.GONE) + } else if (dy < -CommunityFragment.FOLLOW_HINT_TRIGGER_HEIGHT) { + setFabStatus(fabView, View.VISIBLE) } } }) 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 06126c7a31..adf873f23a 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 @@ -7,6 +7,7 @@ import android.view.MenuItem import android.view.View 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.viewModelProvider import com.gh.gamecenter.R @@ -94,6 +95,7 @@ class GameCollectionTagSelectFragment : NormalFragment() { if (firstVisibleItemPosition == 0 || mAdapter.selectedTagEntityList.isEmpty()) View.GONE else View.VISIBLE } }) + (itemAnimator as SimpleItemAnimator).supportsChangeAnimations = false } mViewModel.tagListLiveData.observe(viewLifecycleOwner) { diff --git a/app/src/main/java/com/gh/gamecenter/home/gamecollection/GameCollectionStackAnimation.kt b/app/src/main/java/com/gh/gamecenter/home/gamecollection/GameCollectionStackAnimation.kt index 010e20c8b3..853940cb16 100644 --- a/app/src/main/java/com/gh/gamecenter/home/gamecollection/GameCollectionStackAnimation.kt +++ b/app/src/main/java/com/gh/gamecenter/home/gamecollection/GameCollectionStackAnimation.kt @@ -1,11 +1,10 @@ package com.gh.gamecenter.home.gamecollection import android.view.View -import com.gh.common.util.DisplayUtils +import com.gh.common.util.visibleIf import com.gh.common.view.stacklayoutmanager.StackAnimation import com.gh.common.view.stacklayoutmanager.StackLayoutManager import com.gh.gamecenter.R -import com.halo.assistant.HaloApp import com.lightgame.utils.Utils import kotlin.math.pow @@ -90,8 +89,7 @@ class GameCollectionStackAnimation( 2 -> cover.alpha = 0.6F - 0.3F * firstMovePercent 3 -> { cover.alpha = 1F - 0.4F * firstMovePercent - // 如果不改变会出现残留边框 -// alpha = if (firstMovePercent == 0F) 0F else 1F + alpha = firstMovePercent } } rotation = 0F diff --git a/app/src/main/res/drawable/game_collection_poster_mask.xml b/app/src/main/res/drawable/game_collection_poster_mask.xml index 5353b9f6b4..435bd42ed5 100644 --- a/app/src/main/res/drawable/game_collection_poster_mask.xml +++ b/app/src/main/res/drawable/game_collection_poster_mask.xml @@ -4,7 +4,7 @@ \ No newline at end of file diff --git a/app/src/main/res/layout/home_game_collection_card_item.xml b/app/src/main/res/layout/home_game_collection_card_item.xml index 6d849fdfde..558276e58c 100644 --- a/app/src/main/res/layout/home_game_collection_card_item.xml +++ b/app/src/main/res/layout/home_game_collection_card_item.xml @@ -70,7 +70,7 @@ android:layout_height="30dp" android:layout_marginStart="16dp" android:layout_marginLeft="16dp" - android:layout_marginTop="13dp" + android:layout_marginTop="11dp" app:gameIconBorderColor="@color/white" app:gameIconBorderWidth="1dp" app:layout_constraintStart_toStartOf="parent"