- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {StringBuilder s =
new StringBuilder()
new StringBuilder(32)
String str;new StringBuilder(str)
- Smart code suggestions by Codota
}
private void scrollToItemHorizontal(int item, boolean smoothScroll, int velocity, boolean dispatchSelected) { final ItemInfo curInfo = infoForPosition(item); int destX = 0; if (curInfo != null) { final int width = getClientWidth(); destX = (int) (width * Math.max(mFirstOffset, Math.min(curInfo.offset, mLastOffset))); } if (smoothScroll) { smoothScrollToHorizontal(destX, 0, velocity); if (dispatchSelected) { dispatchOnPageSelected(item); } } else { if (dispatchSelected) { dispatchOnPageSelected(item); } completeScrollHorizontal(false); scrollTo(destX, 0); pageScrolledHorizontal(destX); } }
private void scrollToItemVertical(int item, boolean smoothScroll, int velocity, boolean dispatchSelected) { final ItemInfo curInfo = infoForPosition(item); int destY = 0; if (curInfo != null) { final int height = getClientHeight(); destY = (int) (height * Math.max(mFirstOffset, Math.min(curInfo.offset, mLastOffset))); mDestY = destY; } if (smoothScroll) { smoothScrollToVertical(0, destY, velocity); if (dispatchSelected) { dispatchOnPageSelected(item); } } else { if (dispatchSelected) { dispatchOnPageSelected(item); } completeScrollVertical(false); scrollTo(0, destY); pageScrolledVertical(destY); } }