Java Code Examples for android.support.v7.widget.RecyclerView#isAttachedToWindow()

The following examples show how to use android.support.v7.widget.RecyclerView#isAttachedToWindow() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SwipeItemTouchListener.java    From Tangram-Android with MIT License 5 votes vote down vote up
private static boolean isAttachedToWindow(RecyclerView hostView) {
    if (Build.VERSION.SDK_INT >= 19) {
        return hostView.isAttachedToWindow();
    } else {
        return (hostView.getHandler() != null);
    }
}
 
Example 2
Source File: SwipeItemTouchListener.java    From Tangram-Android with MIT License 5 votes vote down vote up
private static boolean isAttachedToWindow(RecyclerView hostView) {
    if (Build.VERSION.SDK_INT >= 19) {
        return hostView.isAttachedToWindow();
    } else {
        return (hostView.getHandler() != null);
    }
}
 
Example 3
Source File: ClickItemTouchListener.java    From PlayWidget with MIT License 5 votes vote down vote up
private boolean isAttachedToWindow(RecyclerView hostView) {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
        return hostView.isAttachedToWindow();
    } else {
        return (hostView.getHandler() != null);
    }
}
 
Example 4
Source File: ClickItemTouchListener.java    From MultiView with Apache License 2.0 5 votes vote down vote up
private boolean isAttachedToWindow(RecyclerView hostView) {
    if (Build.VERSION.SDK_INT >= 19) {
        return hostView.isAttachedToWindow();
    } else {
        return (hostView.getHandler() != null);
    }
}
 
Example 5
Source File: ClickItemTouchListener.java    From Mover with Apache License 2.0 5 votes vote down vote up
private boolean isAttachedToWindow(RecyclerView hostView) {
    if (Build.VERSION.SDK_INT >= 19) {
        return hostView.isAttachedToWindow();
    } else {
        return (hostView.getHandler() != null);
    }
}
 
Example 6
Source File: ClickItemTouchListener.java    From UpcomingMoviesMVP with Apache License 2.0 5 votes vote down vote up
private boolean isAttachedToWindow(RecyclerView hostView) {
  if (Build.VERSION.SDK_INT >= ANDROID_SDK_19) {
    return hostView.isAttachedToWindow();
  } else {
    return hostView.getHandler() != null;
  }
}
 
Example 7
Source File: ClickItemTouchListener.java    From UltimateAndroid with Apache License 2.0 5 votes vote down vote up
private boolean isAttachedToWindow(RecyclerView hostView) {
    if (Build.VERSION.SDK_INT >= 19) {
        return hostView.isAttachedToWindow();
    } else {
        return (hostView.getHandler() != null);
    }
}