aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java/ml/docilealligator/infinityforreddit/customviews/LandscapeExpandedRoundedBottomSheetDialogFragment.java
blob: 9100ac16d8e38b8cb377da178c31cd42a10b1d92 (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.deishelon.roundedbottomsheet.RoundedBottomSheetDialogFragment;
import com.google.android.material.bottomsheet.BottomSheetBehavior;

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