Created
May 23, 2019 08:11
-
-
Save jongha/d8c410e8908414120a87289d46929763 to your computer and use it in GitHub Desktop.
Non Swipeable ViewPager in Android
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class NonSwipeableViewPager : ViewPager { | |
constructor(context: Context) : super(context) | |
constructor(context: Context, attrs: AttributeSet) : super(context, attrs) | |
override fun onInterceptTouchEvent(event: MotionEvent): Boolean { | |
return false | |
} | |
override fun onTouchEvent(event: MotionEvent): Boolean { | |
return false | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment