use of android.widget.OverScroller in project android_frameworks_base by ParanoidAndroid.
the class WebViewClassic method init.
/**
* See {@link WebViewProvider#init(Map, boolean)}
*/
@Override
public void init(Map<String, Object> javaScriptInterfaces, boolean privateBrowsing) {
Context context = mContext;
// Used by the chrome stack to find application paths
JniUtil.setContext(context);
mCallbackProxy = new CallbackProxy(context, this);
mViewManager = new ViewManager(this);
L10nUtils.setApplicationContext(context.getApplicationContext());
mWebViewCore = new WebViewCore(context, this, mCallbackProxy, javaScriptInterfaces);
mDatabase = WebViewDatabaseClassic.getInstance(context);
//TODO Use OverScroller's flywheel
mScroller = new OverScroller(context, null, 0, 0, false);
mZoomManager = new ZoomManager(this, mCallbackProxy);
/* The init method must follow the creation of certain member variables,
* such as the mZoomManager.
*/
init();
setupPackageListener(context);
setupProxyListener(context);
setupTrustStorageListener(context);
updateMultiTouchSupport(context);
if (privateBrowsing) {
startPrivateBrowsing();
}
mAutoFillData = new WebViewCore.AutoFillData();
mEditTextScroller = new Scroller(context);
// Calculate channel distance
calculateChannelDistance(context);
}
use of android.widget.OverScroller in project platform_frameworks_base by android.
the class NotificationStackScrollLayout method initView.
private void initView(Context context) {
mScroller = new OverScroller(getContext());
setDescendantFocusability(FOCUS_AFTER_DESCENDANTS);
setClipChildren(false);
final ViewConfiguration configuration = ViewConfiguration.get(context);
mTouchSlop = configuration.getScaledTouchSlop();
mMinimumVelocity = configuration.getScaledMinimumFlingVelocity();
mMaximumVelocity = configuration.getScaledMaximumFlingVelocity();
mOverflingDistance = configuration.getScaledOverflingDistance();
mCollapsedSize = context.getResources().getDimensionPixelSize(R.dimen.notification_min_height);
mBottomStackPeekSize = context.getResources().getDimensionPixelSize(R.dimen.bottom_stack_peek_amount);
mStackScrollAlgorithm.initView(context);
mPaddingBetweenElements = Math.max(1, context.getResources().getDimensionPixelSize(R.dimen.notification_divider_height));
mIncreasedPaddingBetweenElements = context.getResources().getDimensionPixelSize(R.dimen.notification_divider_height_increased);
mBottomStackSlowDownHeight = mStackScrollAlgorithm.getBottomStackSlowDownLength();
mMinTopOverScrollToEscape = getResources().getDimensionPixelSize(R.dimen.min_top_overscroll_to_qs);
}
use of android.widget.OverScroller in project platform_frameworks_base by android.
the class SystemGesturesPointerEventListener method systemReady.
public void systemReady() {
Handler h = new Handler(Looper.myLooper());
mGestureDetector = new GestureDetector(mContext, new FlingGestureDetector(), h);
mOverscroller = new OverScroller(mContext);
}
use of android.widget.OverScroller in project android_frameworks_base by DirtyUnicorns.
the class ActionBarOverlayLayout method init.
private void init(Context context) {
TypedArray ta = getContext().getTheme().obtainStyledAttributes(ATTRS);
mActionBarHeight = ta.getDimensionPixelSize(0, 0);
mWindowContentOverlay = ta.getDrawable(1);
setWillNotDraw(mWindowContentOverlay == null);
ta.recycle();
mIgnoreWindowContentOverlay = context.getApplicationInfo().targetSdkVersion < Build.VERSION_CODES.KITKAT;
mFlingEstimator = new OverScroller(context);
}
use of android.widget.OverScroller in project android_frameworks_base by AOSPA.
the class ActionBarOverlayLayout method init.
private void init(Context context) {
TypedArray ta = getContext().getTheme().obtainStyledAttributes(ATTRS);
mActionBarHeight = ta.getDimensionPixelSize(0, 0);
mWindowContentOverlay = ta.getDrawable(1);
setWillNotDraw(mWindowContentOverlay == null);
ta.recycle();
mIgnoreWindowContentOverlay = context.getApplicationInfo().targetSdkVersion < Build.VERSION_CODES.KITKAT;
mFlingEstimator = new OverScroller(context);
}
Aggregations