From 2c23f03cc4121bc06c0f5c4e4d5ee35feb092098 Mon Sep 17 00:00:00 2001 From: leafwai Date: Mon, 13 Dec 2021 19:26:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B8=B8=E6=88=8F=E5=8D=95?= =?UTF-8?q?=E5=B9=BF=E5=9C=BA=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/gh/common/view/StackRecyclerView.kt | 11 +------ .../square/GameCollectionSquareFragment.kt | 22 ++------------ .../fragment_game_collection_square.xml | 29 +++++++++---------- 3 files changed, 17 insertions(+), 45 deletions(-) diff --git a/app/src/main/java/com/gh/common/view/StackRecyclerView.kt b/app/src/main/java/com/gh/common/view/StackRecyclerView.kt index d15b5aa20a..e4dfd41826 100644 --- a/app/src/main/java/com/gh/common/view/StackRecyclerView.kt +++ b/app/src/main/java/com/gh/common/view/StackRecyclerView.kt @@ -22,16 +22,7 @@ class StackRecyclerView : RecyclerView { ) override fun dispatchTouchEvent(ev: MotionEvent): Boolean { - if (ev.action == MotionEvent.ACTION_DOWN) { - posX = ev.x - posY = ev.y - } else if (ev.action == MotionEvent.ACTION_MOVE) { - if (posY - ev.y > abs(posX - ev.x) || ev.y - posY > abs(posX - ev.x)) { - parent.requestDisallowInterceptTouchEvent(false) - } else { - parent.requestDisallowInterceptTouchEvent(true) - } - } + parent.requestDisallowInterceptTouchEvent(true) return super.dispatchTouchEvent(ev) } } 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 794faac6a2..7a652d6874 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 @@ -50,7 +50,6 @@ class GameCollectionSquareFragment : LazyListFragment + app:scrimAnimationDuration="0"> - - - - @@ -164,16 +156,23 @@ + + + + + app:layout_constraintTop_toTopOf="parent" />