diff options
author | Fabrice Di Meglio <fdimeglio@google.com> | 2013-10-01 11:21:31 -0700 |
---|---|---|
committer | Fabrice Di Meglio <fdimeglio@google.com> | 2014-07-15 20:26:21 +0000 |
commit | bd9152f6ee156ee473f05f6f05f238605996fca4 (patch) | |
tree | 57ccd34b9e185f0a2ecf2ad8e56933b3db65a808 /core/res/res/color | |
parent | d8176941eb6466ebe26816d79b37a808103fd81d (diff) | |
download | frameworks_base-bd9152f6ee156ee473f05f6f05f238605996fca4.zip frameworks_base-bd9152f6ee156ee473f05f6f05f238605996fca4.tar.gz frameworks_base-bd9152f6ee156ee473f05f6f05f238605996fca4.tar.bz2 |
Update DatePicker widget and its related dialog
- the old DatePicker widget is still there for obvious layout compatibility reasons
- add a new delegate implementation for having a new UI
- use the new delegate only for the DatePickerDialog (which does not need to be
the same)
- added support for Theming and light/dark Themes
- added support for RTL
- added support for Accessibility
- verified support for Keyboard
- verified that CTS tests for DatePicker are passing (for both the legacy and the
new widgets)
Also added a new HapticFeedbackConstants.CALENDAR_DATE and its related code for
enabling day selection vibration
Change-Id: I256bd7c21edd8f3b910413ca15ce26d3a5ef7d9c
Diffstat (limited to 'core/res/res/color')
12 files changed, 292 insertions, 0 deletions
diff --git a/core/res/res/color/date_picker_calendar_holo_dark.xml b/core/res/res/color/date_picker_calendar_holo_dark.xml new file mode 100644 index 0000000..d29486f --- /dev/null +++ b/core/res/res/color/date_picker_calendar_holo_dark.xml @@ -0,0 +1,25 @@ +<?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. +--> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + + <item android:state_enabled="true" android:state_selected="false" + android:color="@color/datepicker_default_normal_text_color_holo_dark"/> + <item android:state_enabled="true" android:state_selected="true" + android:color="@color/holo_blue_light"/> + <item android:state_enabled="false" + android:color="@color/datepicker_default_disabled_text_color_holo_dark"/> + +</selector>
\ No newline at end of file diff --git a/core/res/res/color/date_picker_calendar_holo_light.xml b/core/res/res/color/date_picker_calendar_holo_light.xml new file mode 100644 index 0000000..776f39b --- /dev/null +++ b/core/res/res/color/date_picker_calendar_holo_light.xml @@ -0,0 +1,25 @@ +<?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. +--> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + + <item android:state_enabled="true" android:state_selected="false" + android:color="@color/datepicker_default_normal_text_color_holo_light"/> + <item android:state_enabled="true" android:state_selected="true" + android:color="@color/holo_blue_light"/> + <item android:state_enabled="false" + android:color="@color/datepicker_default_disabled_text_color_holo_light"/> + +</selector>
\ No newline at end of file diff --git a/core/res/res/color/date_picker_calendar_material_dark.xml b/core/res/res/color/date_picker_calendar_material_dark.xml new file mode 100644 index 0000000..86a0673 --- /dev/null +++ b/core/res/res/color/date_picker_calendar_material_dark.xml @@ -0,0 +1,25 @@ +<?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. +--> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + + <item android:state_enabled="true" android:state_selected="false" + android:color="@color/datepicker_default_normal_text_color_material_dark"/> + <item android:state_enabled="true" android:state_selected="true" + android:color="@color/holo_blue_light"/> + <item android:state_enabled="false" + android:color="@color/datepicker_default_disabled_text_color_material_dark"/> + +</selector>
\ No newline at end of file diff --git a/core/res/res/color/date_picker_calendar_material_light.xml b/core/res/res/color/date_picker_calendar_material_light.xml new file mode 100644 index 0000000..015eed7 --- /dev/null +++ b/core/res/res/color/date_picker_calendar_material_light.xml @@ -0,0 +1,25 @@ +<?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. +--> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + + <item android:state_enabled="true" android:state_selected="false" + android:color="@color/datepicker_default_normal_text_color_material_light"/> + <item android:state_enabled="true" android:state_selected="true" + android:color="@color/holo_blue_light"/> + <item android:state_enabled="false" + android:color="@color/datepicker_default_disabled_text_color_material_light"/> + +</selector>
\ No newline at end of file diff --git a/core/res/res/color/date_picker_selector_holo_dark.xml b/core/res/res/color/date_picker_selector_holo_dark.xml new file mode 100644 index 0000000..9e5a5bd --- /dev/null +++ b/core/res/res/color/date_picker_selector_holo_dark.xml @@ -0,0 +1,25 @@ +<?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. +--> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + + <item android:state_pressed="true" + android:color="@color/datepicker_default_pressed_text_color_holo_dark"/> + <item android:state_pressed="false" android:state_selected="true" + android:color="@color/datepicker_default_selected_text_color_holo_dark"/> + <item android:state_pressed="false" android:state_selected="false" + android:color="@color/datepicker_default_normal_text_color_holo_dark"/> + +</selector>
\ No newline at end of file diff --git a/core/res/res/color/date_picker_selector_holo_light.xml b/core/res/res/color/date_picker_selector_holo_light.xml new file mode 100644 index 0000000..bf8667c --- /dev/null +++ b/core/res/res/color/date_picker_selector_holo_light.xml @@ -0,0 +1,25 @@ +<?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. +--> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + + <item android:state_pressed="true" + android:color="@color/datepicker_default_pressed_text_color_holo_light"/> + <item android:state_pressed="false" android:state_selected="true" + android:color="@color/datepicker_default_selected_text_color_holo_light"/> + <item android:state_pressed="false" android:state_selected="false" + android:color="@color/datepicker_default_normal_text_color_holo_light"/> + +</selector>
\ No newline at end of file diff --git a/core/res/res/color/date_picker_selector_material_dark.xml b/core/res/res/color/date_picker_selector_material_dark.xml new file mode 100644 index 0000000..e407387 --- /dev/null +++ b/core/res/res/color/date_picker_selector_material_dark.xml @@ -0,0 +1,25 @@ +<?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. +--> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + + <item android:state_pressed="true" + android:color="@color/datepicker_default_pressed_text_color_material_dark"/> + <item android:state_pressed="false" android:state_selected="true" + android:color="@color/datepicker_default_selected_text_color_material_dark"/> + <item android:state_pressed="false" android:state_selected="false" + android:color="@color/datepicker_default_normal_text_color_material_dark"/> + +</selector>
\ No newline at end of file diff --git a/core/res/res/color/date_picker_selector_material_light.xml b/core/res/res/color/date_picker_selector_material_light.xml new file mode 100644 index 0000000..b4c6a47 --- /dev/null +++ b/core/res/res/color/date_picker_selector_material_light.xml @@ -0,0 +1,25 @@ +<?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. +--> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + + <item android:state_pressed="true" + android:color="@color/datepicker_default_pressed_text_color_material_light"/> + <item android:state_pressed="false" android:state_selected="true" + android:color="@color/datepicker_default_selected_text_color_material_light"/> + <item android:state_pressed="false" android:state_selected="false" + android:color="@color/datepicker_default_normal_text_color_material_light"/> + +</selector>
\ No newline at end of file diff --git a/core/res/res/color/date_picker_year_selector_holo_dark.xml b/core/res/res/color/date_picker_year_selector_holo_dark.xml new file mode 100644 index 0000000..ce519b2 --- /dev/null +++ b/core/res/res/color/date_picker_year_selector_holo_dark.xml @@ -0,0 +1,23 @@ +<?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. +--> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + + <item android:state_pressed="true" + android:color="@color/datepicker_default_pressed_text_color_holo_dark"/> + <item android:state_pressed="false" android:state_selected="false" + android:color="@color/datepicker_default_normal_text_color_holo_dark"/> + +</selector>
\ No newline at end of file diff --git a/core/res/res/color/date_picker_year_selector_holo_light.xml b/core/res/res/color/date_picker_year_selector_holo_light.xml new file mode 100644 index 0000000..c228711 --- /dev/null +++ b/core/res/res/color/date_picker_year_selector_holo_light.xml @@ -0,0 +1,23 @@ +<?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. +--> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + + <item android:state_pressed="true" + android:color="@color/datepicker_default_pressed_text_color_holo_light"/> + <item android:state_pressed="false" android:state_selected="false" + android:color="@color/datepicker_default_normal_text_color_holo_light"/> + +</selector>
\ No newline at end of file diff --git a/core/res/res/color/date_picker_year_selector_material_dark.xml b/core/res/res/color/date_picker_year_selector_material_dark.xml new file mode 100644 index 0000000..b5ff09a --- /dev/null +++ b/core/res/res/color/date_picker_year_selector_material_dark.xml @@ -0,0 +1,23 @@ +<?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. +--> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + + <item android:state_pressed="true" + android:color="@color/datepicker_default_pressed_text_color_material_dark"/> + <item android:state_pressed="false" android:state_selected="false" + android:color="@color/datepicker_default_normal_text_color_material_dark"/> + +</selector>
\ No newline at end of file diff --git a/core/res/res/color/date_picker_year_selector_material_light.xml b/core/res/res/color/date_picker_year_selector_material_light.xml new file mode 100644 index 0000000..5e329b3 --- /dev/null +++ b/core/res/res/color/date_picker_year_selector_material_light.xml @@ -0,0 +1,23 @@ +<?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. +--> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + + <item android:state_pressed="true" + android:color="@color/datepicker_default_pressed_text_color_material_light"/> + <item android:state_pressed="false" android:state_selected="false" + android:color="@color/datepicker_default_normal_text_color_material_light"/> + +</selector>
\ No newline at end of file |