Java Code Examples for android.view.View#SCROLLBAR_POSITION_RIGHT
The following examples show how to use
android.view.View#SCROLLBAR_POSITION_RIGHT .
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: 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 2
Source File: AbsListViewDelegate.java From KlyphMessenger with MIT License | 5 votes |
@Override public boolean isReadyForPull(View view, final float x, final float y) { boolean ready = false; // First we check whether we're scrolled to the top AbsListView absListView = (AbsListView) view; if (absListView.getCount() == 0) { ready = true; } else if (absListView.getFirstVisiblePosition() == 0) { final View firstVisibleChild = absListView.getChildAt(0); ready = firstVisibleChild != null && firstVisibleChild.getTop() >= 0; } // Then we have to check whether the fas scroller is enabled, and check we're not starting // the gesture from the scroller if (ready && absListView.isFastScrollEnabled() && isFastScrollAlwaysVisible(absListView)) { switch (getVerticalScrollbarPosition(absListView)) { case View.SCROLLBAR_POSITION_RIGHT: ready = x < absListView.getRight() - absListView.getVerticalScrollbarWidth(); break; case View.SCROLLBAR_POSITION_LEFT: ready = x > absListView.getVerticalScrollbarWidth(); break; } } return ready; }
Example 3
Source File: ViewPagerDelegate.java From rss with GNU General Public License v3.0 | 5 votes |
@Override public boolean isReadyForPull(View view, float x, float y) { boolean ready = false; /* First we check whether we're scrolled to the top of current page. */ if(null != s_fragmentFeeds) { AbsListView absListView = getCurrentTagListView(); if(0 == absListView.getCount()) { ready = true; } else if(0 == absListView.getFirstVisiblePosition()) { View firstVisibleChild = absListView.getChildAt(0); ready = null != firstVisibleChild && 0 <= firstVisibleChild.getTop(); } if(ready && absListView.isFastScrollEnabled() && absListView.isFastScrollAlwaysVisible()) { switch(absListView.getVerticalScrollbarPosition()) { case View.SCROLLBAR_POSITION_LEFT: return x > absListView.getVerticalScrollbarWidth(); case View.SCROLLBAR_POSITION_RIGHT: return x < absListView.getRight() - absListView.getVerticalScrollbarWidth(); } } } return ready; }
Example 4
Source File: AbsListViewDelegate.java From Klyph with MIT License | 5 votes |
@Override public boolean isReadyForPull(View view, final float x, final float y) { boolean ready = false; // First we check whether we're scrolled to the top AbsListView absListView = (AbsListView) view; if (absListView.getCount() == 0) { ready = true; } else if (absListView.getFirstVisiblePosition() == 0) { final View firstVisibleChild = absListView.getChildAt(0); ready = firstVisibleChild != null && firstVisibleChild.getTop() >= 0; } // Then we have to check whether the fas scroller is enabled, and check we're not starting // the gesture from the scroller if (ready && absListView.isFastScrollEnabled() && isFastScrollAlwaysVisible(absListView)) { switch (getVerticalScrollbarPosition(absListView)) { case View.SCROLLBAR_POSITION_RIGHT: ready = x < absListView.getRight() - absListView.getVerticalScrollbarWidth(); break; case View.SCROLLBAR_POSITION_LEFT: ready = x > absListView.getVerticalScrollbarWidth(); break; } } return ready; }
Example 5
Source File: AbsListViewDelegate.java From Bitocle with Apache License 2.0 | 5 votes |
@Override public boolean isReadyForPull(View view, final float x, final float y) { boolean ready = false; // First we check whether we're scrolled to the top AbsListView absListView = (AbsListView) view; if (absListView.getCount() == 0) { ready = true; } else if (absListView.getFirstVisiblePosition() == 0) { final View firstVisibleChild = absListView.getChildAt(0); ready = firstVisibleChild != null && firstVisibleChild.getTop() >= absListView.getPaddingTop(); } // Then we have to check whether the fas scroller is enabled, and check we're not starting // the gesture from the scroller if (ready && absListView.isFastScrollEnabled() && isFastScrollAlwaysVisible(absListView)) { switch (getVerticalScrollbarPosition(absListView)) { case View.SCROLLBAR_POSITION_RIGHT: ready = x < absListView.getRight() - absListView.getVerticalScrollbarWidth(); break; case View.SCROLLBAR_POSITION_LEFT: ready = x > absListView.getVerticalScrollbarWidth(); break; } } return ready; }
Example 6
Source File: AbsListViewDelegate.java From Bitocle with Apache License 2.0 | 5 votes |
@Override public boolean isReadyForPull(View view, final float x, final float y) { boolean ready = false; // First we check whether we're scrolled to the top AbsListView absListView = (AbsListView) view; if (absListView.getCount() == 0) { ready = true; } else if (absListView.getFirstVisiblePosition() == 0) { final View firstVisibleChild = absListView.getChildAt(0); ready = firstVisibleChild != null && firstVisibleChild.getTop() >= absListView.getPaddingTop(); } // Then we have to check whether the fas scroller is enabled, and check we're not starting // the gesture from the scroller if (ready && absListView.isFastScrollEnabled() && isFastScrollAlwaysVisible(absListView)) { switch (getVerticalScrollbarPosition(absListView)) { case View.SCROLLBAR_POSITION_RIGHT: ready = x < absListView.getRight() - absListView.getVerticalScrollbarWidth(); break; case View.SCROLLBAR_POSITION_LEFT: ready = x > absListView.getVerticalScrollbarWidth(); break; } } return ready; }
Example 7
Source File: AbsListViewDelegate.java From Bitocle with Apache License 2.0 | 5 votes |
@Override public boolean isReadyForPull(View view, final float x, final float y) { boolean ready = false; // First we check whether we're scrolled to the top AbsListView absListView = (AbsListView) view; if (absListView.getCount() == 0) { ready = true; } else if (absListView.getFirstVisiblePosition() == 0) { final View firstVisibleChild = absListView.getChildAt(0); ready = firstVisibleChild != null && firstVisibleChild.getTop() >= absListView.getPaddingTop(); } // Then we have to check whether the fas scroller is enabled, and check we're not starting // the gesture from the scroller if (ready && absListView.isFastScrollEnabled() && isFastScrollAlwaysVisible(absListView)) { switch (getVerticalScrollbarPosition(absListView)) { case View.SCROLLBAR_POSITION_RIGHT: ready = x < absListView.getRight() - absListView.getVerticalScrollbarWidth(); break; case View.SCROLLBAR_POSITION_LEFT: ready = x > absListView.getVerticalScrollbarWidth(); break; } } return ready; }
Example 8
Source File: AbsListViewDelegate.java From ALLGO with Apache License 2.0 | 5 votes |
@Override public boolean isReadyForPull(View view, final float x, final float y) { boolean ready = false; // First we check whether we're scrolled to the top AbsListView absListView = (AbsListView) view; if (absListView.getCount() == 0) { ready = true; } else if (absListView.getFirstVisiblePosition() == 0) { final View firstVisibleChild = absListView.getChildAt(0); ready = firstVisibleChild != null && firstVisibleChild.getTop() >= 0; } // Then we have to check whether the fas scroller is enabled, and check we're not starting // the gesture from the scroller if (ready && absListView.isFastScrollEnabled() && isFastScrollAlwaysVisible(absListView)) { switch (getVerticalScrollbarPosition(absListView)) { case View.SCROLLBAR_POSITION_RIGHT: ready = x < absListView.getRight() - absListView.getVerticalScrollbarWidth(); break; case View.SCROLLBAR_POSITION_LEFT: ready = x > absListView.getVerticalScrollbarWidth(); break; } } return ready; }
Example 9
Source File: AbsListViewDelegate.java From AndroidPullMenu with Apache License 2.0 | 5 votes |
@Override public boolean isReadyForPull(View view, final float x, final float y) { boolean ready = false; // First we check whether we're scrolled to the top AbsListView absListView = (AbsListView) view; if (absListView.getCount() == 0) { ready = true; } else if (absListView.getFirstVisiblePosition() == 0) { final View firstVisibleChild = absListView.getChildAt(0); ready = firstVisibleChild != null && firstVisibleChild.getTop() >= absListView.getPaddingTop(); } // Then we have to check whether the fas scroller is enabled, and check we're not starting // the gesture from the scroller if (ready && absListView.isFastScrollEnabled() && isFastScrollAlwaysVisible(absListView)) { switch (getVerticalScrollbarPosition(absListView)) { case View.SCROLLBAR_POSITION_RIGHT: ready = x < absListView.getRight() - absListView.getVerticalScrollbarWidth(); break; case View.SCROLLBAR_POSITION_LEFT: ready = x > absListView.getVerticalScrollbarWidth(); break; } } return ready; }
Example 10
Source File: FastScroller.java From android_9.0.0_r45 with Apache License 2.0 | 5 votes |
public void setScrollbarPosition(int position) { if (position == View.SCROLLBAR_POSITION_DEFAULT) { position = mList.isLayoutRtl() ? View.SCROLLBAR_POSITION_LEFT : View.SCROLLBAR_POSITION_RIGHT; } if (mScrollbarPosition != position) { mScrollbarPosition = position; mLayoutFromRight = position != View.SCROLLBAR_POSITION_LEFT; final int previewResId = mPreviewResId[mLayoutFromRight ? PREVIEW_RIGHT : PREVIEW_LEFT]; mPreviewImage.setBackgroundResource(previewResId); // Propagate padding to text min width/height. final int textMinWidth = Math.max(0, mPreviewMinWidth - mPreviewImage.getPaddingLeft() - mPreviewImage.getPaddingRight()); mPrimaryText.setMinimumWidth(textMinWidth); mSecondaryText.setMinimumWidth(textMinWidth); final int textMinHeight = Math.max(0, mPreviewMinHeight - mPreviewImage.getPaddingTop() - mPreviewImage.getPaddingBottom()); mPrimaryText.setMinimumHeight(textMinHeight); mSecondaryText.setMinimumHeight(textMinHeight); // Requires re-layout. updateLayout(); } }
Example 11
Source File: AbsListViewDelegate.java From Bitocle with Apache License 2.0 | 4 votes |
static int getVerticalScrollbarPosition(AbsListView absListView) { return View.SCROLLBAR_POSITION_RIGHT; }
Example 12
Source File: AbsListViewDelegate.java From ALLGO with Apache License 2.0 | 4 votes |
static int getVerticalScrollbarPosition(AbsListView absListView) { return View.SCROLLBAR_POSITION_RIGHT; }
Example 13
Source File: AbsListViewDelegate.java From Bitocle with Apache License 2.0 | 4 votes |
static int getVerticalScrollbarPosition(AbsListView absListView) { return View.SCROLLBAR_POSITION_RIGHT; }
Example 14
Source File: AbsListViewDelegate.java From Bitocle with Apache License 2.0 | 4 votes |
static int getVerticalScrollbarPosition(AbsListView absListView) { return View.SCROLLBAR_POSITION_RIGHT; }
Example 15
Source File: AbsListViewDelegate.java From AndroidPullMenu with Apache License 2.0 | 4 votes |
static int getVerticalScrollbarPosition(AbsListView absListView) { return View.SCROLLBAR_POSITION_RIGHT; }
Example 16
Source File: AbsListViewDelegate.java From Klyph with MIT License | 4 votes |
static int getVerticalScrollbarPosition(AbsListView absListView) { return View.SCROLLBAR_POSITION_RIGHT; }
Example 17
Source File: AbsListViewDelegate.java From KlyphMessenger with MIT License | 4 votes |
static int getVerticalScrollbarPosition(AbsListView absListView) { return View.SCROLLBAR_POSITION_RIGHT; }