aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java/ml/docilealligator/infinityforreddit/customviews/LandscapeExpandedBottomSheetDialogFragment.java
blob: 0cc4ef71f98493b9a7be755c39e280a7d492665c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
package ml.docilealligator.infinityforreddit.customviews;

import android.view.View;

import com.google.android.material.bottomsheet.BottomSheetBehavior;
import com.google.android.material.bottomsheet.BottomSheetDialogFragment;

public class LandscapeExpandedBottomSheetDialogFragment extends BottomSheetDialogFragment {
    @Override
    public void onStart() {
        super.onStart();
        View parentView = (View) requireView().getParent();
        BottomSheetBehavior.from(parentView).setState(BottomSheetBehavior.STATE_EXPANDED);
        BottomSheetBehavior.from(parentView).setSkipCollapsed(true);
    }
}