summaryrefslogtreecommitdiffstats
path: root/core/res
diff options
context:
space:
mode:
authorAlan Viverette <alanv@google.com>2015-03-23 20:45:53 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-03-23 20:45:56 +0000
commit150a59330b0e74f3c6a1b2d7d377853f88cf1d07 (patch)
tree74bdb1cc275fa536b9c36b22479e230736feac22 /core/res
parentab517ef4d8c2a5829b2f1fc2c9460b7ff1231ae6 (diff)
parent0ef59ac0e57e9b99d174d4a53f7d9639357743ac (diff)
downloadframeworks_base-150a59330b0e74f3c6a1b2d7d377853f88cf1d07.zip
frameworks_base-150a59330b0e74f3c6a1b2d7d377853f88cf1d07.tar.gz
frameworks_base-150a59330b0e74f3c6a1b2d7d377853f88cf1d07.tar.bz2
Merge "Update DatePicker and CalendarView to latest Material spec"
Diffstat (limited to 'core/res')
-rw-r--r--core/res/res/color/date_picker_header_text_material.xml2
-rw-r--r--core/res/res/layout-land/date_picker_holo.xml32
-rw-r--r--core/res/res/layout-land/date_picker_material.xml49
-rw-r--r--core/res/res/layout/alert_dialog_button_bar_material.xml8
-rw-r--r--core/res/res/layout/date_picker_header_material.xml54
-rw-r--r--core/res/res/layout/date_picker_material.xml (renamed from core/res/res/layout/date_picker_holo.xml)14
-rw-r--r--core/res/res/layout/date_picker_selected_date.xml73
-rw-r--r--core/res/res/layout/date_picker_view_animator.xml21
-rw-r--r--core/res/res/layout/date_picker_view_animator_material.xml38
-rw-r--r--core/res/res/layout/year_label_text_view.xml15
-rw-r--r--core/res/res/values-land/dimens_material.xml10
-rw-r--r--core/res/res/values/attrs.xml104
-rw-r--r--core/res/res/values/dimens_material.xml24
-rw-r--r--core/res/res/values/strings.xml18
-rw-r--r--core/res/res/values/styles_material.xml70
-rwxr-xr-xcore/res/res/values/symbols.xml37
16 files changed, 312 insertions, 257 deletions
diff --git a/core/res/res/color/date_picker_header_text_material.xml b/core/res/res/color/date_picker_header_text_material.xml
index cda894b..baa8958 100644
--- a/core/res/res/color/date_picker_header_text_material.xml
+++ b/core/res/res/color/date_picker_header_text_material.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item
- android:state_selected="true"
+ android:state_activated="true"
android:color="?attr/textColorPrimaryInverse" />
<item
android:color="?attr/textColorSecondaryInverse" />
diff --git a/core/res/res/layout-land/date_picker_holo.xml b/core/res/res/layout-land/date_picker_holo.xml
deleted file mode 100644
index 991888c..0000000
--- a/core/res/res/layout-land/date_picker_holo.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2011 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.
--->
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="@dimen/datepicker_view_animator_height"
- android:gravity="center"
- android:orientation="horizontal"
- android:minWidth="@dimen/datepicker_dialog_width" >
-
- <include
- layout="@layout/date_picker_selected_date"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_weight="1" />
-
- <include layout="@layout/date_picker_view_animator" />
-
-</LinearLayout>
diff --git a/core/res/res/layout-land/date_picker_material.xml b/core/res/res/layout-land/date_picker_material.xml
new file mode 100644
index 0000000..1e711c5
--- /dev/null
+++ b/core/res/res/layout-land/date_picker_material.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2015 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.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="horizontal">
+
+ <include
+ layout="@layout/date_picker_header_material"
+ android:layout_width="168dp"
+ android:layout_height="match_parent" />
+
+ <LinearLayout
+ android:layout_width="0dp"
+ android:layout_height="match_parent"
+ android:layout_weight="1"
+ android:orientation="vertical">
+
+ <include
+ layout="@layout/date_picker_view_animator_material"
+ android:layout_width="match_parent"
+ android:layout_height="0dp"
+ android:layout_weight="1" />
+
+ <ViewStub
+ android:id="@id/buttonPanel"
+ android:layout="@layout/alert_dialog_button_bar_material"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="@dimen/day_picker_button_margin_top" />
+
+ </LinearLayout>
+
+</LinearLayout>
diff --git a/core/res/res/layout/alert_dialog_button_bar_material.xml b/core/res/res/layout/alert_dialog_button_bar_material.xml
index 891bcd5..1eea4e1 100644
--- a/core/res/res/layout/alert_dialog_button_bar_material.xml
+++ b/core/res/res/layout/alert_dialog_button_bar_material.xml
@@ -18,16 +18,16 @@
<com.android.internal.widget.ButtonBarLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/buttonPanel"
- style="?attr/buttonBarStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layoutDirection="locale"
android:orientation="horizontal"
android:paddingStart="12dp"
android:paddingEnd="12dp"
- android:paddingTop="8dp"
- android:paddingBottom="8dp"
- android:gravity="bottom">
+ android:paddingTop="4dp"
+ android:paddingBottom="4dp"
+ android:gravity="bottom"
+ style="?attr/buttonBarStyle">
<Button
android:id="@+id/button3"
diff --git a/core/res/res/layout/date_picker_header_material.xml b/core/res/res/layout/date_picker_header_material.xml
new file mode 100644
index 0000000..bda7de9
--- /dev/null
+++ b/core/res/res/layout/date_picker_header_material.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2015 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.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:id="@+id/date_picker_header"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingBottom="18dp"
+ android:paddingStart="?attr/dialogPreferredPadding"
+ android:paddingEnd="?attr/dialogPreferredPadding"
+ android:orientation="vertical"
+ tools:background="@color/accent_material_light"
+ tools:paddingStart="24dp"
+ tools:paddingEnd="24dp">
+
+ <!-- Top padding should stay on this view so that
+ the touch target is a bit larger. -->
+ <TextView
+ android:id="@+id/date_picker_header_year"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingTop="16dp"
+ android:textAppearance="@style/TextAppearance.Material.DatePicker.YearLabel"
+ tools:text="2015"
+ tools:textSize="@dimen/date_picker_year_label_size"
+ tools:textColor="@color/white" />
+
+ <TextView
+ android:id="@+id/date_picker_header_date"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:textAppearance="@style/TextAppearance.Material.DatePicker.DateLabel"
+ android:maxLines="2"
+ android:ellipsize="none"
+ tools:text="Thu, Sep 30"
+ tools:textSize="@dimen/date_picker_date_label_size"
+ tools:textColor="@color/white" />
+
+</LinearLayout>
diff --git a/core/res/res/layout/date_picker_holo.xml b/core/res/res/layout/date_picker_material.xml
index 72030ea..a1c97ff 100644
--- a/core/res/res/layout/date_picker_holo.xml
+++ b/core/res/res/layout/date_picker_material.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
- Copyright (C) 2011 The Android Open Source Project
+ Copyright (C) 2014 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.
@@ -14,17 +14,21 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="@dimen/datepicker_component_width"
+ android:layout_width="match_parent"
android:layout_height="match_parent"
- android:gravity="center"
android:orientation="vertical">
<include
- layout="@layout/date_picker_selected_date"
+ layout="@layout/date_picker_header_material"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
- <include layout="@layout/date_picker_view_animator" />
+ <include
+ layout="@layout/date_picker_view_animator_material"
+ android:layout_width="match_parent"
+ android:layout_height="0dp"
+ android:layout_weight="1" />
</LinearLayout>
diff --git a/core/res/res/layout/date_picker_selected_date.xml b/core/res/res/layout/date_picker_selected_date.xml
deleted file mode 100644
index 9becb81..0000000
--- a/core/res/res/layout/date_picker_selected_date.xml
+++ /dev/null
@@ -1,73 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2014 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.
--->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/day_picker_selector_layout"
- android:layout_width="@dimen/datepicker_component_width"
- android:layout_height="wrap_content"
- android:gravity="center"
- android:orientation="vertical">
-
- <TextView
- android:id="@+id/date_picker_header"
- android:layout_width="match_parent"
- android:layout_height="@dimen/datepicker_header_height"
- android:gravity="center"
- android:importantForAccessibility="no" />
-
- <LinearLayout
- android:id="@+id/date_picker_month_day_year_layout"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- android:layout_weight="1"
- android:paddingTop="4dp"
- android:paddingBottom="4dp"
- android:orientation="vertical"
- android:gravity="center">
-
- <LinearLayout
- android:id="@+id/date_picker_month_and_day_layout"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:clickable="true"
- android:orientation="vertical">
-
- <TextView
- android:id="@+id/date_picker_month"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:duplicateParentState="true"
- android:gravity="center" />
-
- <TextView
- android:id="@+id/date_picker_day"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="-23dp"
- android:layout_marginBottom="-20dp"
- android:duplicateParentState="true"
- android:gravity="center" />
- </LinearLayout>
-
- <TextView
- android:id="@+id/date_picker_year"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:gravity="center" />
- </LinearLayout>
-
-</LinearLayout>
diff --git a/core/res/res/layout/date_picker_view_animator.xml b/core/res/res/layout/date_picker_view_animator.xml
deleted file mode 100644
index 9085ed5..0000000
--- a/core/res/res/layout/date_picker_view_animator.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2014 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.
--->
-<com.android.internal.widget.AccessibleDateAnimator
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/animator"
- android:layout_width="@dimen/datepicker_component_width"
- android:layout_height="@dimen/datepicker_view_animator_height"
- android:gravity="center" /> \ No newline at end of file
diff --git a/core/res/res/layout/date_picker_view_animator_material.xml b/core/res/res/layout/date_picker_view_animator_material.xml
new file mode 100644
index 0000000..98ef1dd
--- /dev/null
+++ b/core/res/res/layout/date_picker_view_animator_material.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2015 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.
+-->
+
+<ViewAnimator xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/animator"
+ android:layout_width="match_parent"
+ android:layout_height="0dp"
+ android:layout_weight="1"
+ android:gravity="center">
+
+ <android.widget.DayPickerView
+ android:id="@+id/date_picker_day_picker"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:paddingStart="@dimen/day_picker_padding_horizontal"
+ android:paddingEnd="@dimen/day_picker_padding_horizontal"
+ android:paddingTop="@dimen/day_picker_padding_top" />
+
+ <android.widget.YearPickerView
+ android:id="@+id/date_picker_year_picker"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" />
+
+</ViewAnimator>
diff --git a/core/res/res/layout/year_label_text_view.xml b/core/res/res/layout/year_label_text_view.xml
index e5bd068..6240c4b 100644
--- a/core/res/res/layout/year_label_text_view.xml
+++ b/core/res/res/layout/year_label_text_view.xml
@@ -13,10 +13,11 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<android.widget.TextViewWithCircularIndicator
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/month_text_view"
- android:layout_width="match_parent"
- android:layout_height="@dimen/datepicker_year_label_height"
- android:layout_gravity="center"
- android:gravity="center" />
+<TextView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/month_text_view"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:minHeight="?attr/listPreferredItemHeightSmall"
+ android:paddingTop="12dp"
+ android:paddingBottom="12dp"
+ android:gravity="center" />
diff --git a/core/res/res/values-land/dimens_material.xml b/core/res/res/values-land/dimens_material.xml
index 379ccf6..202f4a4 100644
--- a/core/res/res/values-land/dimens_material.xml
+++ b/core/res/res/values-land/dimens_material.xml
@@ -48,4 +48,14 @@
<dimen name="timepicker_text_inset_inner">46dp</dimen>
<dimen name="timepicker_text_size_normal">14sp</dimen>
<dimen name="timepicker_text_size_inner">12sp</dimen>
+
+ <!-- Used by Material-style SimpleMonthView -->
+ <dimen name="date_picker_month_height">40dp</dimen>
+ <dimen name="date_picker_day_of_week_height">14dp</dimen>
+ <dimen name="date_picker_day_height">32dp</dimen>
+ <dimen name="date_picker_day_width">46dp</dimen>
+ <dimen name="date_picker_day_selector_radius">16dp</dimen>
+ <dimen name="day_picker_padding_horizontal">18dp</dimen>
+ <dimen name="day_picker_padding_top">0dp</dimen>
+ <dimen name="day_picker_button_margin_top">-8dp</dimen>
</resources>
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index 15797dd..b5576c5 100644
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -1036,7 +1036,7 @@
<attr name="colorSwitchThumbNormal" format="color" />
<!-- @hide The background used by framework controls. -->
- <attr name="controlBackground" format="color" />
+ <attr name="controlBackground" format="reference" />
<!-- The color applied to the edge effect on scrolling containers. -->
<attr name="colorEdgeEffect" format="color" />
@@ -4443,46 +4443,42 @@
</declare-styleable>
<declare-styleable name="DatePicker">
- <!-- The first year (inclusive), for example "1940".
- {@deprecated Use minDate instead.} -->
+ <!-- The first year (inclusive), for example "1940". {@deprecated Use minDate instead.} -->
<attr name="startYear" format="integer" />
- <!-- The last year (inclusive), for example "2010".
- {@deprecated Use maxDate instead.} -->
+ <!-- The last year (inclusive), for example "2010". {@deprecated Use maxDate instead.} -->
<attr name="endYear" format="integer" />
- <!-- Whether the spinners are shown. -->
- <attr name="spinnersShown" format="boolean" />
- <!-- Whether the calendar view is shown. -->
- <attr name="calendarViewShown" format="boolean" />
+
+ <!-- The first day of week according to {@link java.util.Calendar}. -->
+ <attr name="firstDayOfWeek" />
<!-- The minimal date shown by this calendar view in mm/dd/yyyy format. -->
<attr name="minDate" format="string" />
<!-- The maximal date shown by this calendar view in mm/dd/yyyy format. -->
<attr name="maxDate" format="string" />
- <!-- The first day of week according to {@link java.util.Calendar}. -->
- <attr name="firstDayOfWeek" />
+
+ <!-- Whether the spinners are shown. Only valid for "spinner" mode. -->
+ <attr name="spinnersShown" format="boolean" />
+ <!-- Whether the calendar view is shown. Only valid for "spinner" mode. -->
+ <attr name="calendarViewShown" format="boolean" />
+
<!-- @hide The layout of the date picker. -->
<attr name="internalLayout" format="reference" />
<!-- @hide The layout of the legacy DatePicker. -->
<attr name="legacyLayout" />
- <!-- The background color for the date selector 's day of week. -->
- <attr name="dayOfWeekBackground" format="color|reference" />
- <!-- The text color for the date selector's day of week. -->
- <attr name="dayOfWeekTextAppearance" format="reference" />
- <!-- The month's text appearance in the date selector. -->
- <attr name="headerMonthTextAppearance" format="reference" />
- <!-- The day of month's text appearance in the date selector. -->
- <attr name="headerDayOfMonthTextAppearance" format="reference" />
- <!-- The year's text appearance in the date selector. -->
- <attr name="headerYearTextAppearance" format="reference" />
- <!-- The background for the date selector. -->
+
+ <!-- The text color for the selected date header text, ex. "2014" or
+ "Tue, Mar 18". This should be a color state list where the
+ activated state will be used when the year picker or day picker is
+ active.-->
+ <attr name="headerTextColor" format="color" />
+ <!-- The background for the selected date header. -->
<attr name="headerBackground" />
+
<!-- The list year's text appearance in the list. -->
<attr name="yearListItemTextAppearance" format="reference" />
- <!-- The list year's selected circle color in the list. -->
- <attr name="yearListSelectorColor" format="color" />
+ <!-- @hide The list year's text appearance in the list when activated. -->
+ <attr name="yearListItemActivatedTextAppearance" format="reference" />
<!-- The text color list of the calendar. -->
<attr name="calendarTextColor" format="color" />
- <!-- @hide The activated background color for the calendar. -->
- <attr name="calendarDayBackgroundColor" format="color" />
<!-- Defines the look of the widget. Prior to the L release, the only choice was
spinner. As of L, with the Material theme selected, the default layout is calendar,
but this attribute can be used to force spinner to be used instead. -->
@@ -4492,6 +4488,19 @@
<!-- Date picker with calendar to select the date. -->
<enum name="calendar" value="2" />
</attr>
+
+ <!-- @deprecated The text appearance for the month (ex. May) in the selected date header. -->
+ <attr name="headerMonthTextAppearance" format="reference" />
+ <!-- @deprecated The text appearance for the day of month (ex. 28) in the selected date header. -->
+ <attr name="headerDayOfMonthTextAppearance" format="reference" />
+ <!-- The text appearance for the year (ex. 2014) in the selected date header. -->
+ <attr name="headerYearTextAppearance" format="reference" />
+ <!-- @deprecated The background color for the header's day of week. -->
+ <attr name="dayOfWeekBackground" format="color" />
+ <!-- @deprecated The text color for the header's day of week. -->
+ <attr name="dayOfWeekTextAppearance" format="reference" />
+ <!-- @deprecated The list year's selected circle color in the list. -->
+ <attr name="yearListSelectorColor" format="color" />
</declare-styleable>
<declare-styleable name="TwoLineListItem">
@@ -4709,35 +4718,42 @@
<declare-styleable name="CalendarView">
<!-- The first day of week according to {@link java.util.Calendar}. -->
<attr name="firstDayOfWeek" format="integer" />
- <!-- Whether do show week numbers. -->
- <attr name="showWeekNumber" format="boolean" />
<!-- The minimal date shown by this calendar view in mm/dd/yyyy format. -->
<attr name="minDate" />
<!-- The minimal date shown by this calendar view in mm/dd/yyyy format. -->
<attr name="maxDate" />
- <!-- The number of weeks to be shown. -->
+ <!-- The text appearance for the month and year in the calendar header. -->
+ <attr name="monthTextAppearance" format="reference" />
+ <!-- The text appearance for the week day abbreviation in the calendar header. -->
+ <attr name="weekDayTextAppearance" format="reference" />
+ <!-- The text appearance for the day numbers in the calendar grid. -->
+ <attr name="dateTextAppearance" format="reference" />
+ <!-- @hide The background color used for the day selection indicator. -->
+ <attr name="daySelectorColor" format="color" />
+ <!-- @hide The background color used for the day highlight indicator. -->
+ <attr name="dayHighlightColor" format="color" />
+ <!-- @hide Which style of calendar delegate to use. -->
+ <attr name="calendarViewMode">
+ <enum name="holo" value="0" />
+ <enum name="material" value="1" />
+ </attr>
+
+ <!-- @deprecated Whether do show week numbers. -->
+ <attr name="showWeekNumber" format="boolean" />
+ <!-- @deprecated The number of weeks to be shown. -->
<attr name="shownWeekCount" format="integer"/>
- <!-- The background color for the selected week. -->
+ <!-- @deprecated The background color for the selected week. -->
<attr name="selectedWeekBackgroundColor" format="color|reference" />
- <!-- The color for the dates of the focused month. -->
+ <!-- @deprecated The color for the dates of the focused month. -->
<attr name="focusedMonthDateColor" format="color|reference" />
- <!-- The color for the dates of an unfocused month. -->
+ <!-- @deprecated The color for the dates of an unfocused month. -->
<attr name="unfocusedMonthDateColor" format="color|reference" />
- <!-- The color for the week numbers. -->
+ <!-- @deprecated The color for the week numbers. -->
<attr name="weekNumberColor" format="color|reference" />
- <!-- The color for the separator line between weeks. -->
+ <!-- @deprecated The color for the separator line between weeks. -->
<attr name="weekSeparatorLineColor" format="color|reference" />
- <!-- Drawable for the vertical bar shown at the beginning and at the end of the selected date. -->
+ <!-- @deprecated Drawable for the vertical bar shown at the beginning and at the end of the selected date. -->
<attr name="selectedDateVerticalBar" format="reference" />
- <!-- The text appearance for the week day abbreviation of the calendar header. -->
- <attr name="weekDayTextAppearance" format="reference" />
- <!-- The text appearance for the calendar dates. -->
- <attr name="dateTextAppearance" format="reference" />
- <!-- The number of weeks to be shown. -->
- <attr name="calendarViewMode">
- <enum name="holo" value="0" />
- <enum name="material" value="1" />
- </attr>
</declare-styleable>
<declare-styleable name="NumberPicker">
diff --git a/core/res/res/values/dimens_material.xml b/core/res/res/values/dimens_material.xml
index 8d2afde..6fd39f6 100644
--- a/core/res/res/values/dimens_material.xml
+++ b/core/res/res/values/dimens_material.xml
@@ -143,9 +143,7 @@
<dimen name="timepicker_text_size_inner">12sp</dimen>
<!-- Material date picker dimensions. -->
- <dimen name="datepicker_year_picker_padding_top">8dp</dimen>
<dimen name="datepicker_year_label_height">64dp</dimen>
- <dimen name="datepicker_year_label_text_size">22dp</dimen>
<dimen name="datepicker_component_width">260dp</dimen>
<dimen name="datepicker_dialog_width">520dp</dimen>
<dimen name="datepicker_selected_date_day_size">88dp</dimen>
@@ -154,10 +152,24 @@
<dimen name="datepicker_header_height">30dp</dimen>
<dimen name="datepicker_header_text_size">14dp</dimen>
+ <dimen name="datepicker_list_year_label_size">16sp</dimen>
+ <dimen name="datepicker_list_year_activated_label_size">26sp</dimen>
+
+ <dimen name="date_picker_year_label_size">16sp</dimen>
+ <dimen name="date_picker_date_label_size">34dp</dimen>
+
<!-- Used by Material-style SimpleMonthView -->
- <dimen name="datepicker_day_number_size">12sp</dimen>
- <dimen name="datepicker_month_label_size">14sp</dimen>
- <dimen name="datepicker_month_day_label_text_size">12sp</dimen>
- <dimen name="datepicker_month_list_item_header_height">48dp</dimen>
+ <dimen name="date_picker_month_text_size">14sp</dimen>
+ <dimen name="date_picker_day_of_week_text_size">12sp</dimen>
+ <dimen name="date_picker_day_text_size">12sp</dimen>
+ <dimen name="date_picker_month_height">56dp</dimen>
+ <dimen name="date_picker_day_of_week_height">36dp</dimen>
+ <dimen name="date_picker_day_height">40dp</dimen>
+ <dimen name="date_picker_day_width">44dp</dimen>
+ <dimen name="date_picker_day_selector_radius">20dp</dimen>
+ <dimen name="day_picker_padding_horizontal">20dp</dimen>
+ <dimen name="day_picker_padding_top">6dp</dimen>
+ <dimen name="day_picker_button_margin_top">0dp</dimen>
+
<dimen name="datepicker_view_animator_height">226dp</dimen>
</resources>
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index 19cae03..7672e93 100644
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -5042,18 +5042,6 @@
<!-- Accessibility announcement for minute circular picker [CHAR LIMIT=NONE] -->
<string name="select_minutes">Select minutes</string>
- <!--
- Content description for the month and day selector in the date picker, which displays
- a selectable grid of days laid out by month.
- [CHAR LIMIT=50]
- -->
- <string name="day_picker_description">Month grid of days</string>
- <!--
- Content description for the year selector in the date picker, which displays
- a scrolling, vertical list of years.
- [CHAR LIMIT=50]
- -->
- <string name="year_picker_description">Year list</string>
<!-- Accessibility announcement for the day picker [CHAR LIMIT=NONE] -->
<string name="select_day">Select month and day</string>
<!-- Accessibility announcement for the year picker [CHAR LIMIT=NONE] -->
@@ -5079,7 +5067,11 @@
<string name="sans_serif">sans-serif</string>
<!-- DO NOT TRANSLATE -->
- <string name="day_of_week_label_typeface">sans-serif</string>
+ <string name="date_picker_month_typeface">sans-serif-medium</string>
+ <!-- DO NOT TRANSLATE -->
+ <string name="date_picker_day_of_week_typeface">sans-serif-medium</string>
+ <!-- DO NOT TRANSLATE -->
+ <string name="date_picker_day_typeface">sans-serif-medium</string>
<!-- Notify use that they are in Lock-to-app -->
<string name="lock_to_app_toast">To unpin this screen, touch and hold Back and Overview at the same time.</string>
diff --git a/core/res/res/values/styles_material.xml b/core/res/res/values/styles_material.xml
index a8ab18d..9c2f1eb 100644
--- a/core/res/res/values/styles_material.xml
+++ b/core/res/res/values/styles_material.xml
@@ -372,11 +372,13 @@ please see styles_device_defaults.xml.
<style name="TextAppearance.Material.WindowTitle" parent="TextAppearance.Material.Title" />
<style name="TextAppearance.Material.DialogWindowTitle" parent="TextAppearance.Material.Title" />
- <style name="TextAppearance.Material.CalendarViewWeekDayView" parent="TextAppearance.Material.Small">
- <item name="textStyle">bold</item>
- <item name="textColor">#505050</item>
+ <style name="TextAppearance.Material.Widget.Calendar.Day" parent="TextAppearance.Material.Caption">
+ <item name="textColor">?attr/textColorPrimaryActivated</item>
</style>
+ <style name="TextAppearance.Material.Widget.Calendar.DayOfWeek" parent="TextAppearance.Material.Caption" />
+ <style name="TextAppearance.Material.Widget.Calendar.Month" parent="TextAppearance.Material.Body2" />
+
<style name="TextAppearance.Material.TimePicker.TimeLabel" parent="TextAppearance.Material">
<item name="textSize">@dimen/timepicker_time_label_size</item>
<item name="textColor">@color/time_picker_header_text_material</item>
@@ -406,14 +408,27 @@ please see styles_device_defaults.xml.
</style>
<style name="TextAppearance.Material.DatePicker.YearLabel" parent="TextAppearance.Material">
- <item name="includeFontPadding">false</item>
<item name="textColor">@color/date_picker_header_text_material</item>
- <item name="textSize">@dimen/datepicker_selected_date_year_size</item>
+ <item name="textSize">@dimen/date_picker_year_label_size</item>
+ <item name="fontFamily">sans-serif-medium</item>
+ </style>
+
+ <style name="TextAppearance.Material.DatePicker.DateLabel" parent="TextAppearance.Material">
+ <item name="textColor">@color/date_picker_header_text_material</item>
+ <item name="textSize">@dimen/date_picker_date_label_size</item>
+ <item name="fontFamily">sans-serif-medium</item>
</style>
<style name="TextAppearance.Material.DatePicker.List.YearLabel" parent="TextAppearance.Material">
- <item name="textColor">?attr/textColorSecondaryActivated</item>
- <item name="textSize">@dimen/datepicker_year_label_text_size</item>
+ <item name="textColor">?attr/textColorPrimary</item>
+ <item name="textSize">@dimen/datepicker_list_year_label_size</item>
+ <item name="fontFamily">sans-serif</item>
+ </style>
+
+ <style name="TextAppearance.Material.DatePicker.List.YearLabel.Activated">
+ <item name="textColor">?attr/colorControlActivated</item>
+ <item name="textSize">@dimen/datepicker_list_year_activated_label_size</item>
+ <item name="fontFamily">sans-serif-medium</item>
</style>
<style name="TextAppearance.Material.Notification">
@@ -487,7 +502,8 @@ please see styles_device_defaults.xml.
<!-- Alert dialog button bar button -->
<style name="Widget.Material.Button.ButtonBar.AlertDialog" parent="Widget.Material.Button.Borderless.Colored">
<item name="minWidth">64dp</item>
- <item name="maxLines">2</item>
+ <item name="singleLine">true</item>
+ <item name="ellipsize">none</item>
<item name="minHeight">@dimen/alert_dialog_button_bar_height</item>
</style>
@@ -615,14 +631,13 @@ please see styles_device_defaults.xml.
</style>
<style name="Widget.Material.CalendarView" parent="Widget.CalendarView">
- <item name="selectedWeekBackgroundColor">#330099FF</item>
- <item name="focusedMonthDateColor">#FFFFFFFF</item>
- <item name="unfocusedMonthDateColor">#66FFFFFF</item>
- <item name="weekNumberColor">#33FFFFFF</item>
- <item name="weekSeparatorLineColor">#19FFFFFF</item>
- <item name="selectedDateVerticalBar">@drawable/day_picker_week_view_dayline_holo</item>
- <item name="weekDayTextAppearance">@style/TextAppearance.Material.CalendarViewWeekDayView</item>
<item name="calendarViewMode">material</item>
+
+ <item name="monthTextAppearance">@style/TextAppearance.Material.Widget.Calendar.Month</item>
+ <item name="weekDayTextAppearance">@style/TextAppearance.Material.Widget.Calendar.DayOfWeek</item>
+ <item name="dateTextAppearance">@style/TextAppearance.Material.Widget.Calendar.Day</item>
+ <item name="daySelectorColor">?attr/colorControlActivated</item>
+ <item name="dayHighlightColor">?attr/colorControlHighlight</item>
</style>
<style name="Widget.Material.ImageButton" parent="Widget.ImageButton">
@@ -650,7 +665,7 @@ please see styles_device_defaults.xml.
<item name="headerBackground">@drawable/time_picker_header_material</item>
<item name="numbersTextColor">?attr/textColorPrimaryActivated</item>
<item name="numbersInnerTextColor">?attr/textColorSecondaryActivated</item>
- <item name="numbersBackgroundColor">#10ffffff</item>
+ <item name="numbersBackgroundColor">#08ffffff</item>
<item name="numbersSelectorColor">?attr/colorControlActivated</item>
<item name="amPmTextColor">?attr/textColorSecondary</item>
</style>
@@ -660,17 +675,10 @@ please see styles_device_defaults.xml.
<item name="legacyLayout">@layout/date_picker_legacy_holo</item>
<item name="calendarViewShown">true</item>
<!-- Attributes for new-style DatePicker. -->
- <item name="internalLayout">@layout/date_picker_holo</item>
- <item name="dayOfWeekBackground">#10000000</item>
- <item name="dayOfWeekTextAppearance">@style/TextAppearance.Material.DatePicker.DayOfWeekLabel</item>
- <item name="headerMonthTextAppearance">@style/TextAppearance.Material.DatePicker.MonthLabel</item>
- <item name="headerDayOfMonthTextAppearance">@style/TextAppearance.Material.DatePicker.DayOfMonthLabel</item>
- <item name="headerYearTextAppearance">@style/TextAppearance.Material.DatePicker.YearLabel</item>
+ <item name="internalLayout">@layout/date_picker_material</item>
<item name="headerBackground">?attr/colorAccent</item>
<item name="yearListItemTextAppearance">@style/TextAppearance.Material.DatePicker.List.YearLabel</item>
- <item name="yearListSelectorColor">?attr/colorControlActivated</item>
- <item name="calendarTextColor">?attr/textColorSecondaryActivated</item>
- <item name="calendarDayBackgroundColor">?attr/colorControlActivated</item>
+ <item name="yearListItemActivatedTextAppearance">@style/TextAppearance.Material.DatePicker.List.YearLabel.Activated</item>
</style>
<style name="Widget.Material.ActivityChooserView" parent="Widget.ActivityChooserView">
@@ -1021,17 +1029,7 @@ please see styles_device_defaults.xml.
<style name="Widget.Material.Light.GestureOverlayView" parent="Widget.Material.GestureOverlayView"/>
<style name="Widget.Material.Light.GridView" parent="Widget.Material.GridView"/>
<style name="Widget.Material.Light.ImageButton" parent="Widget.Material.ImageButton"/>
-
- <style name="Widget.Material.Light.CalendarView" parent="Widget.CalendarView">
- <item name="selectedWeekBackgroundColor">#330066ff</item>
- <item name="focusedMonthDateColor">#FF000000</item>
- <item name="unfocusedMonthDateColor">#7F08002B</item>
- <item name="weekNumberColor">#7F080021</item>
- <item name="weekSeparatorLineColor">#7F08002A</item>
- <item name="weekDayTextAppearance">@style/TextAppearance.Material.CalendarViewWeekDayView</item>
- <item name="calendarViewMode">material</item>
- </style>
-
+ <style name="Widget.Material.Light.CalendarView" parent="Widget.Material.CalendarView" />
<style name="Widget.Material.Light.NumberPicker" parent="Widget.Material.NumberPicker"/>
<style name="Widget.Material.Light.TimePicker" parent="Widget.Material.TimePicker">
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index 203b017..c4e9e8e 100755
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -1988,7 +1988,7 @@
<java-symbol type="layout" name="time_picker_material" />
<java-symbol type="layout" name="time_picker_header_material" />
<java-symbol type="layout" name="year_label_text_view" />
- <java-symbol type="layout" name="date_picker_holo" />
+ <java-symbol type="layout" name="date_picker_material" />
<java-symbol type="id" name="time_header" />
<java-symbol type="id" name="hours" />
@@ -1999,11 +1999,8 @@
<java-symbol type="id" name="radial_picker" />
<java-symbol type="id" name="separator" />
<java-symbol type="id" name="date_picker_header" />
- <java-symbol type="id" name="date_picker_month_and_day_layout" />
- <java-symbol type="id" name="day_picker_selector_layout" />
- <java-symbol type="id" name="date_picker_month" />
- <java-symbol type="id" name="date_picker_day" />
- <java-symbol type="id" name="date_picker_year" />
+ <java-symbol type="id" name="date_picker_header_year" />
+ <java-symbol type="id" name="date_picker_header_date" />
<java-symbol type="id" name="animator" />
<java-symbol type="string" name="done_label" />
@@ -2039,19 +2036,24 @@
<java-symbol type="string" name="muted_by" />
<java-symbol type="string" name="item_is_selected" />
- <java-symbol type="string" name="day_of_week_label_typeface" />
<java-symbol type="string" name="select_day" />
- <java-symbol type="string" name="day_picker_description" />
<java-symbol type="string" name="select_year" />
- <java-symbol type="string" name="year_picker_description" />
- <java-symbol type="dimen" name="datepicker_day_number_size" />
- <java-symbol type="dimen" name="datepicker_month_label_size" />
- <java-symbol type="dimen" name="datepicker_month_day_label_text_size" />
- <java-symbol type="dimen" name="datepicker_month_list_item_header_height" />
+ <java-symbol type="string" name="date_picker_month_typeface" />
+ <java-symbol type="string" name="date_picker_day_of_week_typeface" />
+ <java-symbol type="string" name="date_picker_day_typeface" />
+ <java-symbol type="dimen" name="date_picker_month_text_size" />
+ <java-symbol type="dimen" name="date_picker_day_of_week_text_size" />
+ <java-symbol type="dimen" name="date_picker_day_text_size" />
+ <java-symbol type="dimen" name="date_picker_month_height" />
+ <java-symbol type="dimen" name="date_picker_day_height" />
+ <java-symbol type="dimen" name="date_picker_day_width" />
+ <java-symbol type="dimen" name="date_picker_day_selector_radius" />
+ <java-symbol type="id" name="date_picker_day_picker" />
+ <java-symbol type="id" name="date_picker_year_picker" />
+
<java-symbol type="dimen" name="datepicker_view_animator_height" />
<java-symbol type="dimen" name="datepicker_year_label_height" />
- <java-symbol type="dimen" name="datepicker_year_picker_padding_top" />
<java-symbol type="array" name="config_clockTickVibePattern" />
<java-symbol type="array" name="config_calendarDateVibePattern" />
@@ -2115,7 +2117,6 @@
<java-symbol type="id" name="transitionTransform" />
<java-symbol type="id" name="parentMatrix" />
<java-symbol type="bool" name="config_auto_attach_data_on_creation" />
- <java-symbol type="id" name="date_picker_month_day_year_layout" />
<java-symbol type="attr" name="closeItemLayout" />
<java-symbol type="layout" name="resolver_different_item_header" />
<java-symbol type="array" name="config_default_vm_number" />
@@ -2167,4 +2168,10 @@
<java-symbol type="integer" name="config_screen_magnification_multi_tap_adjustment" />
<java-symbol type="dimen" name="config_screen_magnification_scaling_threshold" />
<java-symbol type="dimen" name="timepicker_selector_stroke"/>
+
+ <java-symbol type="style" name="TextAppearance.Material.Widget.Calendar.Month" />
+ <java-symbol type="style" name="TextAppearance.Material.Widget.Calendar.DayOfWeek" />
+ <java-symbol type="style" name="TextAppearance.Material.Widget.Calendar.Day" />
+ <java-symbol type="dimen" name="day_picker_padding_top"/>
+ <java-symbol type="dimen" name="date_picker_day_of_week_height"/>
</resources>