@sdcx/bottom-sheet 0.5.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -91,6 +91,11 @@ public class BottomSheet extends ReactViewGroup implements NestedScrollingParent
|
|
|
91
91
|
viewDragHelper = ViewDragHelper.create(this, dragCallback);
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
+
viewDragHelper.abort();
|
|
95
|
+
if (settleRunnable != null && settleRunnable.isPosted) {
|
|
96
|
+
settleRunnable.run();
|
|
97
|
+
}
|
|
98
|
+
|
|
94
99
|
layoutChild();
|
|
95
100
|
}
|
|
96
101
|
|
|
@@ -110,7 +115,7 @@ public class BottomSheet extends ReactViewGroup implements NestedScrollingParent
|
|
|
110
115
|
if (state == COLLAPSED) {
|
|
111
116
|
child.offsetTopAndBottom(collapsedOffset - top);
|
|
112
117
|
} else if (state == EXPANDED) {
|
|
113
|
-
child.offsetTopAndBottom(expandedOffset -top);
|
|
118
|
+
child.offsetTopAndBottom(expandedOffset - top);
|
|
114
119
|
} else if (state == HIDDEN) {
|
|
115
120
|
child.offsetTopAndBottom(getHeight() - top);
|
|
116
121
|
}
|
|
@@ -170,7 +175,8 @@ public class BottomSheet extends ReactViewGroup implements NestedScrollingParent
|
|
|
170
175
|
@VisibleForTesting
|
|
171
176
|
View findScrollingChild(View view) {
|
|
172
177
|
if (ViewCompat.isNestedScrollingEnabled(view)) {
|
|
173
|
-
if (!view.canScrollHorizontally(1) && !view.canScrollHorizontally(-1)
|
|
178
|
+
if (!view.canScrollHorizontally(1) && !view.canScrollHorizontally(-1) &&
|
|
179
|
+
(view.canScrollVertically(-1) || view.canScrollVertically(1))) {
|
|
174
180
|
return view;
|
|
175
181
|
}
|
|
176
182
|
}
|
|
@@ -187,6 +193,7 @@ public class BottomSheet extends ReactViewGroup implements NestedScrollingParent
|
|
|
187
193
|
}
|
|
188
194
|
}
|
|
189
195
|
}
|
|
196
|
+
|
|
190
197
|
return null;
|
|
191
198
|
}
|
|
192
199
|
|
|
@@ -252,7 +259,7 @@ public class BottomSheet extends ReactViewGroup implements NestedScrollingParent
|
|
|
252
259
|
// it is not the top most view of its parent. This is not necessary when the touch event is
|
|
253
260
|
// happening over the scrolling content as nested scrolling logic handles that case.
|
|
254
261
|
View scroll = nestedScrollingChildRef != null ? nestedScrollingChildRef.get() : null;
|
|
255
|
-
return
|
|
262
|
+
return action == MotionEvent.ACTION_MOVE
|
|
256
263
|
&& scroll != null
|
|
257
264
|
&& !ignoreEvents
|
|
258
265
|
&& state != DRAGGING
|