get HorizontalScrollView Scroll - Android User Interface

Android examples for User Interface:ScrollView

Description

get HorizontalScrollView Scroll

Demo Code


//package com.java2s;

import android.widget.HorizontalScrollView;

import android.widget.ScrollView;

public class Main {

    public static void getH_ScrollViewScroll(ScrollView scrollView,
            int offsetByY) {
        scrollView.smoothScrollBy(offsetByY, 0);
    }//from  w w  w  . j  a v a  2 s  . c  o m

    public static void getH_ScrollViewScroll(
            HorizontalScrollView horizontalScrollView, int offsetByX) {
        horizontalScrollView.smoothScrollBy(offsetByX, 0);
    }
}

Related Tutorials