@@ -42,20 +42,20 @@
?attr/shapeAppearanceCornerMedium
1dp
- ?attr/colorOutline
+ ?attr/colorOutlineVariant
24dp
?attr/colorOutline
- 0.12
- ?attr/colorOutline
+ ?attr/colorOutlineVariant
?attr/colorOnSurface
- ?attr/colorOutline
+ ?attr/colorOutlineVariant
- ?attr/colorOutline
+ ?attr/colorOutlineVariant
diff --git a/material/java/com/google/android/material/carousel/CarouselAccessibilityDelegate.java b/material/java/com/google/android/material/carousel/CarouselAccessibilityDelegate.java
new file mode 100644
index 000000000..59f3385b3
--- /dev/null
+++ b/material/java/com/google/android/material/carousel/CarouselAccessibilityDelegate.java
@@ -0,0 +1,55 @@
+/*
+ * Copyright 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.android.material.carousel;
+
+import android.graphics.Rect;
+import androidx.recyclerview.widget.RecyclerView;
+import androidx.recyclerview.widget.RecyclerViewAccessibilityDelegate;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.accessibility.AccessibilityEvent;
+import androidx.annotation.NonNull;
+
+/** A class that handles accessibility for CarouselLayoutManager. */
+final class CarouselAccessibilityDelegate extends RecyclerViewAccessibilityDelegate {
+
+ public CarouselAccessibilityDelegate(@NonNull RecyclerView recyclerView) {
+ super(recyclerView);
+ }
+
+ @Override
+ public boolean onRequestSendAccessibilityEvent(
+ @NonNull ViewGroup host, @NonNull View child, @NonNull AccessibilityEvent event) {
+ switch (event.getEventType()) {
+ // Allow every child in the carousel an opportunity to bring itself into the focal range
+ // when focused by accessibility.
+ case AccessibilityEvent.TYPE_VIEW_ACCESSIBILITY_FOCUSED:
+ RecyclerView rv = (RecyclerView) host;
+ Rect rect = new Rect(0, 0, child.getWidth(), child.getHeight());
+ rv.getLayoutManager()
+ .requestChildRectangleOnScreen(
+ (RecyclerView) host,
+ child,
+ rect,
+ /* immediate= */ true,
+ /* focusedChildVisible= */ false);
+ return true;
+ default:
+ return super.onRequestSendAccessibilityEvent(host, child, event);
+ }
+ }
+}
diff --git a/material/java/com/google/android/material/carousel/CarouselLayoutManager.java b/material/java/com/google/android/material/carousel/CarouselLayoutManager.java
index b12ceeee6..2d7c0c8f2 100644
--- a/material/java/com/google/android/material/carousel/CarouselLayoutManager.java
+++ b/material/java/com/google/android/material/carousel/CarouselLayoutManager.java
@@ -35,6 +35,7 @@
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewGroup;
+import android.view.accessibility.AccessibilityEvent;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.RestrictTo;
@@ -120,6 +121,18 @@ public CarouselLayoutManager(
// TODO(b/238620200): Add and obtain carousel attrs set on RecyclerView
}
+ @Override
+ public void onAttachedToWindow(RecyclerView view) {
+ super.onAttachedToWindow(view);
+ view.setAccessibilityDelegateCompat(new CarouselAccessibilityDelegate(view));
+ }
+
+ @Override
+ public void onDetachedFromWindow(RecyclerView view, Recycler recycler) {
+ super.onDetachedFromWindow(view, recycler);
+ view.setAccessibilityDelegateCompat(null);
+ }
+
@Override
public LayoutParams generateDefaultLayoutParams() {
return new LayoutParams(
@@ -724,6 +737,15 @@ private int addEnd(int value, int amount) {
return isLayoutRtl() ? value - amount : value + amount;
}
+ @Override
+ public void onInitializeAccessibilityEvent(@NonNull AccessibilityEvent event) {
+ super.onInitializeAccessibilityEvent(event);
+ if (getChildCount() > 0) {
+ event.setFromIndex(getPosition(getChildAt(0)));
+ event.setToIndex(getPosition(getChildAt(getChildCount() - 1)));
+ }
+ }
+
/**
* Gets the scroll offset for a position in the adapter.
*
@@ -768,6 +790,30 @@ public int scrollHorizontallyBy(int dx, Recycler recycler, State state) {
return canScrollHorizontally() ? scrollBy(dx, recycler, state) : 0;
}
+ @Override
+ public boolean requestChildRectangleOnScreen(
+ @NonNull RecyclerView parent,
+ @NonNull View child,
+ @NonNull Rect rect,
+ boolean immediate,
+ boolean focusedChildVisible) {
+ if (keylineStateList == null) {
+ return false;
+ }
+
+ int offsetForChild =
+ getScrollOffsetForPosition(keylineStateList.getDefaultState(), getPosition(child));
+ int dx = offsetForChild - horizontalScrollOffset;
+ if (!focusedChildVisible) {
+ if (dx != 0) {
+ // TODO(b/266816148): Implement smoothScrollBy when immediate is false.
+ parent.scrollBy(dx, 0);
+ return true;
+ }
+ }
+ return false;
+ }
+
/**
* Offset child items, respecting min and max scroll offsets, and fill additional space with new
* items.
@@ -832,6 +878,45 @@ private void offsetChildLeftAndRight(
child.offsetLeftAndRight((int) (offsetCx - actualCx));
}
+ /**
+ * Calculate the offset of the horizontal scrollbar thumb within the horizontal range. This is the
+ * position of the thumb within the scrollbar track.
+ *
+ * This is also used for accessibility when scrolling to give auditory feedback about the
+ * current scroll position within the total range.
+ *
+ *
This method can return an arbitrary unit as long as the unit is shared across {@link
+ * #computeHorizontalScrollExtent(State)} and {@link #computeHorizontalScrollRange(State)}.
+ */
+ @Override
+ public int computeHorizontalScrollOffset(@NonNull State state) {
+ return horizontalScrollOffset;
+ }
+
+ /**
+ * Compute the extent of the horizontal scrollbar thumb. This is the size of the thumb inside the
+ * scrollbar track.
+ *
+ *
This method can return an arbitrary unit as long as the unit is shared across {@link
+ * #computeHorizontalScrollExtent(State)} and {@link #computeHorizontalScrollOffset(State)}.
+ */
+ @Override
+ public int computeHorizontalScrollExtent(@NonNull State state) {
+ return (int) keylineStateList.getDefaultState().getItemSize();
+ }
+
+ /**
+ * Compute the horizontal range represented by the horizontal scroll bars. This is the total
+ * length of the scrollbar track within the range.
+ *
+ *
This method can return an arbitrary unit as long as the unit is shared across {@link
+ * #computeHorizontalScrollExtent(State)} and {@link #computeHorizontalScrollOffset(State)}.
+ */
+ @Override
+ public int computeHorizontalScrollRange(@NonNull State state) {
+ return maxHorizontalScroll - minHorizontalScroll;
+ }
+
/**
* Enables drawing that illustrates keylines and other internal concepts to help debug
* configurations.
diff --git a/material/java/com/google/android/material/checkbox/res/values/tokens.xml b/material/java/com/google/android/material/checkbox/res/values/tokens.xml
index 65763a101..dce0c44ba 100644
--- a/material/java/com/google/android/material/checkbox/res/values/tokens.xml
+++ b/material/java/com/google/android/material/checkbox/res/values/tokens.xml
@@ -15,7 +15,7 @@
~ limitations under the License.
-->
-
+
diff --git a/material/java/com/google/android/material/chip/res/values/tokens.xml b/material/java/com/google/android/material/chip/res/values/tokens.xml
index 162c07f29..17794881a 100644
--- a/material/java/com/google/android/material/chip/res/values/tokens.xml
+++ b/material/java/com/google/android/material/chip/res/values/tokens.xml
@@ -15,7 +15,7 @@
~ limitations under the License.
-->
-
+
diff --git a/material/java/com/google/android/material/color/res/color-v31/m3_ref_palette_dynamic_neutral12.xml b/material/java/com/google/android/material/color/res/color-v31/m3_ref_palette_dynamic_neutral12.xml
index da1304221..8e7433746 100644
--- a/material/java/com/google/android/material/color/res/color-v31/m3_ref_palette_dynamic_neutral12.xml
+++ b/material/java/com/google/android/material/color/res/color-v31/m3_ref_palette_dynamic_neutral12.xml
@@ -15,7 +15,7 @@
~ limitations under the License.
-->
-
+
diff --git a/material/java/com/google/android/material/color/res/color-v31/m3_ref_palette_dynamic_neutral17.xml b/material/java/com/google/android/material/color/res/color-v31/m3_ref_palette_dynamic_neutral17.xml
index 2cef816d5..5c5ca2486 100644
--- a/material/java/com/google/android/material/color/res/color-v31/m3_ref_palette_dynamic_neutral17.xml
+++ b/material/java/com/google/android/material/color/res/color-v31/m3_ref_palette_dynamic_neutral17.xml
@@ -15,7 +15,7 @@
~ limitations under the License.
-->
-
+
diff --git a/material/java/com/google/android/material/color/res/color-v31/m3_ref_palette_dynamic_neutral22.xml b/material/java/com/google/android/material/color/res/color-v31/m3_ref_palette_dynamic_neutral22.xml
index a4596ac6e..4bbaaccfe 100644
--- a/material/java/com/google/android/material/color/res/color-v31/m3_ref_palette_dynamic_neutral22.xml
+++ b/material/java/com/google/android/material/color/res/color-v31/m3_ref_palette_dynamic_neutral22.xml
@@ -15,7 +15,7 @@
~ limitations under the License.
-->
-
+
diff --git a/material/java/com/google/android/material/color/res/color-v31/m3_ref_palette_dynamic_neutral24.xml b/material/java/com/google/android/material/color/res/color-v31/m3_ref_palette_dynamic_neutral24.xml
index 0cf131c1d..8548ebb0e 100644
--- a/material/java/com/google/android/material/color/res/color-v31/m3_ref_palette_dynamic_neutral24.xml
+++ b/material/java/com/google/android/material/color/res/color-v31/m3_ref_palette_dynamic_neutral24.xml
@@ -15,7 +15,7 @@
~ limitations under the License.
-->
-
+
diff --git a/material/java/com/google/android/material/color/res/color-v31/m3_ref_palette_dynamic_neutral4.xml b/material/java/com/google/android/material/color/res/color-v31/m3_ref_palette_dynamic_neutral4.xml
index 16a3dc130..d318031fe 100644
--- a/material/java/com/google/android/material/color/res/color-v31/m3_ref_palette_dynamic_neutral4.xml
+++ b/material/java/com/google/android/material/color/res/color-v31/m3_ref_palette_dynamic_neutral4.xml
@@ -15,7 +15,7 @@
~ limitations under the License.
-->
-
+
diff --git a/material/java/com/google/android/material/color/res/color-v31/m3_ref_palette_dynamic_neutral6.xml b/material/java/com/google/android/material/color/res/color-v31/m3_ref_palette_dynamic_neutral6.xml
index 16260cc9c..626521983 100644
--- a/material/java/com/google/android/material/color/res/color-v31/m3_ref_palette_dynamic_neutral6.xml
+++ b/material/java/com/google/android/material/color/res/color-v31/m3_ref_palette_dynamic_neutral6.xml
@@ -15,7 +15,7 @@
~ limitations under the License.
-->
-
+
diff --git a/material/java/com/google/android/material/color/res/color-v31/m3_ref_palette_dynamic_neutral87.xml b/material/java/com/google/android/material/color/res/color-v31/m3_ref_palette_dynamic_neutral87.xml
index a844e548d..71aeb2b55 100644
--- a/material/java/com/google/android/material/color/res/color-v31/m3_ref_palette_dynamic_neutral87.xml
+++ b/material/java/com/google/android/material/color/res/color-v31/m3_ref_palette_dynamic_neutral87.xml
@@ -15,7 +15,7 @@
~ limitations under the License.
-->
-
+
diff --git a/material/java/com/google/android/material/color/res/color-v31/m3_ref_palette_dynamic_neutral92.xml b/material/java/com/google/android/material/color/res/color-v31/m3_ref_palette_dynamic_neutral92.xml
index d64ea0cdd..f96391ad7 100644
--- a/material/java/com/google/android/material/color/res/color-v31/m3_ref_palette_dynamic_neutral92.xml
+++ b/material/java/com/google/android/material/color/res/color-v31/m3_ref_palette_dynamic_neutral92.xml
@@ -15,7 +15,7 @@
~ limitations under the License.
-->
-
+
diff --git a/material/java/com/google/android/material/color/res/color-v31/m3_ref_palette_dynamic_neutral94.xml b/material/java/com/google/android/material/color/res/color-v31/m3_ref_palette_dynamic_neutral94.xml
index 742393113..e4f9ad42e 100644
--- a/material/java/com/google/android/material/color/res/color-v31/m3_ref_palette_dynamic_neutral94.xml
+++ b/material/java/com/google/android/material/color/res/color-v31/m3_ref_palette_dynamic_neutral94.xml
@@ -15,7 +15,7 @@
~ limitations under the License.
-->
-
+
diff --git a/material/java/com/google/android/material/color/res/color-v31/m3_ref_palette_dynamic_neutral96.xml b/material/java/com/google/android/material/color/res/color-v31/m3_ref_palette_dynamic_neutral96.xml
index e8994b795..5d32093b5 100644
--- a/material/java/com/google/android/material/color/res/color-v31/m3_ref_palette_dynamic_neutral96.xml
+++ b/material/java/com/google/android/material/color/res/color-v31/m3_ref_palette_dynamic_neutral96.xml
@@ -15,7 +15,7 @@
~ limitations under the License.
-->
-
+
diff --git a/material/java/com/google/android/material/color/res/color-v31/m3_ref_palette_dynamic_neutral98.xml b/material/java/com/google/android/material/color/res/color-v31/m3_ref_palette_dynamic_neutral98.xml
index bdd99159e..0d182cdd7 100644
--- a/material/java/com/google/android/material/color/res/color-v31/m3_ref_palette_dynamic_neutral98.xml
+++ b/material/java/com/google/android/material/color/res/color-v31/m3_ref_palette_dynamic_neutral98.xml
@@ -15,7 +15,7 @@
~ limitations under the License.
-->
-
+
diff --git a/material/java/com/google/android/material/color/res/values-v31/tokens.xml b/material/java/com/google/android/material/color/res/values-v31/tokens.xml
index 5003fe575..a85e5f94b 100644
--- a/material/java/com/google/android/material/color/res/values-v31/tokens.xml
+++ b/material/java/com/google/android/material/color/res/values-v31/tokens.xml
@@ -15,7 +15,7 @@
~ limitations under the License.
-->
-
+
diff --git a/material/java/com/google/android/material/color/res/values/tokens.xml b/material/java/com/google/android/material/color/res/values/tokens.xml
index c5ea89515..8d8652738 100644
--- a/material/java/com/google/android/material/color/res/values/tokens.xml
+++ b/material/java/com/google/android/material/color/res/values/tokens.xml
@@ -15,7 +15,7 @@
~ limitations under the License.
-->
-
+
diff --git a/material/java/com/google/android/material/datepicker/MaterialCalendar.java b/material/java/com/google/android/material/datepicker/MaterialCalendar.java
index 809677c83..8e5a6a354 100644
--- a/material/java/com/google/android/material/datepicker/MaterialCalendar.java
+++ b/material/java/com/google/android/material/datepicker/MaterialCalendar.java
@@ -302,9 +302,12 @@ public void onDraw(
}
int top = viewInRow.getTop() + calendarStyle.year.getTopInset();
int bottom = viewInRow.getBottom() - calendarStyle.year.getBottomInset();
- int left = row == firstRow ? firstView.getLeft() + firstView.getWidth() / 2 : 0;
+ int left =
+ row == firstRow && firstView != null
+ ? firstView.getLeft() + firstView.getWidth() / 2
+ : 0;
int right =
- row == lastRow
+ row == lastRow && lastView != null
? lastView.getLeft() + lastView.getWidth() / 2
: recyclerView.getWidth();
canvas.drawRect(left, top, right, bottom, calendarStyle.rangeFill);
diff --git a/material/java/com/google/android/material/datepicker/MaterialDatePicker.java b/material/java/com/google/android/material/datepicker/MaterialDatePicker.java
index e0011fabd..366ebdd8e 100644
--- a/material/java/com/google/android/material/datepicker/MaterialDatePicker.java
+++ b/material/java/com/google/android/material/datepicker/MaterialDatePicker.java
@@ -182,8 +182,9 @@ public final void onSaveInstanceState(@NonNull Bundle bundle) {
CalendarConstraints.Builder constraintsBuilder =
new CalendarConstraints.Builder(calendarConstraints);
- if (calendar.getCurrentMonth() != null) {
- constraintsBuilder.setOpenAt(calendar.getCurrentMonth().timeInMillis);
+ Month currentMonth = calendar == null ? null : calendar.getCurrentMonth();
+ if (currentMonth != null) {
+ constraintsBuilder.setOpenAt(currentMonth.timeInMillis);
}
bundle.putParcelable(CALENDAR_CONSTRAINTS_KEY, constraintsBuilder.build());
bundle.putParcelable(DAY_VIEW_DECORATOR_KEY, dayViewDecorator);
diff --git a/material/java/com/google/android/material/dialog/res/values/tokens.xml b/material/java/com/google/android/material/dialog/res/values/tokens.xml
index 61fa254c2..3e42882ce 100644
--- a/material/java/com/google/android/material/dialog/res/values/tokens.xml
+++ b/material/java/com/google/android/material/dialog/res/values/tokens.xml
@@ -15,7 +15,7 @@
~ limitations under the License.
-->
-
+
diff --git a/material/java/com/google/android/material/divider/res/values/tokens.xml b/material/java/com/google/android/material/divider/res/values/tokens.xml
index d249c3320..e4521ae96 100644
--- a/material/java/com/google/android/material/divider/res/values/tokens.xml
+++ b/material/java/com/google/android/material/divider/res/values/tokens.xml
@@ -15,7 +15,7 @@
~ limitations under the License.
-->
-
+
diff --git a/material/java/com/google/android/material/elevation/res/values/tokens.xml b/material/java/com/google/android/material/elevation/res/values/tokens.xml
index 7868981ea..ec73ee671 100644
--- a/material/java/com/google/android/material/elevation/res/values/tokens.xml
+++ b/material/java/com/google/android/material/elevation/res/values/tokens.xml
@@ -15,7 +15,7 @@
~ limitations under the License.
-->
-
+
diff --git a/material/java/com/google/android/material/floatingactionbutton/res/values/efab_tokens.xml b/material/java/com/google/android/material/floatingactionbutton/res/values/efab_tokens.xml
index 385a9adb9..434b903bc 100644
--- a/material/java/com/google/android/material/floatingactionbutton/res/values/efab_tokens.xml
+++ b/material/java/com/google/android/material/floatingactionbutton/res/values/efab_tokens.xml
@@ -15,7 +15,7 @@
~ limitations under the License.
-->
-
+
diff --git a/material/java/com/google/android/material/floatingactionbutton/res/values/fab_tokens.xml b/material/java/com/google/android/material/floatingactionbutton/res/values/fab_tokens.xml
index 9fcd84780..9922a697f 100644
--- a/material/java/com/google/android/material/floatingactionbutton/res/values/fab_tokens.xml
+++ b/material/java/com/google/android/material/floatingactionbutton/res/values/fab_tokens.xml
@@ -15,7 +15,7 @@
~ limitations under the License.
-->
-
+
diff --git a/material/java/com/google/android/material/materialswitch/res/values/tokens.xml b/material/java/com/google/android/material/materialswitch/res/values/tokens.xml
index 9d17fa241..eb71952de 100644
--- a/material/java/com/google/android/material/materialswitch/res/values/tokens.xml
+++ b/material/java/com/google/android/material/materialswitch/res/values/tokens.xml
@@ -15,7 +15,7 @@
~ limitations under the License.
-->
-
+
diff --git a/material/java/com/google/android/material/menu/res/values/tokens.xml b/material/java/com/google/android/material/menu/res/values/tokens.xml
index 840cc9893..7ddf65455 100644
--- a/material/java/com/google/android/material/menu/res/values/tokens.xml
+++ b/material/java/com/google/android/material/menu/res/values/tokens.xml
@@ -15,7 +15,7 @@
~ limitations under the License.
-->
-
+
diff --git a/material/java/com/google/android/material/motion/res/values/tokens.xml b/material/java/com/google/android/material/motion/res/values/tokens.xml
index 602874f50..f7cda7486 100644
--- a/material/java/com/google/android/material/motion/res/values/tokens.xml
+++ b/material/java/com/google/android/material/motion/res/values/tokens.xml
@@ -15,7 +15,7 @@
~ limitations under the License.
-->
-
+
diff --git a/material/java/com/google/android/material/navigation/res/color/m3_navigation_bar_item_with_indicator_icon_tint.xml b/material/java/com/google/android/material/navigation/res/color/m3_navigation_rail_item_with_indicator_icon_tint.xml
similarity index 100%
rename from material/java/com/google/android/material/navigation/res/color/m3_navigation_bar_item_with_indicator_icon_tint.xml
rename to material/java/com/google/android/material/navigation/res/color/m3_navigation_rail_item_with_indicator_icon_tint.xml
diff --git a/material/java/com/google/android/material/navigation/res/color/m3_navigation_bar_item_with_indicator_label_tint.xml b/material/java/com/google/android/material/navigation/res/color/m3_navigation_rail_item_with_indicator_label_tint.xml
similarity index 100%
rename from material/java/com/google/android/material/navigation/res/color/m3_navigation_bar_item_with_indicator_label_tint.xml
rename to material/java/com/google/android/material/navigation/res/color/m3_navigation_rail_item_with_indicator_label_tint.xml
diff --git a/material/java/com/google/android/material/navigation/res/color/m3_navigation_bar_ripple_color_selector.xml b/material/java/com/google/android/material/navigation/res/color/m3_navigation_rail_ripple_color_selector.xml
similarity index 100%
rename from material/java/com/google/android/material/navigation/res/color/m3_navigation_bar_ripple_color_selector.xml
rename to material/java/com/google/android/material/navigation/res/color/m3_navigation_rail_ripple_color_selector.xml
diff --git a/material/java/com/google/android/material/navigation/res/values/tokens.xml b/material/java/com/google/android/material/navigation/res/values/tokens.xml
index 781d79c8a..ad05ff7d8 100644
--- a/material/java/com/google/android/material/navigation/res/values/tokens.xml
+++ b/material/java/com/google/android/material/navigation/res/values/tokens.xml
@@ -15,7 +15,7 @@
~ limitations under the License.
-->
-
+
diff --git a/material/java/com/google/android/material/navigationrail/res/values/styles.xml b/material/java/com/google/android/material/navigationrail/res/values/styles.xml
index bc3889653..0358e9e6d 100644
--- a/material/java/com/google/android/material/navigationrail/res/values/styles.xml
+++ b/material/java/com/google/android/material/navigationrail/res/values/styles.xml
@@ -71,10 +71,10 @@
- @null
- @dimen/m3_navigation_rail_elevation
- @style/Widget.Material3.NavigationRailView.ActiveIndicator
- - @color/m3_navigation_bar_ripple_color_selector
+ - @color/m3_navigation_rail_ripple_color_selector
- @dimen/m3_comp_navigation_rail_icon_size
- - @color/m3_navigation_bar_item_with_indicator_icon_tint
- - @color/m3_navigation_bar_item_with_indicator_label_tint
+ - @color/m3_navigation_rail_item_with_indicator_icon_tint
+ - @color/m3_navigation_rail_item_with_indicator_label_tint
- @dimen/m3_navigation_rail_item_padding_top
- @dimen/m3_navigation_rail_item_padding_bottom
- @dimen/m3_navigation_rail_item_min_height
diff --git a/material/java/com/google/android/material/navigationrail/res/values/tokens.xml b/material/java/com/google/android/material/navigationrail/res/values/tokens.xml
index 839507040..f1042a743 100644
--- a/material/java/com/google/android/material/navigationrail/res/values/tokens.xml
+++ b/material/java/com/google/android/material/navigationrail/res/values/tokens.xml
@@ -15,7 +15,7 @@
~ limitations under the License.
-->
-
+
diff --git a/material/java/com/google/android/material/progressindicator/res/values/tokens.xml b/material/java/com/google/android/material/progressindicator/res/values/tokens.xml
index ecc19da5a..aa09b5afa 100644
--- a/material/java/com/google/android/material/progressindicator/res/values/tokens.xml
+++ b/material/java/com/google/android/material/progressindicator/res/values/tokens.xml
@@ -15,7 +15,7 @@
~ limitations under the License.
-->
-
+
diff --git a/material/java/com/google/android/material/radiobutton/res/values/tokens.xml b/material/java/com/google/android/material/radiobutton/res/values/tokens.xml
index 739dc485d..3cfa879b5 100644
--- a/material/java/com/google/android/material/radiobutton/res/values/tokens.xml
+++ b/material/java/com/google/android/material/radiobutton/res/values/tokens.xml
@@ -15,7 +15,7 @@
~ limitations under the License.
-->
-
+
diff --git a/material/java/com/google/android/material/resources/res/values-v21/tokens.xml b/material/java/com/google/android/material/resources/res/values-v21/tokens.xml
index ee06f00ec..09748caef 100644
--- a/material/java/com/google/android/material/resources/res/values-v21/tokens.xml
+++ b/material/java/com/google/android/material/resources/res/values-v21/tokens.xml
@@ -15,7 +15,7 @@
~ limitations under the License.
-->
-
+
diff --git a/material/java/com/google/android/material/resources/res/values-v28/tokens.xml b/material/java/com/google/android/material/resources/res/values-v28/tokens.xml
index efe0ed929..05dd5c17b 100644
--- a/material/java/com/google/android/material/resources/res/values-v28/tokens.xml
+++ b/material/java/com/google/android/material/resources/res/values-v28/tokens.xml
@@ -15,7 +15,7 @@
~ limitations under the License.
-->
-
+
diff --git a/material/java/com/google/android/material/resources/res/values/tokens.xml b/material/java/com/google/android/material/resources/res/values/tokens.xml
index 61c11d79f..67f89a1dc 100644
--- a/material/java/com/google/android/material/resources/res/values/tokens.xml
+++ b/material/java/com/google/android/material/resources/res/values/tokens.xml
@@ -15,7 +15,7 @@
~ limitations under the License.
-->
-
+
diff --git a/material/java/com/google/android/material/search/res/values/tokens.xml b/material/java/com/google/android/material/search/res/values/tokens.xml
index 09e8b5e1c..e643c7e8d 100644
--- a/material/java/com/google/android/material/search/res/values/tokens.xml
+++ b/material/java/com/google/android/material/search/res/values/tokens.xml
@@ -15,7 +15,7 @@
~ limitations under the License.
-->
-
+
diff --git a/material/java/com/google/android/material/shape/res/values/tokens.xml b/material/java/com/google/android/material/shape/res/values/tokens.xml
index fe38bf8d6..fd5917adf 100644
--- a/material/java/com/google/android/material/shape/res/values/tokens.xml
+++ b/material/java/com/google/android/material/shape/res/values/tokens.xml
@@ -15,7 +15,7 @@
~ limitations under the License.
-->
-
+
diff --git a/material/java/com/google/android/material/sidesheet/res/values/styles.xml b/material/java/com/google/android/material/sidesheet/res/values/styles.xml
index b16436dbb..441526615 100644
--- a/material/java/com/google/android/material/sidesheet/res/values/styles.xml
+++ b/material/java/com/google/android/material/sidesheet/res/values/styles.xml
@@ -41,7 +41,7 @@
diff --git a/material/java/com/google/android/material/sidesheet/res/values/tokens.xml b/material/java/com/google/android/material/sidesheet/res/values/tokens.xml
index a2aa15c1d..80c2108c4 100644
--- a/material/java/com/google/android/material/sidesheet/res/values/tokens.xml
+++ b/material/java/com/google/android/material/sidesheet/res/values/tokens.xml
@@ -15,12 +15,15 @@
~ limitations under the License.
-->
-
+
+
+ ?attr/shapeAppearanceCornerLarge
?attr/colorSurface
@dimen/m3_sys_elevation_level1
@dimen/m3_sys_elevation_level0
diff --git a/material/java/com/google/android/material/slider/res/values/tokens.xml b/material/java/com/google/android/material/slider/res/values/tokens.xml
index 444b45d5d..86723e603 100644
--- a/material/java/com/google/android/material/slider/res/values/tokens.xml
+++ b/material/java/com/google/android/material/slider/res/values/tokens.xml
@@ -15,7 +15,7 @@
~ limitations under the License.
-->
-
+
diff --git a/material/java/com/google/android/material/snackbar/res/values/tokens.xml b/material/java/com/google/android/material/snackbar/res/values/tokens.xml
index d8f463361..b19c01377 100644
--- a/material/java/com/google/android/material/snackbar/res/values/tokens.xml
+++ b/material/java/com/google/android/material/snackbar/res/values/tokens.xml
@@ -15,7 +15,7 @@
~ limitations under the License.
-->
-
+
diff --git a/material/java/com/google/android/material/tabs/res/values/tokens.xml b/material/java/com/google/android/material/tabs/res/values/tokens.xml
index 6742e1f9c..b962f2beb 100644
--- a/material/java/com/google/android/material/tabs/res/values/tokens.xml
+++ b/material/java/com/google/android/material/tabs/res/values/tokens.xml
@@ -15,7 +15,7 @@
~ limitations under the License.
-->
-
+
diff --git a/material/java/com/google/android/material/timepicker/MaterialTimePicker.java b/material/java/com/google/android/material/timepicker/MaterialTimePicker.java
index 6f9b2a3fd..daaa6a8fc 100644
--- a/material/java/com/google/android/material/timepicker/MaterialTimePicker.java
+++ b/material/java/com/google/android/material/timepicker/MaterialTimePicker.java
@@ -327,9 +327,15 @@ public void onClick(View v) {
@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle bundle) {
super.onViewCreated(view, bundle);
+ // TODO(b/246354286): Investigate issue with keyboard not showing on Android 12+
if (activePresenter instanceof TimePickerTextInputPresenter) {
- // TODO(b/246354286): Investigate issue with keyboard not showing on Android 12+
- view.postDelayed(() -> ((TimePickerTextInputPresenter) activePresenter).resetChecked(), 100);
+ view.postDelayed(
+ () -> {
+ if (activePresenter instanceof TimePickerTextInputPresenter) {
+ ((TimePickerTextInputPresenter) activePresenter).resetChecked();
+ }
+ },
+ 100);
}
}
diff --git a/material/java/com/google/android/material/timepicker/res/values/tokens.xml b/material/java/com/google/android/material/timepicker/res/values/tokens.xml
index 059850bba..17aeda0f9 100644
--- a/material/java/com/google/android/material/timepicker/res/values/tokens.xml
+++ b/material/java/com/google/android/material/timepicker/res/values/tokens.xml
@@ -15,7 +15,7 @@
~ limitations under the License.
-->
-
+
diff --git a/material/java/com/google/android/material/tooltip/res/values/tokens.xml b/material/java/com/google/android/material/tooltip/res/values/tokens.xml
index 391acbce1..33648b52c 100644
--- a/material/java/com/google/android/material/tooltip/res/values/tokens.xml
+++ b/material/java/com/google/android/material/tooltip/res/values/tokens.xml
@@ -15,7 +15,7 @@
~ limitations under the License.
-->
-
+
diff --git a/material/java/com/google/android/material/typography/res/values-v21/tokens.xml b/material/java/com/google/android/material/typography/res/values-v21/tokens.xml
index 8f9ff5c01..7a8504b92 100644
--- a/material/java/com/google/android/material/typography/res/values-v21/tokens.xml
+++ b/material/java/com/google/android/material/typography/res/values-v21/tokens.xml
@@ -15,7 +15,7 @@
~ limitations under the License.
-->
-
+
diff --git a/material/java/com/google/android/material/typography/res/values/tokens.xml b/material/java/com/google/android/material/typography/res/values/tokens.xml
index 35cf0f089..0627ebc5c 100644
--- a/material/java/com/google/android/material/typography/res/values/tokens.xml
+++ b/material/java/com/google/android/material/typography/res/values/tokens.xml
@@ -15,7 +15,7 @@
~ limitations under the License.
-->
-
+