• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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:windowBackground">@color/picker_settings_background_color</item>
43        <item name="android:listPreferredItemHeightSmall">
44            @dimen/picker_settings_list_item_height
45        </item>
46        <item name="android:listPreferredItemPaddingEnd">
47            @dimen/picker_settings_list_item_padding_end
48        </item>
49    </style>
50
51    <!-- Defines the theme of the PhotoPickerActivity -->
52    <style name="PickerMaterialTheme" parent="@style/Theme.Material3.DayNight.NoActionBar">
53        <item name="materialAlertDialogTheme">@style/ProfileDialogTheme</item>
54        <item name="pickerDragBarColor">#DADCE0</item>
55        <item name="pickerHighlightColor">?android:attr/colorAccent</item>
56        <item name="pickerHighlightTextColor">@android:color/white</item>
57        <item name="pickerProfileButtonColor">#E8F0FE</item>
58        <item name="pickerDisabledProfileButtonColor">@android:color/white</item>
59        <item name="pickerProfileButtonTextColor">#0B57D0</item>
60        <item name="pickerDisabledProfileButtonTextColor">#42757575</item>
61        <item name="pickerSelectedTabBackgroundColor">#E8F0FE</item>
62        <item name="pickerSelectedTabTextColor">#185ABC</item>
63        <item name="pickerTabBackgroundColor">@color/picker_background_color</item>
64        <item name="pickerTextColor">?android:attr/textColorPrimary</item>
65        <item name="pickerSelectedColor">?android:attr/colorAccent</item>
66        <item name="pickerProfileDialogButtonAndIconColor">#1A73E8</item>
67        <item name="pickerProfileDialogTitleColor">#202124</item>
68        <item name="pickerProfileDialogBodyColor">#5F6368</item>
69        <item name="pickerProfileDialogBackgroundColor">@android:color/white</item>
70        <!-- TODO(b/195009152): Final banner colors to be updated once received -->
71        <item name="pickerBannerBackgroundColor">@color/picker_background_color</item>
72        <item name="pickerBannerStrokeColor">@android:color/white</item>
73        <item name="pickerBannerPrimaryTextColor">?android:attr/textColorSecondary</item>
74        <item name="pickerBannerSecondaryTextColor">?android:attr/textColorPrimary</item>
75        <item name="pickerBannerButtonTextColor">?android:attr/colorAccent</item>
76        <item name="categoryDefaultThumbnailColor">?attr/colorOnSurfaceVariant</item>
77        <item name="categoryDefaultThumbnailCircleColor">?attr/colorSurfaceVariant</item>
78    </style>
79
80    <!-- Sets the style of the 'view selected' button in the picker bottom bar and the
81         'selected check button' in the PreviewFragment -->
82    <style name="MaterialBorderlessButtonStyle"
83           parent="@style/Widget.MaterialComponents.Button.TextButton">
84        <item name="android:textAppearance">@style/PickerButtonTextAppearance</item>
85    </style>
86
87    <!-- Sets the style of the 'add' button in both the picker bottom bar and in the
88         PreviewFragment -->
89    <style name="MaterialButtonStyle"
90           parent="@style/Widget.MaterialComponents.Button.UnelevatedButton">
91        <item name="android:textAppearance">@style/PickerButtonTextAppearance</item>
92    </style>
93
94    <!-- Sets material alert dialog attributes in PickerMaterialTheme -->
95    <style name="ProfileDialogTheme"
96           parent="@style/ThemeOverlay.MaterialComponents.MaterialAlertDialog.Centered">
97        <item name="shapeAppearanceOverlay">@style/ShapeAppearance</item>
98        <item name="android:backgroundDimAmount">@dimen/picker_profile_dialog_scrim</item>
99        <item name="android:background">?attr/pickerProfileDialogBackgroundColor</item>
100        <item name="materialAlertDialogTitleTextStyle">@style/MaterialAlertDialogTitleStyle</item>
101        <item name="materialAlertDialogBodyTextStyle">@style/MaterialAlertDialogBodyStyle</item>
102        <item name="materialAlertDialogTitleIconStyle">@style/MaterialAlertDialogIconStyle</item>
103        <item name="buttonBarPositiveButtonStyle">@style/PositiveButtonStyle</item>
104    </style>
105
106
107    <!-- The following five styles are used to set the attributes of the shape, button and material
108         alert dialog in ProfileDialogTheme -->
109
110    <style name="ShapeAppearance">
111        <item name="cornerFamily">rounded</item>
112        <item name="cornerSize">@dimen/picker_profile_dialog_radius</item>
113    </style>
114
115    <style name="PositiveButtonStyle" parent="Widget.MaterialComponents.Button.TextButton.Dialog">
116        <item name="android:textColor">?attr/pickerProfileDialogButtonAndIconColor</item>
117    </style>
118
119    <style name="MaterialAlertDialogTitleStyle"
120           parent="@style/MaterialAlertDialog.MaterialComponents.Title.Text.CenterStacked">
121        <item name="android:textColor">?attr/pickerProfileDialogTitleColor</item>
122        <item name="android:textAppearance">@style/PickerProfileDialogTitle</item>
123    </style>
124
125    <style name="MaterialAlertDialogBodyStyle"
126           parent="@style/MaterialAlertDialog.MaterialComponents.Body.Text">
127        <item name="android:layout_width">match_parent</item>
128        <item name="android:layout_height">wrap_content</item>
129        <item name="android:textColor">?attr/pickerProfileDialogBodyColor</item>
130        <item name="android:textAppearance">@style/PickerProfileDialogBody</item>
131    </style>
132
133    <style name="MaterialAlertDialogIconStyle"
134           parent="@style/MaterialAlertDialog.MaterialComponents.Title.Icon.CenterStacked">
135        <item name="android:tint">?attr/pickerProfileDialogButtonAndIconColor</item>
136        <item name="android:importantForAccessibility">no</item>
137        <item name="android:layout_width">@dimen/picker_profile_dialog_icon_width</item>
138        <item name="android:layout_height">@dimen/picker_profile_dialog_icon_height</item>
139    </style>
140
141    <!-- Sets the style for the dismiss and action buttons in picker banner -->
142    <style name="PickerBannerButtonTheme"
143           parent = "@style/Widget.Material3.Button.TextButton">
144        <item name="android:layout_width">wrap_content</item>
145        <item name="android:layout_height">wrap_content</item>
146        <item name="android:textSize">@dimen/picker_banner_button_text_size</item>
147        <item name="android:letterSpacing">@dimen/picker_banner_button_text_letter_spacing</item>
148        <item name="android:textColor">?attr/pickerBannerButtonTextColor</item>
149    </style>
150
151    <!-- Sets the style of the progress dialog shown after selecting the media using the picker -->
152    <style name="SelectedMediaPreloaderDialogTheme"
153           parent="@style/ThemeOverlay.MaterialComponents.MaterialAlertDialog.Centered">
154        <item name="android:textColor">?attr/colorOnSurfaceVariant</item>
155        <item name="materialAlertDialogTitleTextStyle">@style/AlertDialogTitleStyle</item>
156    </style>
157
158    <!-- Sets text attributes for SelectedMediaPreloaderDialogTheme -->
159    <style name="AlertDialogTitleStyle"
160           parent="@style/MaterialAlertDialog.MaterialComponents.Title.Text.CenterStacked">
161        <item name="android:textColor">?attr/colorOnSurface</item>
162    </style>
163
164    <!-- Sets the style of the cancel button of the selected media progress dialog -->
165    <style name="ProgressDialogCancelButtonStyle"
166           parent="@style/Widget.MaterialComponents.Button.TextButton">
167        <item name="android:textColor">?attr/colorOnSurface</item>
168    </style>
169
170</resources>
171