package android.view;
+import android.annotation.SystemApi;
import android.app.AppGlobals;
import android.content.Context;
import android.content.res.Configuration;
private static final int OVERFLING_DISTANCE = 6;
/**
+ * Amount to scroll in response to a {@link MotionEvent#ACTION_SCROLL} event, in dips per
+ * axis value.
+ */
+ private static final int SCROLL_FACTOR = 64;
+
+ /**
* Default duration to hide an action mode for.
*/
private static final long ACTION_MODE_HIDE_DURATION_DEFAULT = 2000;
private final int mOverflingDistance;
private final boolean mFadingMarqueeEnabled;
private final long mGlobalActionsKeyTimeout;
+ private final int mScrollFactor;
private boolean sHasPermanentMenuKey;
private boolean sHasPermanentMenuKeySet;
mOverflingDistance = OVERFLING_DISTANCE;
mFadingMarqueeEnabled = true;
mGlobalActionsKeyTimeout = GLOBAL_ACTIONS_KEY_TIMEOUT;
+ mScrollFactor = SCROLL_FACTOR;
}
/**
com.android.internal.R.dimen.config_viewMaxFlingVelocity);
mGlobalActionsKeyTimeout = res.getInteger(
com.android.internal.R.integer.config_globalActionsKeyTimeout);
+ mScrollFactor = res.getDimensionPixelSize(
+ com.android.internal.R.dimen.config_scrollFactor);
}
/**
}
/**
+ * @return Amount to scroll in response to a {@link MotionEvent#ACTION_SCROLL} event. Multiply
+ * this by the event's axis value to obtain the number of pixels to be scrolled.
+ * @hide
+ * @SystemApi
+ */
+ public int getScaledScrollFactor() {
+ return mScrollFactor;
+ }
+
+ /**
* The maximum drawing cache size expressed in bytes.
*
* @return the maximum size of View's drawing cache expressed in bytes
<!-- Amount of time in ms the user needs to press the relevant key to bring up the global actions dialog -->
<integer name="config_globalActionsKeyTimeout">500</integer>
+ <!-- Distance that should be scrolled in response to a {@link MotionEvent#ACTION_SCROLL event}
+ with an axis value of 1. -->
+ <dimen name="config_scrollFactor">64dp</dimen>
+
<!-- Maximum number of grid columns permitted in the ResolverActivity
used for picking activities to handle an intent. -->
<integer name="config_maxResolverActivityColumns">3</integer>
<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="config_scrollFactor" />
<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" />