diff options
author | Mindy Pereira <mindyp@google.com> | 2014-05-01 20:43:52 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-05-01 20:43:52 +0000 |
commit | 5f81193f801f77c0c00bcc4f65a68bd995e7b954 (patch) | |
tree | eb4f1fea9f6dc4b41e054a14bf924bd6b2fad760 /core | |
parent | 99013a24a51260f8f276c58916728c241e3add63 (diff) | |
parent | ed7e36dc2ef400916356459f9ea67d66645a85fb (diff) | |
download | frameworks_base-5f81193f801f77c0c00bcc4f65a68bd995e7b954.zip frameworks_base-5f81193f801f77c0c00bcc4f65a68bd995e7b954.tar.gz frameworks_base-5f81193f801f77c0c00bcc4f65a68bd995e7b954.tar.bz2 |
am ed7e36dc: am d5e92318: Merge "Update fling min velocity" into klp-modular-dev
* commit 'ed7e36dc2ef400916356459f9ea67d66645a85fb':
Update fling min velocity
Diffstat (limited to 'core')
-rw-r--r-- | core/java/android/view/ViewConfiguration.java | 7 | ||||
-rw-r--r-- | core/res/res/values-watch/config.xml | 7 | ||||
-rw-r--r-- | core/res/res/values/config.xml | 6 | ||||
-rw-r--r-- | core/res/res/values/symbols.xml | 2 |
4 files changed, 20 insertions, 2 deletions
diff --git a/core/java/android/view/ViewConfiguration.java b/core/java/android/view/ViewConfiguration.java index 5112b9a..48a5bd5 100644 --- a/core/java/android/view/ViewConfiguration.java +++ b/core/java/android/view/ViewConfiguration.java @@ -287,8 +287,6 @@ public class ViewConfiguration { mEdgeSlop = (int) (sizeAndDensity * EDGE_SLOP + 0.5f); mFadingEdgeLength = (int) (sizeAndDensity * FADING_EDGE_LENGTH + 0.5f); - mMinimumFlingVelocity = (int) (density * MINIMUM_FLING_VELOCITY + 0.5f); - mMaximumFlingVelocity = (int) (density * MAXIMUM_FLING_VELOCITY + 0.5f); mScrollbarSize = (int) (density * SCROLL_BAR_SIZE + 0.5f); mDoubleTapSlop = (int) (sizeAndDensity * DOUBLE_TAP_SLOP + 0.5f); mWindowTouchSlop = (int) (sizeAndDensity * WINDOW_TOUCH_SLOP + 0.5f); @@ -339,6 +337,11 @@ public class ViewConfiguration { mPagingTouchSlop = mTouchSlop * 2; mDoubleTapTouchSlop = mTouchSlop; + + mMinimumFlingVelocity = res.getDimensionPixelSize( + com.android.internal.R.dimen.config_viewMinFlingVelocity); + mMaximumFlingVelocity = res.getDimensionPixelSize( + com.android.internal.R.dimen.config_viewMaxFlingVelocity); } /** diff --git a/core/res/res/values-watch/config.xml b/core/res/res/values-watch/config.xml index 1dd4608..e71fa4a 100644 --- a/core/res/res/values-watch/config.xml +++ b/core/res/res/values-watch/config.xml @@ -30,4 +30,11 @@ <!-- Base "touch slop" value used by ViewConfiguration as a movement threshold where scrolling should begin. --> <dimen name="config_viewConfigurationTouchSlop">4dp</dimen> + + <!-- Minimum velocity to initiate a fling, as measured in dips per second. --> + <dimen name="config_viewMinFlingVelocity">50dp</dimen> + + <!-- Maximum velocity to initiate a fling, as measured in dips per second. --> + <dimen name="config_viewMaxFlingVelocity">8000dp</dimen> + </resources> diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml index f919c9f..624ed73 100644 --- a/core/res/res/values/config.xml +++ b/core/res/res/values/config.xml @@ -1206,6 +1206,12 @@ movement threshold where scrolling should begin. --> <dimen name="config_viewConfigurationTouchSlop">8dp</dimen> + <!-- Minimum velocity to initiate a fling, as measured in dips per second. --> + <dimen name="config_viewMinFlingVelocity">50dp</dimen> + + <!-- Maximum velocity to initiate a fling, as measured in dips per second. --> + <dimen name="config_viewMaxFlingVelocity">8000dp</dimen> + <!-- Maximum number of grid columns permitted in the ResolverActivity used for picking activities to handle an intent. --> <integer name="config_maxResolverActivityColumns">2</integer> diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml index d4ac74a..e92d8c6 100644 --- a/core/res/res/values/symbols.xml +++ b/core/res/res/values/symbols.xml @@ -328,6 +328,8 @@ <java-symbol type="dimen" name="accessibility_touch_slop" /> <java-symbol type="dimen" name="config_prefDialogWidth" /> <java-symbol type="dimen" name="config_viewConfigurationTouchSlop" /> + <java-symbol type="dimen" name="config_viewMinFlingVelocity" /> + <java-symbol type="dimen" name="config_viewMaxFlingVelocity" /> <java-symbol type="dimen" name="default_app_widget_padding_bottom" /> <java-symbol type="dimen" name="default_app_widget_padding_left" /> <java-symbol type="dimen" name="default_app_widget_padding_right" /> |