diff options
author | James Kung <kingkung@google.com> | 2013-03-08 10:58:25 -0800 |
---|---|---|
committer | James Kung <kingkung@google.com> | 2013-04-01 19:46:50 -0700 |
commit | 3e9818e0267619fecebd55095ab26c53eff92e93 (patch) | |
tree | 5d56d7a6f784078412ed876ed63ffd80b2af7fcb /res/layout | |
parent | b8f95646fc0510eebfeaa27864023d630f34090f (diff) | |
download | datetimepicker-3e9818e0267619fecebd55095ab26c53eff92e93.tar.gz |
DatePicker initial commit
Change-Id: I5e2dda38b06b76454b974e7240befd6a9316364f
Diffstat (limited to 'res/layout')
-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 |
4 files changed, 161 insertions, 0 deletions
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" /> |