Skip to content

Commit

Permalink
[Catalog] Applied edge-to-edge to preferences bottom sheet
Browse files Browse the repository at this point in the history
Resolves #3123
Resolves #3122

GIT_ORIGIN_REV_ID=fd094876551f8106c5cc57c46f2b3c6ffa3a7113
PiperOrigin-RevId: 492262956
  • Loading branch information
manabu-nakamura authored and leticiarossi committed Dec 1, 2022
1 parent b384b9b commit 695fb4a
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import io.material.catalog.R;

import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.util.SparseIntArray;
Expand All @@ -37,6 +38,7 @@
import dagger.android.HasAndroidInjector;
import dagger.android.support.AndroidSupportInjection;
import io.material.catalog.preferences.CatalogPreference.Option;
import io.material.catalog.windowpreferences.WindowPreferencesManager;
import javax.inject.Inject;

/**
Expand All @@ -51,6 +53,14 @@ public class CatalogPreferencesDialogFragment extends BottomSheetDialogFragment

private final SparseIntArray buttonIdToOptionId = new SparseIntArray();

@NonNull
@Override
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
Dialog dialog = super.onCreateDialog(savedInstanceState);
new WindowPreferencesManager(requireContext()).applyEdgeToEdgePreference(dialog.getWindow());
return dialog;
}

@Override
public void onAttach(Context context) {
AndroidSupportInjection.inject(this);
Expand Down

0 comments on commit 695fb4a

Please sign in to comment.