Skip to content

Commit af16b05

Browse files
afohrmanimhappi
authored andcommitted
[Adaptive][Side Sheet] Removed unused methods in SheetDialog and SideSheetDialog.
Also remove the redundant call to supportRequestWindowFeature in SideSheetDialog's constructor. PiperOrigin-RevId: 495715894
1 parent ad3cf5a commit af16b05

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

lib/java/com/google/android/material/sidesheet/SheetDialog.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,6 @@ abstract class SheetDialog<C extends SheetCallback> extends AppCompatDialog {
6161
private boolean canceledOnTouchOutside = true;
6262
private boolean canceledOnTouchOutsideSet;
6363

64-
SheetDialog(@NonNull Context context) {
65-
this(context, 0, 0, 0);
66-
}
67-
6864
SheetDialog(
6965
@NonNull Context context,
7066
@StyleRes int theme,

lib/java/com/google/android/material/sidesheet/SideSheetDialog.java

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121

2222
import android.content.Context;
2323
import android.view.View;
24-
import android.view.Window;
2524
import android.widget.FrameLayout;
2625
import androidx.annotation.IdRes;
2726
import androidx.annotation.LayoutRes;
@@ -40,6 +39,10 @@ public SideSheetDialog(@NonNull Context context) {
4039
this(context, 0);
4140
}
4241

42+
public SideSheetDialog(@NonNull Context context, @StyleRes int theme) {
43+
super(context, theme, SIDE_SHEET_DIALOG_THEME_ATTR, SIDE_SHEET_DIALOG_DEFAULT_THEME_RES);
44+
}
45+
4346
@Override
4447
void addSheetCancelOnHideCallback(
4548
Sheet<SideSheetCallback> behavior) {
@@ -57,13 +60,6 @@ public void onSlide(@NonNull View sheet, float slideOffset) {}
5760
});
5861
}
5962

60-
public SideSheetDialog(@NonNull Context context, @StyleRes int theme) {
61-
super(context, theme, SIDE_SHEET_DIALOG_THEME_ATTR, SIDE_SHEET_DIALOG_DEFAULT_THEME_RES);
62-
// We hide the title bar for any style configuration. Otherwise, there will be a gap
63-
// above the side sheet when it is expanded.
64-
supportRequestWindowFeature(Window.FEATURE_NO_TITLE);
65-
}
66-
6763
@LayoutRes
6864
@Override
6965
int getLayoutResId() {

0 commit comments

Comments
 (0)