is RecyclerView Attach - Android User Interface

Android examples for User Interface:RecyclerView

Description

is RecyclerView Attach

Demo Code


import android.support.v7.widget.RecyclerView;
import android.webkit.WebView;
import android.widget.AbsListView;
import android.widget.ScrollView;

public class Main{
    public static boolean isRecyclerViewAttach(RecyclerView recyclerView) {
        if (recyclerView != null && recyclerView.getChildCount() > 0) {
            if (recyclerView.getChildAt(0).getTop() < 0) {
                return false;
            }/*from  w  w  w. ja v  a2 s  .c  om*/
        }
        return true;
    }
}

Related Tutorials