1<?xml version="1.0" encoding="utf-8"?> 2<!-- 3 ~ Copyright (C) 2024 The Android Open Source Project 4 ~ 5 ~ Licensed under the Apache License, Version 2.0 (the "License"); 6 ~ you may not use this file except in compliance with the License. 7 ~ You may obtain a copy of the License at 8 ~ 9 ~ http://www.apache.org/licenses/LICENSE-2.0 10 ~ 11 ~ Unless required by applicable law or agreed to in writing, software 12 ~ distributed under the License is distributed on an "AS IS" BASIS, 13 ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 ~ See the License for the specific language governing permissions and 15 ~ limitations under the License. 16 --> 17 18<resources xmlns:android="http://schemas.android.com/apk/res/android" 19 xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"> 20 21 <!-- This is the default theme for the picker extracting attributes from the device's 22 default theme --> 23 <style name="PickerDefaultTheme" parent="@android:style/Theme.DeviceDefault.DayNight"> 24 <!-- System | Widget section --> 25 <item name="actionOverflowButtonStyle">@style/OverflowButtonStyle</item> 26 <item name="android:backgroundDimEnabled">true</item> 27 <item name="android:navigationBarColor">@color/picker_background_color</item> 28 <item name="android:statusBarColor">@android:color/transparent</item> 29 <item name="android:windowBackground">@android:color/transparent</item> 30 <item name="android:windowIsTranslucent">true</item> 31 <item name="android:windowNoTitle">true</item> 32 </style> 33 34 <!-- Sets button attribute for PickerDefaultTheme --> 35 <style name="OverflowButtonStyle" parent="Widget.AppCompat.ActionButton.Overflow"> 36 <item name="android:minWidth">@dimen/button_touch_size</item> 37 </style> 38 39 <!-- Defines theme of the PhotoPickerSettingsActivity --> 40 <style name="PickerSettingsDefaultTheme" parent="PickerDefaultTheme"> 41 <item name="android:windowIsTranslucent">false</item> 42 <item name="android:listPreferredItemHeightSmall"> 43 @dimen/picker_settings_list_item_height 44 </item> 45 <item name="android:listPreferredItemPaddingEnd"> 46 @dimen/picker_settings_list_item_padding_end 47 </item> 48 </style> 49 50 <!-- Defines the theme of the PhotoPickerActivity --> 51 <style name="PickerMaterialTheme" parent="@style/Theme.Material3.DayNight.NoActionBar"> 52 <item name="materialAlertDialogTheme">@style/ProfileDialogTheme</item> 53 <item name="pickerDragBarColor">#DADCE0</item> 54 <item name="pickerHighlightColor">?android:attr/colorAccent</item> 55 <item name="pickerHighlightTextColor">@android:color/white</item> 56 <item name="pickerProfileButtonColor">#E8F0FE</item> 57 <item name="pickerDisabledProfileButtonColor">@android:color/white</item> 58 <item name="pickerProfileButtonTextColor">#0B57D0</item> 59 <item name="pickerDisabledProfileButtonTextColor">#42757575</item> 60 <item name="pickerSelectedTabBackgroundColor">#E8F0FE</item> 61 <item name="pickerSelectedTabTextColor">#185ABC</item> 62 <item name="pickerTabBackgroundColor">@color/picker_background_color</item> 63 <item name="pickerTextColor">?android:attr/textColorPrimary</item> 64 <item name="pickerSelectedColor">?android:attr/colorAccent</item> 65 <item name="pickerProfileDialogButtonAndIconColor">#1A73E8</item> 66 <item name="pickerProfileDialogTitleColor">#202124</item> 67 <item name="pickerProfileDialogBodyColor">#5F6368</item> 68 <item name="pickerProfileDialogBackgroundColor">@android:color/white</item> 69 <!-- TODO(b/195009152): Final banner colors to be updated once received --> 70 <item name="pickerBannerBackgroundColor">@color/picker_background_color</item> 71 <item name="pickerBannerStrokeColor">@android:color/white</item> 72 <item name="pickerBannerPrimaryTextColor">?android:attr/textColorSecondary</item> 73 <item name="pickerBannerSecondaryTextColor">?android:attr/textColorPrimary</item> 74 <item name="pickerBannerButtonTextColor">?android:attr/colorAccent</item> 75 <item name="categoryDefaultThumbnailColor">?attr/colorOnSurfaceVariant</item> 76 <item name="categoryDefaultThumbnailCircleColor">?attr/colorSurfaceVariant</item> 77 </style> 78 79 <!-- Sets the style of the 'view selected' button in the picker bottom bar and the 80 'selected check button' in the PreviewFragment --> 81 <style name="MaterialBorderlessButtonStyle" 82 parent="@style/Widget.MaterialComponents.Button.TextButton"> 83 <item name="android:textAppearance">@style/PickerButtonTextAppearance</item> 84 </style> 85 86 <!-- Sets the style of the 'add' button in both the picker bottom bar and in the 87 PreviewFragment --> 88 <style name="MaterialButtonStyle" 89 parent="@style/Widget.MaterialComponents.Button.UnelevatedButton"> 90 <item name="android:textAppearance">@style/PickerButtonTextAppearance</item> 91 </style> 92 93 <!-- Sets material alert dialog attributes in PickerMaterialTheme --> 94 <style name="ProfileDialogTheme" 95 parent="@style/ThemeOverlay.MaterialComponents.MaterialAlertDialog.Centered"> 96 <item name="shapeAppearanceOverlay">@style/ShapeAppearance</item> 97 <item name="android:backgroundDimAmount">@dimen/picker_profile_dialog_scrim</item> 98 <item name="android:background">?attr/pickerProfileDialogBackgroundColor</item> 99 <item name="materialAlertDialogTitleTextStyle">@style/MaterialAlertDialogTitleStyle</item> 100 <item name="materialAlertDialogBodyTextStyle">@style/MaterialAlertDialogBodyStyle</item> 101 <item name="materialAlertDialogTitleIconStyle">@style/MaterialAlertDialogIconStyle</item> 102 <item name="buttonBarPositiveButtonStyle">@style/PositiveButtonStyle</item> 103 </style> 104 105 106 <!-- The following five styles are used to set the attributes of the shape, button and material 107 alert dialog in ProfileDialogTheme --> 108 109 <style name="ShapeAppearance"> 110 <item name="cornerFamily">rounded</item> 111 <item name="cornerSize">@dimen/picker_profile_dialog_radius</item> 112 </style> 113 114 <style name="PositiveButtonStyle" parent="Widget.MaterialComponents.Button.TextButton.Dialog"> 115 <item name="android:textColor">?attr/pickerProfileDialogButtonAndIconColor</item> 116 </style> 117 118 <style name="MaterialAlertDialogTitleStyle" 119 parent="@style/MaterialAlertDialog.MaterialComponents.Title.Text.CenterStacked"> 120 <item name="android:textColor">?attr/pickerProfileDialogTitleColor</item> 121 <item name="android:textAppearance">@style/PickerProfileDialogTitle</item> 122 </style> 123 124 <style name="MaterialAlertDialogBodyStyle" 125 parent="@style/MaterialAlertDialog.MaterialComponents.Body.Text"> 126 <item name="android:layout_width">match_parent</item> 127 <item name="android:layout_height">wrap_content</item> 128 <item name="android:textColor">?attr/pickerProfileDialogBodyColor</item> 129 <item name="android:textAppearance">@style/PickerProfileDialogBody</item> 130 </style> 131 132 <style name="MaterialAlertDialogIconStyle" 133 parent="@style/MaterialAlertDialog.MaterialComponents.Title.Icon.CenterStacked"> 134 <item name="android:tint">?attr/pickerProfileDialogButtonAndIconColor</item> 135 <item name="android:importantForAccessibility">no</item> 136 <item name="android:layout_width">@dimen/picker_profile_dialog_icon_width</item> 137 <item name="android:layout_height">@dimen/picker_profile_dialog_icon_height</item> 138 </style> 139 140 <!-- Sets the style for the dismiss and action buttons in picker banner --> 141 <style name="PickerBannerButtonTheme" 142 parent = "@style/Widget.Material3.Button.TextButton"> 143 <item name="android:layout_width">wrap_content</item> 144 <item name="android:layout_height">wrap_content</item> 145 <item name="android:textSize">@dimen/picker_banner_button_text_size</item> 146 <item name="android:letterSpacing">@dimen/picker_banner_button_text_letter_spacing</item> 147 <item name="android:textColor">?attr/pickerBannerButtonTextColor</item> 148 </style> 149 150 <!-- Sets the style of the progress dialog shown after selecting the media using the picker --> 151 <style name="SelectedMediaPreloaderDialogTheme" 152 parent="@style/ThemeOverlay.MaterialComponents.MaterialAlertDialog.Centered"> 153 <item name="android:textColor">?attr/colorOnSurfaceVariant</item> 154 <item name="materialAlertDialogTitleTextStyle">@style/AlertDialogTitleStyle</item> 155 </style> 156 157 <!-- Sets text attributes for SelectedMediaPreloaderDialogTheme --> 158 <style name="AlertDialogTitleStyle" 159 parent="@style/MaterialAlertDialog.MaterialComponents.Title.Text.CenterStacked"> 160 <item name="android:textColor">?attr/colorOnSurface</item> 161 </style> 162 163 <!-- Sets the style of the cancel button of the selected media progress dialog --> 164 <style name="ProgressDialogCancelButtonStyle" 165 parent="@style/Widget.MaterialComponents.Button.TextButton"> 166 <item name="android:textColor">?attr/colorOnSurface</item> 167 </style> 168 169 <!-- 170 TODO(b/309578419): Make activities handle insets properly and then remove this. 171 --> 172 <style name="OptOutEdgeToEdgeEnforcement" /> 173 174</resources> 175