is ScrollView Top - Android User Interface

Android examples for User Interface:ScrollView

Description

is ScrollView Top

Demo Code


import android.annotation.SuppressLint;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.WebView;
import android.widget.AbsListView;
import android.widget.AdapterView;
import android.widget.ScrollView;

public class Main{
    private static boolean isScrollViewTop(ScrollView scrollView) {
        if (scrollView != null) {
            int scrollViewY = scrollView.getScrollY();
            return scrollViewY <= 0;
        }/*from w  w  w .  j  a  v a  2s  . co m*/
        return false;
    }
}

Related Tutorials