Loading res/flag(com.android.documentsui.flags.use_material3)/color/list_item_ripple_color.xml 0 → 100644 +24 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- ~ Copyright (C) 2025 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 ~ ~ http://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 --> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_enabled="false" android:color="@android:color/transparent" /> <item android:state_selected="true" android:alpha="@dimen/ripple_overlay_alpha" android:color="?attr/colorOnPrimaryContainer" /> <item android:alpha="@dimen/ripple_overlay_alpha" android:color="?attr/colorOnSurface" /> </selector> res/flag(com.android.documentsui.flags.use_material3)/drawable/list_item_background.xml +101 −54 Original line number Diff line number Diff line Loading @@ -16,8 +16,16 @@ <!-- Use @color/list_item_selected_background_color instead of the "?attr/colorPrimaryContainer" because the variable is exposed in overlayable.xml. --> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <!-- selected --> <ripple xmlns:android="http://schemas.android.com/apk/res/android" android:color="@color/list_item_ripple_color"> <!-- The mask below only works for the ripple itself, doesn't work for other <item>s, we need to explicitly apply the drawable if the other items also need this mask. --> <item android:id="@android:id/mask" android:drawable="@drawable/list_item_mask"/> <item> <selector> <!-- Selected --> <item android:state_selected="true" android:state_drag_hovered="true"> <layer-list> <item> Loading @@ -27,7 +35,23 @@ </shape> </item> <item> <shape android:tint="?attr/colorOnPrimary"> <shape android:tint="?attr/colorOnPrimaryContainer"> <corners android:radius="@dimen/list_item_height" /> <solid android:color="@color/overlay_hover_color_percentage" /> </shape> </item> </layer-list> </item> <item android:state_selected="true" android:state_pressed="true"> <layer-list> <item> <shape> <corners android:radius="@dimen/list_item_height" /> <solid android:color="@color/list_item_selected_background_color" /> </shape> </item> <item> <shape android:tint="?attr/colorOnPrimaryContainer"> <corners android:radius="@dimen/list_item_height" /> <solid android:color="@color/overlay_hover_color_percentage" /> </shape> Loading Loading @@ -57,11 +81,21 @@ </layer-list> </item> <item android:state_selected="true" android:state_hovered="true"> <layer-list> <item> <shape> <corners android:radius="@dimen/list_item_height" /> <solid android:color="@color/list_item_selected_background_color" /> </shape> </item> <item> <shape android:tint="?attr/colorOnPrimaryContainer"> <corners android:radius="@dimen/list_item_height" /> <solid android:color="@color/overlay_hover_color_percentage" /> </shape> </item> </layer-list> </item> <item android:state_selected="true"> <shape> <corners android:radius="@dimen/list_item_height" /> Loading @@ -69,13 +103,19 @@ </shape> </item> <!-- unselected --> <!-- Unselected --> <item android:state_drag_hovered="true"> <shape android:tint="?attr/colorOnSurface"> <corners android:radius="@dimen/list_item_height" /> <solid android:color="@color/overlay_hover_color_percentage" /> </shape> </item> <item android:state_pressed="true"> <shape android:tint="?attr/colorOnSurface"> <corners android:radius="@dimen/list_item_height" /> <solid android:color="@color/overlay_hover_color_percentage" /> </shape> </item> <item android:state_focused="true"> <shape> <corners android:radius="@dimen/list_item_height" /> Loading @@ -85,9 +125,16 @@ </shape> </item> <item android:state_hovered="true"> <color android:color="@android:color/transparent"/> <shape android:tint="?attr/colorOnSurface"> <corners android:radius="@dimen/list_item_height" /> <solid android:color="@color/overlay_hover_color_percentage" /> </shape> </item> <!-- Default: use the container background. --> <item> <color android:color="?attr/colorSurfaceBright"/> <color android:color="@android:color/transparent"/> </item> </selector> </item> </ripple> No newline at end of file res/flag(com.android.documentsui.flags.use_material3)/drawable/list_item_mask.xml 0 → 100644 +21 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2025 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 http://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. --> <shape xmlns:android="http://schemas.android.com/apk/res/android"> <corners android:radius="@dimen/list_item_height" /> <!-- The color here doesn't matter, it's just being used as a mask. --> <solid android:color="@android:color/white" /> </shape> No newline at end of file res/flag(com.android.documentsui.flags.use_material3)/values/dimens.xml +1 −0 Original line number Diff line number Diff line Loading @@ -205,6 +205,7 @@ <dimen name="cross_profile_button_message_margin_top">4dp</dimen> <dimen name="focus_ring_width">3dp</dimen> <!-- 3dp focus ring width + 2dp gap between the ring and the content --> <dimen name="focus_ring_gap">5dp</dimen> <dimen name="hover_overlay_alpha">0.08</dimen> <dimen name="ripple_overlay_alpha">0.10</dimen> Loading Loading
res/flag(com.android.documentsui.flags.use_material3)/color/list_item_ripple_color.xml 0 → 100644 +24 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- ~ Copyright (C) 2025 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 ~ ~ http://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 --> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_enabled="false" android:color="@android:color/transparent" /> <item android:state_selected="true" android:alpha="@dimen/ripple_overlay_alpha" android:color="?attr/colorOnPrimaryContainer" /> <item android:alpha="@dimen/ripple_overlay_alpha" android:color="?attr/colorOnSurface" /> </selector>
res/flag(com.android.documentsui.flags.use_material3)/drawable/list_item_background.xml +101 −54 Original line number Diff line number Diff line Loading @@ -16,8 +16,16 @@ <!-- Use @color/list_item_selected_background_color instead of the "?attr/colorPrimaryContainer" because the variable is exposed in overlayable.xml. --> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <!-- selected --> <ripple xmlns:android="http://schemas.android.com/apk/res/android" android:color="@color/list_item_ripple_color"> <!-- The mask below only works for the ripple itself, doesn't work for other <item>s, we need to explicitly apply the drawable if the other items also need this mask. --> <item android:id="@android:id/mask" android:drawable="@drawable/list_item_mask"/> <item> <selector> <!-- Selected --> <item android:state_selected="true" android:state_drag_hovered="true"> <layer-list> <item> Loading @@ -27,7 +35,23 @@ </shape> </item> <item> <shape android:tint="?attr/colorOnPrimary"> <shape android:tint="?attr/colorOnPrimaryContainer"> <corners android:radius="@dimen/list_item_height" /> <solid android:color="@color/overlay_hover_color_percentage" /> </shape> </item> </layer-list> </item> <item android:state_selected="true" android:state_pressed="true"> <layer-list> <item> <shape> <corners android:radius="@dimen/list_item_height" /> <solid android:color="@color/list_item_selected_background_color" /> </shape> </item> <item> <shape android:tint="?attr/colorOnPrimaryContainer"> <corners android:radius="@dimen/list_item_height" /> <solid android:color="@color/overlay_hover_color_percentage" /> </shape> Loading Loading @@ -57,11 +81,21 @@ </layer-list> </item> <item android:state_selected="true" android:state_hovered="true"> <layer-list> <item> <shape> <corners android:radius="@dimen/list_item_height" /> <solid android:color="@color/list_item_selected_background_color" /> </shape> </item> <item> <shape android:tint="?attr/colorOnPrimaryContainer"> <corners android:radius="@dimen/list_item_height" /> <solid android:color="@color/overlay_hover_color_percentage" /> </shape> </item> </layer-list> </item> <item android:state_selected="true"> <shape> <corners android:radius="@dimen/list_item_height" /> Loading @@ -69,13 +103,19 @@ </shape> </item> <!-- unselected --> <!-- Unselected --> <item android:state_drag_hovered="true"> <shape android:tint="?attr/colorOnSurface"> <corners android:radius="@dimen/list_item_height" /> <solid android:color="@color/overlay_hover_color_percentage" /> </shape> </item> <item android:state_pressed="true"> <shape android:tint="?attr/colorOnSurface"> <corners android:radius="@dimen/list_item_height" /> <solid android:color="@color/overlay_hover_color_percentage" /> </shape> </item> <item android:state_focused="true"> <shape> <corners android:radius="@dimen/list_item_height" /> Loading @@ -85,9 +125,16 @@ </shape> </item> <item android:state_hovered="true"> <color android:color="@android:color/transparent"/> <shape android:tint="?attr/colorOnSurface"> <corners android:radius="@dimen/list_item_height" /> <solid android:color="@color/overlay_hover_color_percentage" /> </shape> </item> <!-- Default: use the container background. --> <item> <color android:color="?attr/colorSurfaceBright"/> <color android:color="@android:color/transparent"/> </item> </selector> </item> </ripple> No newline at end of file
res/flag(com.android.documentsui.flags.use_material3)/drawable/list_item_mask.xml 0 → 100644 +21 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2025 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 http://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. --> <shape xmlns:android="http://schemas.android.com/apk/res/android"> <corners android:radius="@dimen/list_item_height" /> <!-- The color here doesn't matter, it's just being used as a mask. --> <solid android:color="@android:color/white" /> </shape> No newline at end of file
res/flag(com.android.documentsui.flags.use_material3)/values/dimens.xml +1 −0 Original line number Diff line number Diff line Loading @@ -205,6 +205,7 @@ <dimen name="cross_profile_button_message_margin_top">4dp</dimen> <dimen name="focus_ring_width">3dp</dimen> <!-- 3dp focus ring width + 2dp gap between the ring and the content --> <dimen name="focus_ring_gap">5dp</dimen> <dimen name="hover_overlay_alpha">0.08</dimen> <dimen name="ripple_overlay_alpha">0.10</dimen> Loading