ScrollView getMaxScrollAmount - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for ScrollView getMaxScrollAmount method.

This code example shows how to use the following methods:getHeight, getScrollY, isFocused, offsetDescendantRectToMyCoords, getMaxScrollAmount
 
    private Rect mTempRect = new Rect();
 
    private int getTopWithinScrollView(View descendant) {
        descendant.getDrawingRect(mTempRect);
        mScrollView.offsetDescendantRectToMyCoords(descendant, mTempRect);
        return mTempRect.top;
    } 
 
    private int getBottomWithinScrollView(View descendant) {
        descendant.getDrawingRect(mTempRect);
        mScrollView.offsetDescendantRectToMyCoords(descendant, mTempRect);
        return mTempRect.bottom;
    } 
 
    @MediumTest 
    public void testPreconditions() { 
        assertTrue("top button should be shorter than max scroll amount",
                mTopButton.getHeight() <
                mScrollView.getMaxScrollAmount());

6
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
getMaxScrollAmount Method Overview
See Code Examples for other Android ScrollView Methods: