首页 > 代码库 > ViewConfiguration 和 ViewConfigurationCompat

ViewConfiguration 和 ViewConfigurationCompat

Contains methods to standard constants used in the UI for timeouts, sizes, and distances.

 

一。几个常用的方法

返回初始化滑动的最大速度值和最小速度值,以像素/秒为单位

getScaledMinimumFlingVelocity()

  • Minimum velocity to initiate a fling, as measured in pixels per second.

 

getScaledMaximumFlingVelocity()

  • Maximum velocity to initiate a fling, as measured in pixels per second.

 

getScaledTouchSlop ()

  •  Distance in pixels a touch can wander before we think the user is scrolling  。 Touchslop通常用来防止用户的其他触摸行为被判断为滑动。

 

 getScaledPagingTouchSlop ()

  • Distance in pixels a touch can wander before we think the user is scrolling a full page

在ViewConfigurationCompat 也有  getScaledPagingTouchSlop () 。所以要调用ViewConfigurationCompat的这个方法。