FixedViewPager

class FixedViewPager(context: Context, attrs: AttributeSet?) : ViewPager

解决 IllegalArgumentException: pointerIndex out of range

Constructors

FixedViewPager
Link copied to clipboard
fun FixedViewPager(context: Context, attrs: AttributeSet? = null)

Functions

onInterceptTouchEvent
Link copied to clipboard
open override fun onInterceptTouchEvent(ev: MotionEvent): Boolean
onTouchEvent
Link copied to clipboard
open override fun onTouchEvent(ev: MotionEvent): Boolean

Properties

scrollable
Link copied to clipboard
var scrollable: Boolean = true
是否支持划动
wrapHeight
Link copied to clipboard
var wrapHeight: Boolean = false
该属性可以启用高度为wrap_content, ViewPager默认是match_parent