diff --git a/app/src/main/assets/updateLog.md b/app/src/main/assets/updateLog.md index bd024a9bd..e1016e4e3 100644 --- a/app/src/main/assets/updateLog.md +++ b/app/src/main/assets/updateLog.md @@ -5,6 +5,7 @@ **2021/05/24** * 反转目录后刷新内容 +* 修复上下滑动会导致左右切换问题 **2021/05/21** * 添加反转目录功能 diff --git a/app/src/main/java/io/legado/app/ui/widget/RecyclerViewAtViewPager2.kt b/app/src/main/java/io/legado/app/ui/widget/recycler/RecyclerViewAtPager2.kt similarity index 89% rename from app/src/main/java/io/legado/app/ui/widget/RecyclerViewAtViewPager2.kt rename to app/src/main/java/io/legado/app/ui/widget/recycler/RecyclerViewAtPager2.kt index 10abec353..7ab5ed8e9 100644 --- a/app/src/main/java/io/legado/app/ui/widget/RecyclerViewAtViewPager2.kt +++ b/app/src/main/java/io/legado/app/ui/widget/recycler/RecyclerViewAtPager2.kt @@ -1,15 +1,19 @@ -package io.legado.app.ui.widget +package io.legado.app.ui.widget.recycler import android.content.Context -import androidx.recyclerview.widget.RecyclerView import android.util.AttributeSet import android.view.MotionEvent +import androidx.recyclerview.widget.RecyclerView import kotlin.math.abs -class RecyclerViewAtViewPager2 : RecyclerView { +class RecyclerViewAtPager2 : RecyclerView { constructor(context: Context) : super(context) constructor(context: Context, attrs: AttributeSet?) : super(context, attrs) - constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : super(context, attrs, defStyleAttr) + constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : super( + context, + attrs, + defStyleAttr + ) private var startX = 0 private var startY = 0 diff --git a/app/src/main/res/layout/fragment_books.xml b/app/src/main/res/layout/fragment_books.xml index 1e2fbe64b..e67df9c4e 100644 --- a/app/src/main/res/layout/fragment_books.xml +++ b/app/src/main/res/layout/fragment_books.xml @@ -9,7 +9,7 @@ android:layout_width="match_parent" android:layout_height="match_parent"> - - - -