【光环助手V5.5.0】游戏单广场(1209补充2)https://git.shanqu.cc/pm/halo-app-issues/-/issues/1598
修改游戏单广场发布控件动效 修改游戏单卡片黑色渐变遮罩 删除选择标签刷新动画
This commit is contained in:
@ -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
|
||||
|
||||
@ -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<GamesCollectionEntity, Gam
|
||||
NewLogUtils.logEnterGameCollectionSquare(mEntrance, mForumName, mGameCollectionTitle, mGameCollectionId)
|
||||
}
|
||||
|
||||
override fun onFragmentPause() {
|
||||
super.onFragmentPause()
|
||||
if (mUseAlternativeLayout) {
|
||||
val rootView = (parentFragment as HomeSearchToolWrapperFragment).view
|
||||
rootView?.findViewById<ImageView>(R.id.fab)?.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
|
||||
override fun onFragmentResume() {
|
||||
super.onFragmentResume()
|
||||
if (mUseAlternativeLayout) {
|
||||
val rootView = (parentFragment as HomeSearchToolWrapperFragment).view
|
||||
rootView?.findViewById<ImageView>(R.id.fab)?.visibility = View.VISIBLE
|
||||
}
|
||||
}
|
||||
|
||||
override fun isAutomaticLoad() = false
|
||||
|
||||
override fun onRealLayoutInflated(inflatedView: View) {
|
||||
@ -197,19 +214,12 @@ class GameCollectionSquareFragment : LazyListFragment<GamesCollectionEntity, Gam
|
||||
}
|
||||
|
||||
mDefaultBinding.listRv.addOnScrollListener(object : RecyclerView.OnScrollListener() {
|
||||
override fun onScrollStateChanged(recyclerView: RecyclerView, newState: Int) {
|
||||
super.onScrollStateChanged(recyclerView, newState)
|
||||
if (newState != RecyclerView.SCROLL_STATE_IDLE && (recyclerView.canScrollVertically(1) && recyclerView.canScrollVertically(-1))) {
|
||||
setFabStatus(mDefaultBinding.fab, View.GONE)
|
||||
} else {
|
||||
setFabStatus(mDefaultBinding.fab, View.VISIBLE)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
|
||||
super.onScrolled(recyclerView, dx, dy)
|
||||
if (abs(dy) > 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<GamesCollectionEntity, Gam
|
||||
val rootView = (parentFragment as HomeSearchToolWrapperFragment).view
|
||||
if (rootView is RelativeLayout) {
|
||||
val fabView = ImageView(context).apply {
|
||||
id = R.id.fab
|
||||
layoutParams = RelativeLayout.LayoutParams(60F.dip2px(), 60F.dip2px()).apply {
|
||||
addRule(RelativeLayout.ALIGN_PARENT_BOTTOM)
|
||||
addRule(RelativeLayout.ALIGN_PARENT_RIGHT)
|
||||
@ -242,19 +253,12 @@ class GameCollectionSquareFragment : LazyListFragment<GamesCollectionEntity, Gam
|
||||
}
|
||||
rootView.addView(fabView)
|
||||
mAlternativeBinding.listRv.addOnScrollListener(object : RecyclerView.OnScrollListener() {
|
||||
override fun onScrollStateChanged(recyclerView: RecyclerView, newState: Int) {
|
||||
super.onScrollStateChanged(recyclerView, newState)
|
||||
if (newState != RecyclerView.SCROLL_STATE_IDLE && (recyclerView.canScrollVertically(1) && recyclerView.canScrollVertically(-1))) {
|
||||
setFabStatus(fabView, View.GONE)
|
||||
} else {
|
||||
setFabStatus(fabView, View.VISIBLE)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
|
||||
super.onScrolled(recyclerView, dx, dy)
|
||||
if (abs(dy) > 0) {
|
||||
if (dy > CommunityFragment.FOLLOW_HINT_TRIGGER_HEIGHT) {
|
||||
setFabStatus(fabView, View.GONE)
|
||||
} else if (dy < -CommunityFragment.FOLLOW_HINT_TRIGGER_HEIGHT) {
|
||||
setFabStatus(fabView, View.VISIBLE)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@ -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) {
|
||||
|
||||
@ -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
|
||||
|
||||
Reference in New Issue
Block a user