Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Internal] Update targetApi suppressions in resources #4308

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

<!-- A theme which sets the status bar color to transparent -->
<style name="Theme.Catalog.TransparentStatus">
<item name="android:statusBarColor" tools:targetApi="lollipop">@android:color/transparent</item>
<item name="android:statusBarColor">@android:color/transparent</item>
</style>

<style name="CatalogPreferenceThemeOverlay" parent="PreferenceThemeOverlay">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<item name="colorSecondary">@color/cat_music_player_secondary</item>
<item name="colorOnSecondary">@color/cat_music_player_on_secondary</item>

<item name="android:statusBarColor" tools:targetApi="lollipop">?attr/colorControlNormal</item>
<item name="android:statusBarColor">?attr/colorControlNormal</item>
<item name="android:windowLightStatusBar" tools:targetApi="m">?attr/isLightTheme</item>
</style>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:src="@drawable/cat_nav_drawer_header"
tools:ignore="NewApi"/>
android:src="@drawable/cat_nav_drawer_header"/>

<LinearLayout
android:layout_width="wrap_content"
Expand All @@ -41,8 +40,7 @@
android:layout_width="64dp"
android:layout_height="64dp"
android:layout_marginBottom="20dp"
android:src="@drawable/cat_ic_avatar_72"
tools:ignore="NewApi"/>
android:src="@drawable/cat_ic_avatar_72"/>

<TextView
android:layout_width="wrap_content"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@
android:layout_width="256dp"
android:layout_height="match_parent"
android:orientation="vertical"
app:layout_behavior="@string/side_sheet_behavior"
tools:targetApi="lollipop">
app:layout_behavior="@string/side_sheet_behavior">
<include layout="@layout/cat_sidesheet_content" />
</FrameLayout>

Expand All @@ -33,8 +32,7 @@
android:layout_width="256dp"
android:layout_height="match_parent"
android:orientation="vertical"
app:layout_behavior="@string/side_sheet_behavior"
tools:targetApi="lollipop">
app:layout_behavior="@string/side_sheet_behavior">
<include layout="@layout/cat_sidesheet_detached_content" />
</FrameLayout>

Expand All @@ -44,8 +42,7 @@
android:layout_width="256dp"
android:layout_height="match_parent"
android:orientation="vertical"
app:layout_behavior="@string/side_sheet_behavior"
tools:targetApi="lollipop">
app:layout_behavior="@string/side_sheet_behavior">
<include layout="@layout/cat_sidesheet_content_vertically_scrolling" />
</FrameLayout>

Expand All @@ -56,8 +53,7 @@
android:layout_height="match_parent"
android:orientation="vertical"
app:coplanarSiblingViewId="@id/nested_scroll_view"
app:layout_behavior="@string/side_sheet_behavior"
tools:targetApi="lollipop">
app:layout_behavior="@string/side_sheet_behavior">
<include layout="@layout/cat_sidesheet_content_coplanar" />
</FrameLayout>

Expand All @@ -68,8 +64,7 @@
android:layout_height="match_parent"
android:orientation="vertical"
app:coplanarSiblingViewId="@id/nested_scroll_view"
app:layout_behavior="@string/side_sheet_behavior"
tools:targetApi="lollipop">
app:layout_behavior="@string/side_sheet_behavior">
<include layout="@layout/cat_sidesheet_content_coplanar_detached" />
</FrameLayout>
</merge>
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/root"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:targetApi="lollipop">
android:layout_height="match_parent">

<include layout="@layout/cat_transition_list_fragment" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@
app:columnCount="2"
app:rowCount="3"
android:gravity="center_horizontal"
app:orientation="vertical"
tools:targetApi="lollipop">
app:orientation="vertical">

<com.google.android.material.card.MaterialCardView
android:layout_width="0dp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@
android:gravity="center_horizontal"
app:columnCount="2"
app:orientation="vertical"
app:rowCount="3"
tools:targetApi="lollipop">
app:rowCount="3">

<ImageView
android:layout_width="0dp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@
app:rowCount="3"
android:gravity="center_horizontal"
app:orientation="vertical"
android:padding="4dp"
tools:targetApi="lollipop">
android:padding="4dp">

<com.google.android.material.card.MaterialCardView
android:layout_width="0dp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@
android:id="@+id/scrolling_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:targetApi="lollipop">
app:layout_behavior="@string/appbar_scrolling_view_behavior">

<LinearLayout
android:layout_width="match_parent"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@
android:id="@+id/end_activity"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:transitionGroup="true"
tools:targetApi="lollipop">
android:transitionGroup="true">

<FrameLayout
android:id="@+id/end_layout"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:targetApi="lollipop">
android:orientation="vertical">

<androidx.fragment.app.FragmentContainerView
android:id="@+id/fragment_container"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@
android:id="@+id/start_activity"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:transitionGroup="true"
tools:targetApi="lollipop">
android:transitionGroup="true">

<FrameLayout
android:id="@+id/start_layout"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:targetApi="lollipop">
android:layout_height="match_parent">

<FrameLayout
android:id="@+id/start_view"
Expand Down
2 changes: 1 addition & 1 deletion docs/components/BottomSheet.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ To enable edge-to-edge by default for modal bottom sheets, you can override
</style>

<style name="ThemeOverlay.App.BottomSheetDialog" parent="ThemeOverlay.Material3.BottomSheetDialog">
<item name="android:navigationBarColor" tools:ignore="NewApi">@android:color/transparent</item>
<item name="android:navigationBarColor">@android:color/transparent</item>
</style>
```

Expand Down
22 changes: 9 additions & 13 deletions lib/java/com/google/android/material/appbar/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,9 @@
<!-- AppBarLayout styles -->
<style name="Widget.Design.AppBarLayout" parent="android:Widget">
<item name="android:background">?attr/colorPrimary</item>
<item name="android:stateListAnimator" tools:ignore="NewApi">
@animator/design_appbar_state_list_animator
</item>
<item name="android:keyboardNavigationCluster" tools:ignore="NewApi">true</item>
<item name="android:touchscreenBlocksFocus" tools:ignore="NewApi">true</item>
<item name="android:stateListAnimator">@animator/design_appbar_state_list_animator</item>
<item name="android:keyboardNavigationCluster" tools:targetApi="o">true</item>
<item name="android:touchscreenBlocksFocus">true</item>
</style>

<style name="Widget.MaterialComponents.AppBarLayout.Primary" parent="Widget.Design.AppBarLayout"/>
Expand Down Expand Up @@ -58,7 +56,7 @@
</style>

<style name="Widget.MaterialComponents.Toolbar.Primary">
<item name="android:elevation" tools:ignore="NewApi">@dimen/design_appbar_elevation</item>
<item name="android:elevation">@dimen/design_appbar_elevation</item>
<item name="android:background">?attr/colorPrimary</item>
<item name="titleTextColor">?attr/colorOnPrimary</item>
<item name="subtitleTextColor">@color/material_on_primary_emphasis_medium</item>
Expand Down Expand Up @@ -151,13 +149,11 @@
<item name="liftOnScroll">true</item>
<item name="android:background">@macro/m3_comp_top_app_bar_small_container_color</item>
<item name="liftOnScrollColor">@macro/m3_comp_top_app_bar_small_on_scroll_container_color</item>
<item name="android:stateListAnimator" tools:ignore="NewApi">
@animator/m3_appbar_state_list_animator
</item>
<item name="android:stateListAnimator">@animator/m3_appbar_state_list_animator</item>

<!-- On newer API levels, hide shadows while keeping elevation. -->
<item name="android:outlineAmbientShadowColor" tools:ignore="NewApi">@android:color/transparent</item>
<item name="android:outlineSpotShadowColor" tools:ignore="NewApi">@android:color/transparent</item>
<item name="android:outlineAmbientShadowColor" tools:targetApi="p">@android:color/transparent</item>
<item name="android:outlineSpotShadowColor" tools:targetApi="p">@android:color/transparent</item>
</style>

<!-- M3 CollapsingToolbarLayout styles -->
Expand Down Expand Up @@ -205,8 +201,8 @@
<item name="contentInsetStartWithNavigation">0dp</item>

<!-- On newer API levels, hide shadows while keeping elevation. -->
<item name="android:outlineAmbientShadowColor" tools:ignore="NewApi">@android:color/transparent</item>
<item name="android:outlineSpotShadowColor" tools:ignore="NewApi">@android:color/transparent</item>
<item name="android:outlineAmbientShadowColor" tools:targetApi="p">@android:color/transparent</item>
<item name="android:outlineSpotShadowColor" tools:targetApi="p">@android:color/transparent</item>
</style>

<!-- Style for a M3 On Surface Toolbar (transparent background and on-surface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="NewApi">
<resources xmlns:tools="http://schemas.android.com/tools">

<style name="Widget.MaterialComponents.Badge" parent="android:Widget">
<item name="badgeWidth">@dimen/mtrl_badge_size</item>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@
<style name="Widget.Design.BottomSheet.Modal" parent="android:Widget">
<item name="enforceMaterialTheme">false</item>
<item name="android:background">?android:attr/colorBackground</item>
<item name="android:elevation" tools:ignore="NewApi">
@dimen/design_bottom_sheet_modal_elevation
</item>
<item name="android:elevation">@dimen/design_bottom_sheet_modal_elevation</item>
<item name="behavior_peekHeight">auto</item>
<item name="behavior_hideable">true</item>
<item name="behavior_skipCollapsed">false</item>
Expand All @@ -47,16 +45,12 @@
<item name="shapeAppearance">?attr/shapeAppearanceLargeComponent</item>
<item name="shapeAppearanceOverlay">@style/ShapeAppearanceOverlay.MaterialComponents.BottomSheet</item>
<item name="backgroundTint">?attr/colorSurface</item>
<item name="android:elevation" tools:ignore="NewApi">
@dimen/design_bottom_sheet_elevation
</item>
<item name="android:elevation">@dimen/design_bottom_sheet_elevation</item>
<item name="android:maxWidth">@dimen/material_bottom_sheet_max_width</item>
</style>

<style name="Widget.MaterialComponents.BottomSheet.Modal" parent="Widget.MaterialComponents.BottomSheet">
<item name="android:elevation" tools:ignore="NewApi">
@dimen/design_bottom_sheet_modal_elevation
</item>
<item name="android:elevation">@dimen/design_bottom_sheet_modal_elevation</item>
</style>

<style name="ShapeAppearanceOverlay.MaterialComponents.BottomSheet" parent="">
Expand All @@ -66,7 +60,7 @@

<!-- Style for the M3 Bottom Sheet. -->
<style name="Widget.Material3.BottomSheet" parent="Widget.MaterialComponents.BottomSheet">
<item name="android:elevation" tools:ignore="NewApi">@dimen/m3_bottom_sheet_elevation</item>
<item name="android:elevation">@dimen/m3_bottom_sheet_elevation</item>
<item name="marginLeftSystemWindowInsets">true</item>
<item name="marginRightSystemWindowInsets">true</item>
<item name="paddingBottomSystemWindowInsets">true</item>
Expand All @@ -80,7 +74,7 @@
</style>

<style name="Widget.Material3.BottomSheet.Modal">
<item name="android:elevation" tools:ignore="NewApi">@dimen/m3_bottom_sheet_modal_elevation</item>
<item name="android:elevation">@dimen/m3_bottom_sheet_modal_elevation</item>
</style>

<style name="Animation.Material3.BottomSheetDialog" parent="Animation.AppCompat.Dialog">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<item name="android:insetTop">@dimen/mtrl_btn_inset</item>
<item name="android:insetBottom">@dimen/mtrl_btn_inset</item>
<item name="android:maxWidth">@dimen/mtrl_btn_max_width</item>
<item name="android:stateListAnimator" tools:ignore="NewApi">@animator/mtrl_btn_state_list_anim</item>
<item name="android:stateListAnimator">@animator/mtrl_btn_state_list_anim</item>
<item name="cornerRadius">@null</item>
<item name="elevation">@dimen/mtrl_btn_elevation</item>
<item name="iconPadding">@dimen/mtrl_btn_icon_padding</item>
Expand All @@ -56,7 +56,7 @@
</style>

<style name="Widget.MaterialComponents.Button.UnelevatedButton">
<item name="android:stateListAnimator" tools:ignore="NewApi">@animator/mtrl_btn_unelevated_state_list_anim</item>
<item name="android:stateListAnimator">@animator/mtrl_btn_unelevated_state_list_anim</item>
<item name="elevation">0dp</item>
</style>

Expand Down Expand Up @@ -174,7 +174,7 @@
<item name="android:textAppearance">@macro/m3_comp_button_small_label_text</item>
<item name="shapeAppearance">@style/ShapeAppearance.M3.Comp.Button.Small.Container.Shape.Round</item>
<item name="materialThemeOverlay">@style/ThemeOverlay.Material3.Button</item>
<item name="android:stateListAnimator" tools:ignore="NewApi">@animator/m3_btn_state_list_anim</item>
<item name="android:stateListAnimator">@animator/m3_btn_state_list_anim</item>
<item name="elevation">@dimen/m3_comp_button_filled_container_elevation</item>
<item name="android:textColor">@color/m3_button_foreground_color_selector</item>
<item name="iconTint">@color/m3_button_foreground_color_selector</item>
Expand All @@ -194,7 +194,7 @@
</style>

<style name="Widget.Material3.Button.UnelevatedButton">
<item name="android:stateListAnimator" tools:ignore="NewApi">@animator/mtrl_btn_unelevated_state_list_anim</item>
<item name="android:stateListAnimator">@animator/mtrl_btn_unelevated_state_list_anim</item>
<item name="elevation">0dp</item>
</style>

Expand Down Expand Up @@ -279,9 +279,7 @@

<!-- M3 elevated button style. -->
<style name="Widget.Material3.Button.ElevatedButton">
<item name="android:stateListAnimator" tools:ignore="NewApi">
@animator/m3_btn_elevated_btn_state_list_anim
</item>
<item name="android:stateListAnimator">@animator/m3_btn_elevated_btn_state_list_anim</item>
<item name="android:textColor">@color/m3_text_button_foreground_color_selector</item>
<item name="elevation">@dimen/m3_comp_button_elevated_container_elevation</item>
<item name="iconTint">@color/m3_text_button_foreground_color_selector</item>
Expand Down
12 changes: 3 additions & 9 deletions lib/java/com/google/android/material/card/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@
<style name="Widget.MaterialComponents.CardView" parent="CardView">
<item name="enforceMaterialTheme">true</item>

<item name="android:stateListAnimator" tools:ignore="NewApi">
@animator/mtrl_card_state_list_anim
</item>
<item name="android:stateListAnimator">@animator/mtrl_card_state_list_anim</item>
<item name="cardBackgroundColor">?attr/colorSurface</item>
<item name="cardCornerRadius">@null</item>
<item name="cardElevation">@dimen/mtrl_card_elevation</item>
Expand All @@ -39,9 +37,7 @@
<!-- Style for the M3 card. -->
<style name="Base.Widget.Material3.CardView" parent="Widget.MaterialComponents.CardView">
<item name="enforceMaterialTheme">true</item>
<item name="android:stateListAnimator" tools:ignore="NewApi">
@animator/m3_card_state_list_anim
</item>
<item name="android:stateListAnimator">@animator/m3_card_state_list_anim</item>
<item name="cardElevation">@dimen/m3_card_elevation</item>
<item name="cardForegroundColor">@color/m3_card_foreground_color</item>
<item name="rippleColor">@color/m3_card_ripple_color</item>
Expand All @@ -68,9 +64,7 @@
</style>

<style name="Widget.Material3.CardView.Elevated" parent="Base.Widget.Material3.CardView">
<item name="android:stateListAnimator" tools:ignore="NewApi">
@animator/m3_card_elevated_state_list_anim
</item>
<item name="android:stateListAnimator">@animator/m3_card_elevated_state_list_anim</item>
<item name="strokeWidth">0dp</item>
<item name="cardElevation">@dimen/m3_card_elevated_elevation</item>
<item name="cardBackgroundColor">@macro/m3_comp_elevated_card_container_color</item>
Expand Down
Loading