Java Code Examples for android.view.View#SCROLLBARS_INSIDE_OVERLAY
The following examples show how to use
android.view.View#SCROLLBARS_INSIDE_OVERLAY .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ContentView.java From android-chromium with BSD 2-Clause "Simplified" License | 6 votes |
protected ContentView(Context context, int nativeWebContents, WindowAndroid windowAndroid, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); if (getScrollBarStyle() == View.SCROLLBARS_INSIDE_OVERLAY) { setHorizontalScrollBarEnabled(false); setVerticalScrollBarEnabled(false); } setFocusable(true); setFocusableInTouchMode(true); mContentViewCore = new ContentViewCore(context); mContentViewCore.initialize(this, this, nativeWebContents, windowAndroid, Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN ? ContentViewCore.INPUT_EVENTS_DELIVERED_AT_VSYNC : ContentViewCore.INPUT_EVENTS_DELIVERED_IMMEDIATELY); }
Example 2
Source File: ContentView.java From android-chromium with BSD 2-Clause "Simplified" License | 6 votes |
protected ContentView(Context context, int nativeWebContents, WindowAndroid windowAndroid, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); if (getScrollBarStyle() == View.SCROLLBARS_INSIDE_OVERLAY) { setHorizontalScrollBarEnabled(false); setVerticalScrollBarEnabled(false); } setFocusable(true); setFocusableInTouchMode(true); mContentViewCore = new ContentViewCore(context); mContentViewCore.initialize(this, this, nativeWebContents, windowAndroid, Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN ? ContentViewCore.INPUT_EVENTS_DELIVERED_AT_VSYNC : ContentViewCore.INPUT_EVENTS_DELIVERED_IMMEDIATELY); }
Example 3
Source File: FastScroller.java From android_9.0.0_r45 with Apache License 2.0 | 5 votes |
/** * Updates the container rectangle used for layout. */ private void updateContainerRect() { final AbsListView list = mList; list.resolvePadding(); final Rect container = mContainerRect; container.left = 0; container.top = 0; container.right = list.getWidth(); container.bottom = list.getHeight(); final int scrollbarStyle = mScrollBarStyle; if (scrollbarStyle == View.SCROLLBARS_INSIDE_INSET || scrollbarStyle == View.SCROLLBARS_INSIDE_OVERLAY) { container.left += list.getPaddingLeft(); container.top += list.getPaddingTop(); container.right -= list.getPaddingRight(); container.bottom -= list.getPaddingBottom(); // In inset mode, we need to adjust for padded scrollbar width. if (scrollbarStyle == View.SCROLLBARS_INSIDE_INSET) { final int width = getWidth(); if (mScrollbarPosition == View.SCROLLBAR_POSITION_RIGHT) { container.right += width; } else { container.left -= width; } } } }
Example 4
Source File: ContentView.java From 365browser with Apache License 2.0 | 5 votes |
/** * Creates an instance of a ContentView. * @param context The Context the view is running in, through which it can * access the current theme, resources, etc. * @param cvc A pointer to the content view core managing this content view. */ ContentView(Context context, ContentViewCore cvc) { super(context, null, android.R.attr.webViewStyle); if (getScrollBarStyle() == View.SCROLLBARS_INSIDE_OVERLAY) { setHorizontalScrollBarEnabled(false); setVerticalScrollBarEnabled(false); } setFocusable(true); setFocusableInTouchMode(true); mContentViewCore = cvc; }
Example 5
Source File: ContentViewCore.java From 365browser with Apache License 2.0 | 5 votes |
/** * @see View#awakenScrollBars(int, boolean) */ @SuppressWarnings("javadoc") public boolean awakenScrollBars(int startDelay, boolean invalidate) { // For the default implementation of ContentView which draws the scrollBars on the native // side, calling this function may get us into a bad state where we keep drawing the // scrollBars, so disable it by always returning false. if (mContainerView.getScrollBarStyle() == View.SCROLLBARS_INSIDE_OVERLAY) { return false; } else { return mContainerViewInternals.super_awakenScrollBars(startDelay, invalidate); } }
Example 6
Source File: AwContents.java From android-chromium with BSD 2-Clause "Simplified" License | 5 votes |
/** * @see View#setScrollBarStyle(int) */ public void setScrollBarStyle(int style) { if (style == View.SCROLLBARS_INSIDE_OVERLAY || style == View.SCROLLBARS_OUTSIDE_OVERLAY) { mOverlayHorizontalScrollbar = mOverlayVerticalScrollbar = true; } else { mOverlayHorizontalScrollbar = mOverlayVerticalScrollbar = false; } }
Example 7
Source File: ContentViewCore.java From android-chromium with BSD 2-Clause "Simplified" License | 5 votes |
/** * @see View#awakenScrollBars(int, boolean) */ @SuppressWarnings("javadoc") public boolean awakenScrollBars(int startDelay, boolean invalidate) { // For the default implementation of ContentView which draws the scrollBars on the native // side, calling this function may get us into a bad state where we keep drawing the // scrollBars, so disable it by always returning false. if (mContainerView.getScrollBarStyle() == View.SCROLLBARS_INSIDE_OVERLAY) { return false; } else { return mContainerViewInternals.super_awakenScrollBars(startDelay, invalidate); } }
Example 8
Source File: AwContents.java From android-chromium with BSD 2-Clause "Simplified" License | 5 votes |
/** * @see View#setScrollBarStyle(int) */ public void setScrollBarStyle(int style) { if (style == View.SCROLLBARS_INSIDE_OVERLAY || style == View.SCROLLBARS_OUTSIDE_OVERLAY) { mOverlayHorizontalScrollbar = mOverlayVerticalScrollbar = true; } else { mOverlayHorizontalScrollbar = mOverlayVerticalScrollbar = false; } }
Example 9
Source File: ContentViewCore.java From android-chromium with BSD 2-Clause "Simplified" License | 5 votes |
/** * @see View#awakenScrollBars(int, boolean) */ @SuppressWarnings("javadoc") public boolean awakenScrollBars(int startDelay, boolean invalidate) { // For the default implementation of ContentView which draws the scrollBars on the native // side, calling this function may get us into a bad state where we keep drawing the // scrollBars, so disable it by always returning false. if (mContainerView.getScrollBarStyle() == View.SCROLLBARS_INSIDE_OVERLAY) { return false; } else { return mContainerViewInternals.super_awakenScrollBars(startDelay, invalidate); } }