File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
core/app/src/main/java/com/itsaky/androidide/fragments/sheets Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 2020import android .app .Dialog ;
2121import android .os .Bundle ;
2222import androidx .annotation .NonNull ;
23+ import com .google .android .material .bottomsheet .BottomSheetBehavior ;
24+ import com .google .android .material .bottomsheet .BottomSheetDialog ;
2325import com .google .android .material .bottomsheet .BottomSheetDialogFragment ;
2426
2527public abstract class BaseBottomSheetFragment extends BottomSheetDialogFragment {
@@ -30,6 +32,10 @@ public abstract class BaseBottomSheetFragment extends BottomSheetDialogFragment
3032 @ Override
3133 public Dialog onCreateDialog (Bundle savedInstanceState ) {
3234 mDialog = super .onCreateDialog (savedInstanceState );
35+
36+ var behavior = ((BottomSheetDialog ) mDialog ).getBehavior ();
37+ behavior .setPeekHeight (BottomSheetBehavior .PEEK_HEIGHT_AUTO );
38+ behavior .setState (BottomSheetBehavior .STATE_EXPANDED );
3339 return mDialog ;
3440 }
3541
You can’t perform that action at this time.
0 commit comments