|
@@ -1,12 +1,16 @@
|
1
|
1
|
package com.reactnativenavigation.utils;
|
2
|
2
|
|
|
3
|
+import android.support.annotation.Nullable;
|
3
|
4
|
import android.view.View;
|
4
|
5
|
|
5
|
6
|
import com.reactnativenavigation.views.ContentView;
|
6
|
7
|
|
7
|
8
|
public class ViewVisibilityChecker {
|
8
|
9
|
|
9
|
|
- public static boolean check(View view) {
|
|
10
|
+ public static boolean check(@Nullable View view) {
|
|
11
|
+ if (view == null) {
|
|
12
|
+ return false;
|
|
13
|
+ }
|
10
|
14
|
final int top = getTopRelativeToContentView(view);
|
11
|
15
|
final int scrollYInScreen = getScrollYInScreen(view);
|
12
|
16
|
return top + view.getHeight() > scrollYInScreen;
|