Loading api/current.xml +11 −0 Original line number Diff line number Diff line Loading @@ -179390,6 +179390,17 @@ visibility="public" > </method> <method name="getScaledPagingTouchSlop" return="int" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="getScaledScrollBarSize" return="int" abstract="false" core/java/android/view/ViewConfiguration.java +17 −0 Original line number Diff line number Diff line Loading @@ -101,6 +101,12 @@ public class ViewConfiguration { */ private static final int TOUCH_SLOP = 16; /** * Distance a touch can wander before we think the user is attempting a paged scroll * (in dips) */ private static final int PAGING_TOUCH_SLOP = TOUCH_SLOP * 3; /** * Distance between the first touch and second touch to still be considered a double tap */ Loading Loading @@ -140,6 +146,7 @@ public class ViewConfiguration { private final int mMaximumFlingVelocity; private final int mScrollbarSize; private final int mTouchSlop; private final int mPagingTouchSlop; private final int mDoubleTapSlop; private final int mWindowTouchSlop; private final int mMaximumDrawingCacheSize; Loading @@ -158,6 +165,7 @@ public class ViewConfiguration { mMaximumFlingVelocity = MAXIMUM_FLING_VELOCITY; mScrollbarSize = SCROLL_BAR_SIZE; mTouchSlop = TOUCH_SLOP; mPagingTouchSlop = PAGING_TOUCH_SLOP; mDoubleTapSlop = DOUBLE_TAP_SLOP; mWindowTouchSlop = WINDOW_TOUCH_SLOP; //noinspection deprecation Loading @@ -184,6 +192,7 @@ public class ViewConfiguration { mMaximumFlingVelocity = (int) (density * MAXIMUM_FLING_VELOCITY + 0.5f); mScrollbarSize = (int) (density * SCROLL_BAR_SIZE + 0.5f); mTouchSlop = (int) (density * TOUCH_SLOP + 0.5f); mPagingTouchSlop = (int) (density * PAGING_TOUCH_SLOP + 0.5f); mDoubleTapSlop = (int) (density * DOUBLE_TAP_SLOP + 0.5f); mWindowTouchSlop = (int) (density * WINDOW_TOUCH_SLOP + 0.5f); Loading Loading @@ -340,6 +349,14 @@ public class ViewConfiguration { return mTouchSlop; } /** * @return Distance a touch can wander before we think the user is scrolling a full page * in dips */ public int getScaledPagingTouchSlop() { return mPagingTouchSlop; } /** * @return Distance between the first touch and second touch to still be * considered a double tap Loading Loading
api/current.xml +11 −0 Original line number Diff line number Diff line Loading @@ -179390,6 +179390,17 @@ visibility="public" > </method> <method name="getScaledPagingTouchSlop" return="int" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="getScaledScrollBarSize" return="int" abstract="false"
core/java/android/view/ViewConfiguration.java +17 −0 Original line number Diff line number Diff line Loading @@ -101,6 +101,12 @@ public class ViewConfiguration { */ private static final int TOUCH_SLOP = 16; /** * Distance a touch can wander before we think the user is attempting a paged scroll * (in dips) */ private static final int PAGING_TOUCH_SLOP = TOUCH_SLOP * 3; /** * Distance between the first touch and second touch to still be considered a double tap */ Loading Loading @@ -140,6 +146,7 @@ public class ViewConfiguration { private final int mMaximumFlingVelocity; private final int mScrollbarSize; private final int mTouchSlop; private final int mPagingTouchSlop; private final int mDoubleTapSlop; private final int mWindowTouchSlop; private final int mMaximumDrawingCacheSize; Loading @@ -158,6 +165,7 @@ public class ViewConfiguration { mMaximumFlingVelocity = MAXIMUM_FLING_VELOCITY; mScrollbarSize = SCROLL_BAR_SIZE; mTouchSlop = TOUCH_SLOP; mPagingTouchSlop = PAGING_TOUCH_SLOP; mDoubleTapSlop = DOUBLE_TAP_SLOP; mWindowTouchSlop = WINDOW_TOUCH_SLOP; //noinspection deprecation Loading @@ -184,6 +192,7 @@ public class ViewConfiguration { mMaximumFlingVelocity = (int) (density * MAXIMUM_FLING_VELOCITY + 0.5f); mScrollbarSize = (int) (density * SCROLL_BAR_SIZE + 0.5f); mTouchSlop = (int) (density * TOUCH_SLOP + 0.5f); mPagingTouchSlop = (int) (density * PAGING_TOUCH_SLOP + 0.5f); mDoubleTapSlop = (int) (density * DOUBLE_TAP_SLOP + 0.5f); mWindowTouchSlop = (int) (density * WINDOW_TOUCH_SLOP + 0.5f); Loading Loading @@ -340,6 +349,14 @@ public class ViewConfiguration { return mTouchSlop; } /** * @return Distance a touch can wander before we think the user is scrolling a full page * in dips */ public int getScaledPagingTouchSlop() { return mPagingTouchSlop; } /** * @return Distance between the first touch and second touch to still be * considered a double tap Loading