diff options
Diffstat (limited to 'res')
-rw-r--r-- | res/color/date_picker_selector.xml | 23 | ||||
-rw-r--r-- | res/layout-land/date_picker_dialog.xml | 57 | ||||
-rw-r--r-- | res/layout/date_picker_dialog.xml | 40 | ||||
-rw-r--r-- | res/layout/date_picker_done_button.xml | 29 | ||||
-rw-r--r-- | res/layout/date_picker_selected_date.xml | 67 | ||||
-rw-r--r-- | res/layout/month_text_view.xml | 25 | ||||
-rw-r--r-- | res/values-land/dimens.xml | 2 | ||||
-rw-r--r-- | res/values-sw600dp-land/dimens.xml | 8 | ||||
-rw-r--r-- | res/values-sw600dp/dimens.xml | 26 | ||||
-rw-r--r-- | res/values/colors.xml | 34 | ||||
-rw-r--r-- | res/values/dimens.xml | 53 | ||||
-rw-r--r-- | res/values/strings.xml | 2 | ||||
-rw-r--r-- | res/values/styles.xml | 2 |
13 files changed, 339 insertions, 29 deletions
diff --git a/res/color/date_picker_selector.xml b/res/color/date_picker_selector.xml new file mode 100644 index 0000000..0d373eb --- /dev/null +++ b/res/color/date_picker_selector.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2013 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/selected_text"/> + <item android:state_selected="true" android:color="@color/selected_text"/> + <item android:state_pressed="false" android:state_selected="false" + android:color="@color/calendar_selected_date_text"/> + +</selector>
\ No newline at end of file diff --git a/res/layout-land/date_picker_dialog.xml b/res/layout-land/date_picker_dialog.xml new file mode 100644 index 0000000..22d4e6c --- /dev/null +++ b/res/layout-land/date_picker_dialog.xml @@ -0,0 +1,57 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2013 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/date_picker_dialog_height" + android:gravity="center" + android:orientation="horizontal" > + + <LinearLayout + android:layout_width="@dimen/date_picker_width" + android:layout_height="@dimen/date_picker_dialog_height" + android:layout_gravity="center" + android:orientation="vertical" + android:background="@color/white" > + + <include layout="@layout/date_picker_selected_date" /> + + <View + android:layout_width="match_parent" + android:layout_height="1dip" + android:background="@color/black_20" /> + + <include layout="@layout/date_picker_done_button" /> + </LinearLayout> + + <View + android:layout_width="1dip" + android:layout_height="match_parent" + android:background="@color/black_20" /> + + <FrameLayout + android:layout_width="@dimen/pager_width" + android:layout_height="match_parent" + android:background="@color/calendar_pager" + android:layout_gravity="center"> + + <android.support.v4.view.ViewPager + android:id="@+id/pager" + android:layout_width="@dimen/pager_width" + android:layout_height="@dimen/pager_height" + android:layout_gravity="center" + android:gravity="center" /> + </FrameLayout> +</LinearLayout>
\ No newline at end of file diff --git a/res/layout/date_picker_dialog.xml b/res/layout/date_picker_dialog.xml new file mode 100644 index 0000000..ece59fc --- /dev/null +++ b/res/layout/date_picker_dialog.xml @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2013 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="@dimen/date_picker_width" + android:layout_height="match_parent" + android:gravity="center" + android:orientation="vertical" + android:background="@color/calendar_pager" > + + <include layout="@layout/date_picker_selected_date" + android:id="@+id/date_picker_selected_date_layout" /> + + <android.support.v4.view.ViewPager + android:id="@+id/pager" + android:layout_width="@dimen/pager_width" + android:layout_height="@dimen/pager_height" + android:gravity="center" + android:background="@color/calendar_pager" /> + + <View + android:layout_width="match_parent" + android:layout_height="1dip" + android:background="@color/black_20" /> + + <include layout="@layout/date_picker_done_button" + android:id="@+id/date_picker_done_button" /> +</LinearLayout>
\ No newline at end of file diff --git a/res/layout/date_picker_done_button.xml b/res/layout/date_picker_done_button.xml new file mode 100644 index 0000000..8d61f4b --- /dev/null +++ b/res/layout/date_picker_done_button.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2013 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" + style="?android:attr/buttonBarStyle" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout="@+id/done_layout" + android:orientation="vertical" > + + <Button + android:id="@+id/done" + style="?android:attr/buttonBarButtonStyle" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/done_label" /> +</LinearLayout> diff --git a/res/layout/date_picker_selected_date.xml b/res/layout/date_picker_selected_date.xml new file mode 100644 index 0000000..639a7a8 --- /dev/null +++ b/res/layout/date_picker_selected_date.xml @@ -0,0 +1,67 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (C) 2013 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_selected_date_layout" + android:layout_width="match_parent" + android:layout_height="@dimen/selected_date_layout_height" + android:layout_gravity="center" + android:background="@color/white" + android:orientation="vertical" > + + <TextView + android:id="@+id/date_picker_header" + android:layout_width="match_parent" + android:layout_height="@dimen/date_picker_header_height" + android:background="@color/calendar_header" + android:gravity="center" + android:includeFontPadding="false" + android:textColor="@color/white" + android:textSize="@dimen/date_picker_header_text_size" /> + + <TextView + android:id="@+id/date_picker_month" + android:layout_width="match_parent" + android:layout_height="0dip" + android:layout_weight="1" + android:gravity="center_horizontal|bottom" + android:includeFontPadding="false" + android:textColor="@color/date_picker_selector" + android:textSize="@dimen/selected_date_month_size" /> + + <TextView + android:id="@+id/date_picker_day" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_gravity="center" + android:layout_marginBottom="-10dip" + android:layout_marginTop="-10dip" + android:gravity="center" + android:includeFontPadding="false" + android:textColor="@color/date_picker_selector" + android:textSize="@dimen/selected_date_day_size" /> + + <TextView + android:id="@+id/date_picker_year" + android:layout_width="match_parent" + android:layout_height="0dip" + android:layout_weight="1" + android:gravity="center_horizontal|top" + android:includeFontPadding="false" + android:textColor="@color/date_picker_selector" + android:textSize="@dimen/selected_date_year_size" /> + +</LinearLayout>
\ No newline at end of file diff --git a/res/layout/month_text_view.xml b/res/layout/month_text_view.xml new file mode 100644 index 0000000..df2bfde --- /dev/null +++ b/res/layout/month_text_view.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2013 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.datetimepicker.date.SelectableTextView + 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:layout_gravity="center" + android:gravity="center" + android:padding="@dimen/month_list_item_padding" + android:textColor="@color/calendar_day_number" + android:textSize="@dimen/month_list_item_size" /> diff --git a/res/values-land/dimens.xml b/res/values-land/dimens.xml index c8e4f98..09cf316 100644 --- a/res/values-land/dimens.xml +++ b/res/values-land/dimens.xml @@ -20,6 +20,8 @@ <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2" xmlns:android="http://schemas.android.com/apk/res/android" > + <dimen name="dialog_height">300dip</dimen> <dimen name="left_side_width">270dip</dimen> + <dimen name="date_picker_dialog_height">282dip</dimen> </resources>
\ No newline at end of file diff --git a/res/values-sw600dp-land/dimens.xml b/res/values-sw600dp-land/dimens.xml index 70c7b73..58a6c67 100644 --- a/res/values-sw600dp-land/dimens.xml +++ b/res/values-sw600dp-land/dimens.xml @@ -17,9 +17,9 @@ */ --> -<resources - xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2" - xmlns:android="http://schemas.android.com/apk/res/android" > +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2" + xmlns:android="http://schemas.android.com/apk/res/android"> + <dimen name="time_label_right_padding">16sp</dimen> <dimen name="time_label_size">64sp</dimen> <dimen name="ampm_label_size">21sp</dimen> @@ -28,4 +28,6 @@ <dimen name="separator_padding">5dip</dimen> <dimen name="header_height">96dip</dimen> <dimen name="footer_height">48dip</dimen> + <dimen name="date_picker_dialog_height">410dip</dimen> + </resources>
\ No newline at end of file diff --git a/res/values-sw600dp/dimens.xml b/res/values-sw600dp/dimens.xml index 7efc81d..83bea40 100644 --- a/res/values-sw600dp/dimens.xml +++ b/res/values-sw600dp/dimens.xml @@ -17,9 +17,9 @@ */ --> -<resources - xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2" - xmlns:android="http://schemas.android.com/apk/res/android" > +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2" + xmlns:android="http://schemas.android.com/apk/res/android"> + <dimen name="time_label_right_padding">34sp</dimen> <dimen name="time_label_size">96sp</dimen> <dimen name="ampm_label_size">32sp</dimen> @@ -28,4 +28,24 @@ <dimen name="separator_padding">8dip</dimen> <dimen name="header_height">144dip</dimen> <dimen name="footer_height">72dip</dimen> + + <dimen name="pager_height">400dp</dimen> + <dimen name="pager_width">400dp</dimen> + <dimen name="date_picker_width">400dp</dimen> + <dimen name="selected_date_layout_height">360dp</dimen> + <dimen name="done_button_height">42dp</dimen> + <dimen name="date_picker_header_height">45dp</dimen> + <dimen name="month_list_item_header_height">75dp</dimen> + <dimen name="month_list_item_padding">24dp</dimen> + <dimen name="day_number_select_circle_radius">24dp</dimen> + <dimen name="month_select_circle_radius">36dp</dimen> + <dimen name="selected_date_year_size">45dp</dimen> + <dimen name="selected_date_day_size">150dp</dimen> + <dimen name="selected_date_month_size">45dp</dimen> + <dimen name="date_picker_header_text_size">21dp</dimen> + <dimen name="month_list_item_size">24sp</dimen> + <dimen name="month_label_size">24sp</dimen> + <dimen name="day_number_size">24sp</dimen> + <dimen name="month_day_label_text_size">15sp</dimen> + </resources>
\ No newline at end of file diff --git a/res/values/colors.xml b/res/values/colors.xml index 8ce587e..3568ed4 100644 --- a/res/values/colors.xml +++ b/res/values/colors.xml @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2013 The Android Open Source Project +<!-- + Copyright (C) 2013 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. @@ -13,8 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. --> - <resources> + <color name="white">#ffffff</color> <color name="black_03">#08000000</color> <color name="black_20">#33000000</color> @@ -22,4 +23,33 @@ <color name="black_60">#99000000</color> <color name="black_80">#CC000000</color> <color name="blue">#33b5e5</color> + + <color name="calendar_header">#999999</color> + <color name="calendar_week_labels">#FFDBDCDE</color> + <color name="calendar_pager">#FFECEDEE</color> + <color name="calendar_day_number">#FF999999</color> + <color name="calendar_selected_date_text">#FFD1D2D4</color> + <color name="done_button_color">#FFECEDEE</color> + <color name="selected_text">#FF33B5E5</color> + <color name="mini_month_bg_color">#FFFFFFFF</color> + <color name="mini_month_today_outline_color">#FF000000</color> + <color name="month_day_number">#999999</color> + <color name="month_mini_day_number">#FF000000</color> + <color name="month_day_number_other">#FF999999</color> + <color name="month_week_num_color">#FF999999</color> + <color name="month_day_names_color">#FF999999</color> + <color name="month_today_number">#FF333333</color> + <color name="month_event_color">#FF333333</color> + <color name="month_event_extra_color">#FF666666</color> + <color name="month_event_other_color">#FF666666</color> + <color name="month_event_extra_other_color">#4C999999</color> + <color name="month_saturday">#80333333</color> + <color name="month_sunday">#80333333</color> + <color name="month_grid_lines">#ffCCCCCC</color> + <color name="month_other_month_day_number">#ff939497</color> + <color name="month_other_bgcolor">#FFEEEEEE</color> + <color name="month_selected_week_bgcolor">#FFDDDDDD</color> + <color name="month_today_bgcolor">#FFFFFFFF</color> + <color name="month_bgcolor">#FFE5E5E5</color> + </resources>
\ No newline at end of file diff --git a/res/values/dimens.xml b/res/values/dimens.xml index 25090b2..affa7ba 100644 --- a/res/values/dimens.xml +++ b/res/values/dimens.xml @@ -1,25 +1,22 @@ <?xml version="1.0" encoding="utf-8"?> <!-- -/* -** Copyright 2013, 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. -*/ ---> + Copyright (C) 2013 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 -<resources - xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2" + 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. +--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2" xmlns:android="http://schemas.android.com/apk/res/android" > + <item name="circle_radius_multiplier" format="float" type="string">0.82</item> <item name="circle_radius_multiplier_24HourMode" format="float" type="string">0.85</item> <item name="selection_radius_multiplier" format="float" type="string">0.14</item> @@ -30,6 +27,7 @@ <item name="text_size_multiplier_normal" format="float" type="string">0.17</item> <item name="text_size_multiplier_inner" format="float" type="string">0.14</item> <item name="text_size_multiplier_outer" format="float" type="string">0.11</item> + <dimen name="time_label_right_padding">12sp</dimen> <dimen name="time_label_size">60sp</dimen> <dimen name="ampm_label_size">16sp</dimen> @@ -38,4 +36,23 @@ <dimen name="separator_padding">4dip</dimen> <dimen name="header_height">96dip</dimen> <dimen name="footer_height">48dip</dimen> + <dimen name="pager_height">270dp</dimen> + <dimen name="pager_width">270dp</dimen> + <dimen name="date_picker_width">270dp</dimen> + <dimen name="selected_date_layout_height">240dp</dimen> + <dimen name="done_button_height">42dp</dimen> + <dimen name="date_picker_header_height">30dp</dimen> + <dimen name="month_list_item_header_height">50dp</dimen> + <dimen name="month_list_item_padding">16dp</dimen> + <dimen name="month_day_label_text_size">10sp</dimen> + <dimen name="day_number_select_circle_radius">16dp</dimen> + <dimen name="month_select_circle_radius">24dp</dimen> + <dimen name="selected_date_year_size">30dp</dimen> + <dimen name="selected_date_day_size">100dp</dimen> + <dimen name="selected_date_month_size">30dp</dimen> + <dimen name="date_picker_header_text_size">14dp</dimen> + <dimen name="month_label_size">16sp</dimen> + <dimen name="day_number_size">16sp</dimen> + <dimen name="month_list_item_size">16sp</dimen> + </resources>
\ No newline at end of file diff --git a/res/values/strings.xml b/res/values/strings.xml index 0b46e21..e3871be 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -13,9 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. --> - <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string name="app_name">TimePicker</string> <string name="done_label">Done</string> <string name="hour_picker_description">Hours circular slider</string> <string name="minute_picker_description">Minutes circular slider</string> diff --git a/res/values/styles.xml b/res/values/styles.xml index b53c851..c8fcfa6 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -15,6 +15,7 @@ --> <resources xmlns:android="http://schemas.android.com/apk/res/android"> + <!-- Base application theme, dependent on API level. This theme is replaced by AppBaseTheme from res/values-vXX/styles.xml on newer devices. @@ -46,5 +47,4 @@ <item name="android:textAllCaps">true</item> <item name="android:textColor">@color/black_50</item> </style> - </resources>
\ No newline at end of file |