Skip to content

Commit 06a15b4

Browse files
authored
Merge pull request #415 from vallemar/master
fix(BottomSheet): Back to blade motion is fluid
2 parents 0aa90d4 + 0232029 commit 06a15b4

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

packages/bottomsheet/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ export interface BottomSheetOptions {
7474
//(iOS only) A Boolean value that controls whether the height of the keyboard should affect the bottom sheet's frame when the keyboard shows on the screen. (Default: true)
7575
onChangeState?: onChangeStateBottomSheet;
7676
// One works to be called on the scroll of the sheet. Parameters: state (CLOSED, DRAGGING, DRAGGING, COLLAPSED) and slideOffset is the new offset of this bottom sheet within [-1,1] range. Offset increases as this bottom sheet is moving upward. From 0 to 1 the sheet is between collapsed and expanded states and from -1 to 0 it is between hidden and collapsed states.
77+
canTouchBehind?: boolean //(Android only) allows to interact with the screen behind the sheet. For it to work properly need dismissOnBackgroundTap set to true.
7778
}
7879
```
7980

src/bottomsheet/bottomsheet.android.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,8 @@ export class ViewWithBottomSheet extends ViewWithBottomSheetBase {
198198
}
199199

200200
if (bottomSheetOptions.options.canTouchBehind) {
201+
// necessary for smooth movement of the back page
202+
fragment.getDialog().getWindow().setFlags(android.view.WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE, android.view.WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE);
201203
const coordinator = view.getParent();
202204
if (coordinator instanceof android.view.View) {
203205
coordinator.findViewById(getId('touch_outside')).setOnTouchListener(

0 commit comments

Comments
 (0)