diff options
author | Mindy Pereira <mindyp@google.com> | 2014-05-01 20:40:08 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-05-01 20:40:08 +0000 |
commit | ed7e36dc2ef400916356459f9ea67d66645a85fb (patch) | |
tree | 9beb98e8356b47781f4ce50f04c81ffc017ad4e6 /core | |
parent | 437994578272f9770748b152c53ec655059d19ec (diff) | |
parent | d5e92318b69d8af6d91dc3b51738913595e0f536 (diff) | |
download | frameworks_base-ed7e36dc2ef400916356459f9ea67d66645a85fb.zip frameworks_base-ed7e36dc2ef400916356459f9ea67d66645a85fb.tar.gz frameworks_base-ed7e36dc2ef400916356459f9ea67d66645a85fb.tar.bz2 |
am d5e92318: Merge "Update fling min velocity" into klp-modular-dev
* commit 'd5e92318b69d8af6d91dc3b51738913595e0f536':
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 e67659c..7417abb 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 cafa0a5..602c4f6 100644 --- a/core/res/res/values/config.xml +++ b/core/res/res/values/config.xml @@ -1185,6 +1185,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 bb82357..9899829 100644 --- a/core/res/res/values/symbols.xml +++ b/core/res/res/values/symbols.xml @@ -326,6 +326,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" /> |