Skip to content

Commit

Permalink
fix(camera): Android dialog not fully showing when in landscape (#2276)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexgerardojacinto authored Dec 10, 2024
1 parent f2be036 commit 123193b
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,12 @@ public void setupDialog(Dialog dialog, int style) {
dialog.setContentView(parentLayout.getRootView());

CoordinatorLayout.LayoutParams params = (CoordinatorLayout.LayoutParams) ((View) parentLayout.getParent()).getLayoutParams();
CoordinatorLayout.Behavior behavior = params.getBehavior();
CoordinatorLayout.Behavior<View> behavior = params.getBehavior();

if (behavior != null && behavior instanceof BottomSheetBehavior) {
((BottomSheetBehavior) behavior).addBottomSheetCallback(mBottomSheetBehaviorCallback);
if (behavior instanceof BottomSheetBehavior) {
BottomSheetBehavior<View> bottomSheetBehavior = (BottomSheetBehavior<View>) behavior;
bottomSheetBehavior.addBottomSheetCallback(mBottomSheetBehaviorCallback);
bottomSheetBehavior.setState(BottomSheetBehavior.STATE_EXPANDED);
}
}
}

0 comments on commit 123193b

Please sign in to comment.