Bug 1486200 - Apply Photon theme for Date/Time pickers only on API >=23; r=jchen

Fix Lollipop crashes because of android.content.res.ColorStateList.addFirstIfMissing()
The default app theme will be applied for the material Date/Time pickers on
API 21 and API 22. After this, on API >=23 they will be Photon themed.

Differential Revision: https://phabricator.services.mozilla.com/D4464

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Petru Lingurar 2018-08-29 20:00:53 +00:00
Родитель 72017bd799
Коммит 7f35fc24a2
2 изменённых файлов: 25 добавлений и 3 удалений

Просмотреть файл

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<resources>
<!--
Activity based themes for API 23+.
This theme completely replaces GeckoAppBase from res/values/themes.xml on API 23+ devices.
-->
<style name="GeckoAppBase" parent="Gecko">
<!-- Following are defaults from res/values/themes.xml#GeckoAppBase -->
<item name="android:buttonStyle">@style/Widget.Button</item>
<item name="android:dropDownItemStyle">@style/Widget.DropDownItem</item>
<item name="android:editTextStyle">@style/Widget.EditText</item>
<item name="android:textViewStyle">@style/Widget.TextView</item>
<item name="menuItemDefaultStyle">@style/Widget.MenuItemDefault</item>
<!-- Following are used to apply a Photon theme to date/time pickers only on API >=23 -->
<item name="android:timePickerStyle" >@style/PhotonTimePicker</item>
<item name="android:datePickerStyle">@style/PhotonDatePicker</item>
<item name="android:calendarViewStyle">@style/PhotonCalendarView</item>
</style>
</resources>

Просмотреть файл

@ -92,9 +92,6 @@
<item name="topSitesGridItemViewStyle">@style/Widget.TopSitesGridItemView</item>
<item name="topSitesGridViewStyle">@style/Widget.TopSitesGridView</item>
<item name="topSitesThumbnailViewStyle">@style/Widget.TopSitesThumbnailView</item>
<item name="android:timePickerStyle" tools:ignore="NewApi">@style/PhotonTimePicker</item>
<item name="android:datePickerStyle">@style/PhotonDatePicker</item>
<item name="android:calendarViewStyle">@style/PhotonCalendarView</item>
</style>
<!-- Make an activity appear like an overlay. -->