Skip to content

Commit

Permalink
Core库新增TabLayoutExtensions、ViewPagerExtensions
Browse files Browse the repository at this point in the history
  • Loading branch information
liuzhentao committed Sep 15, 2023
1 parent aa7b860 commit 434dfb7
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,14 @@ open class FastViewPager @JvmOverloads constructor(

var scrollable = true

override fun canScrollHorizontally(direction: Int): Boolean {
return scrollable && super.canScrollHorizontally(direction)
}

override fun canScrollVertically(direction: Int): Boolean {
return scrollable && super.canScrollVertically(direction)
}

override fun onTouchEvent(ev: MotionEvent): Boolean {
return if (!scrollable) {
false
Expand Down

0 comments on commit 434dfb7

Please sign in to comment.