diff --git a/catalog/java/io/material/catalog/sidesheet/res/layout/cat_sidesheet_fragment.xml b/catalog/java/io/material/catalog/sidesheet/res/layout/cat_sidesheet_fragment.xml index c9d6e62e4..a63b85aef 100644 --- a/catalog/java/io/material/catalog/sidesheet/res/layout/cat_sidesheet_fragment.xml +++ b/catalog/java/io/material/catalog/sidesheet/res/layout/cat_sidesheet_fragment.xml @@ -83,7 +83,6 @@ style="@style/Widget.Material3.SideSheet" android:layout_width="256dp" android:layout_height="match_parent" - android:layout_gravity="end" android:orientation="vertical" app:layout_behavior="@string/side_sheet_behavior" tools:targetApi="lollipop"> @@ -95,7 +94,6 @@ style="@style/Widget.Material3.SideSheet" android:layout_width="256dp" android:layout_height="match_parent" - android:layout_gravity="end" android:orientation="vertical" app:layout_behavior="@string/side_sheet_behavior" tools:targetApi="lollipop"> @@ -107,7 +105,6 @@ style="@style/Widget.Material3.SideSheet" android:layout_width="256dp" android:layout_height="match_parent" - android:layout_gravity="end" android:orientation="vertical" app:coplanarSiblingViewId="@id/nested_scroll_view" app:layout_behavior="@string/side_sheet_behavior" diff --git a/lib/java/com/google/android/material/sidesheet/SideSheetBehavior.java b/lib/java/com/google/android/material/sidesheet/SideSheetBehavior.java index 57e5b326c..acf274dae 100644 --- a/lib/java/com/google/android/material/sidesheet/SideSheetBehavior.java +++ b/lib/java/com/google/android/material/sidesheet/SideSheetBehavior.java @@ -50,7 +50,6 @@ import androidx.core.view.accessibility.AccessibilityNodeInfoCompat.Accessibilit import androidx.core.view.accessibility.AccessibilityViewCommand; import androidx.customview.view.AbsSavedState; import androidx.customview.widget.ViewDragHelper; -import com.google.android.material.internal.ViewUtils; import com.google.android.material.resources.MaterialResources; import com.google.android.material.shape.MaterialShapeDrawable; import com.google.android.material.shape.ShapeAppearanceModel; @@ -343,11 +342,7 @@ public class SideSheetBehavior extends CoordinatorLayout.Behavio switch (state) { case STATE_EXPANDED: - // TODO (b/261619910): This is a workaround for a bug where the expanded offset was getting - // recalculated if onLayoutChild() was called while the sheet was in the process of - // expanding/offsetting. Revisit this and refactor if necessary when adding left based - // sheets. - currentOffset = ViewUtils.isLayoutRtl(child) ? getExpandedOffset() : 0; + currentOffset = 0; break; case STATE_DRAGGING: case STATE_SETTLING: diff --git a/lib/java/com/google/android/material/sidesheet/res/layout/m3_side_sheet_dialog.xml b/lib/java/com/google/android/material/sidesheet/res/layout/m3_side_sheet_dialog.xml index 319bf7415..e20c55dc4 100644 --- a/lib/java/com/google/android/material/sidesheet/res/layout/m3_side_sheet_dialog.xml +++ b/lib/java/com/google/android/material/sidesheet/res/layout/m3_side_sheet_dialog.xml @@ -43,7 +43,6 @@ style="?attr/sideSheetModalStyle" android:layout_width="@dimen/m3_side_sheet_width" android:layout_height="match_parent" - android:layout_gravity="end" app:layout_behavior="@string/side_sheet_behavior"/> diff --git a/lib/java/com/google/android/material/sidesheet/res/values/styles.xml b/lib/java/com/google/android/material/sidesheet/res/values/styles.xml index 7aa4ecf7c..2b2e2c2f8 100644 --- a/lib/java/com/google/android/material/sidesheet/res/values/styles.xml +++ b/lib/java/com/google/android/material/sidesheet/res/values/styles.xml @@ -24,7 +24,7 @@ set layout_* attributes from this style, because this style always needs to be explicitly set on the behavior's associated View in the layout. --> - end + right @dimen/m3_side_sheet_standard_elevation