get GridView Down Scroll - Android User Interface

Android examples for User Interface:GridView

Description

get GridView Down Scroll

Demo Code


//package com.java2s;
import android.widget.GridView;

public class Main {
    public static void getGridViewDownScroll(GridView gv) {
        // int first = gv.getFirstVisiblePosition();
        int last = gv.getLastVisiblePosition();

        int targetPosition = last + 1 - gv.getNumColumns();

        gv.smoothScrollToPositionFromTop(targetPosition, 0);
    }//  ww  w .j  av a  2s  . c  o  m
}

Related Tutorials