mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-06 09:08:52 -06:00
Add fields reminder_hour and reminder_min to habits
This commit is contained in:
41
res/layout/date_picker_dialog.xml
Normal file
41
res/layout/date_picker_dialog.xml
Normal file
@@ -0,0 +1,41 @@
|
||||
<?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_component_width"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/date_picker_view_animator"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/selected_calendar_layout_height"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<include layout="@layout/date_picker_selected_date" />
|
||||
</LinearLayout>
|
||||
|
||||
<include layout="@layout/date_picker_view_animator" />
|
||||
|
||||
<View
|
||||
android:layout_width="@dimen/date_picker_component_width"
|
||||
android:layout_height="1dip"
|
||||
android:background="@color/line_background" />
|
||||
|
||||
<include layout="@layout/date_picker_done_button" />
|
||||
|
||||
</LinearLayout>
|
||||
43
res/layout/date_picker_done_button.xml
Normal file
43
res/layout/date_picker_done_button.xml
Normal file
@@ -0,0 +1,43 @@
|
||||
<?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="@dimen/date_picker_component_width"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<Button
|
||||
android:id="@+id/clear"
|
||||
style="?android:attr/buttonBarButtonStyle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:minHeight="48dp"
|
||||
android:text="Clear"
|
||||
android:textSize="@dimen/done_label_size"
|
||||
android:textColor="@color/done_text_color" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/done"
|
||||
style="?android:attr/buttonBarButtonStyle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:minHeight="48dp"
|
||||
android:text="@string/done_label"
|
||||
android:textSize="@dimen/done_label_size"
|
||||
android:textColor="@color/done_text_color" />
|
||||
</LinearLayout>
|
||||
26
res/layout/date_picker_header_view.xml
Normal file
26
res/layout/date_picker_header_view.xml
Normal file
@@ -0,0 +1,26 @@
|
||||
<?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.
|
||||
-->
|
||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/date_picker_header"
|
||||
android:layout_width="@dimen/date_picker_component_width"
|
||||
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"
|
||||
android:importantForAccessibility="no" />
|
||||
70
res/layout/date_picker_selected_date.xml
Normal file
70
res/layout/date_picker_selected_date.xml
Normal file
@@ -0,0 +1,70 @@
|
||||
<?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="@dimen/date_picker_component_width"
|
||||
android:layout_height="0dip"
|
||||
android:layout_weight="1"
|
||||
android:background="@color/white"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<com.android.datetimepicker.AccessibleLinearLayout
|
||||
android:id="@+id/date_picker_month_and_day"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:clickable="true"
|
||||
android:orientation="vertical"
|
||||
android:textColor="@color/date_picker_selector" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/date_picker_month"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:duplicateParentState="true"
|
||||
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:duplicateParentState="true"
|
||||
android:gravity="center"
|
||||
android:includeFontPadding="false"
|
||||
android:textColor="@color/date_picker_selector"
|
||||
android:textSize="@dimen/selected_date_day_size" />
|
||||
</com.android.datetimepicker.AccessibleLinearLayout>
|
||||
|
||||
<com.android.datetimepicker.AccessibleTextView
|
||||
android:id="@+id/date_picker_year"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center_horizontal|top"
|
||||
android:includeFontPadding="false"
|
||||
android:textColor="@color/date_picker_selector"
|
||||
android:textSize="@dimen/selected_date_year_size" />
|
||||
|
||||
</LinearLayout>
|
||||
22
res/layout/date_picker_view_animator.xml
Normal file
22
res/layout/date_picker_view_animator.xml
Normal file
@@ -0,0 +1,22 @@
|
||||
<?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.AccessibleDateAnimator
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/animator"
|
||||
android:layout_width="@dimen/date_picker_component_width"
|
||||
android:layout_height="@dimen/date_picker_view_animator_height"
|
||||
android:gravity="center"
|
||||
android:background="@color/date_picker_view_animator" />
|
||||
@@ -56,19 +56,22 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center">
|
||||
android:gravity="start">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:width="80dp"
|
||||
android:gravity="right"
|
||||
android:paddingRight="9dp"
|
||||
android:text="Repeat " />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/input_freq_num"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="7"
|
||||
android:text="3"
|
||||
android:maxLength="2"
|
||||
android:inputType="number"
|
||||
android:gravity="center"
|
||||
@@ -96,6 +99,30 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:text=" days" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/reminedPanel"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/TextView2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="right"
|
||||
android:paddingRight="9dp"
|
||||
android:text="Reminder"
|
||||
android:width="80dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/input_reminder_time"
|
||||
style="@android:style/Widget.DeviceDefault.Light.Spinner"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="12dp"
|
||||
android:text="" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
|
||||
119
res/layout/time_header_label.xml
Normal file
119
res/layout/time_header_label.xml
Normal file
@@ -0,0 +1,119 @@
|
||||
<?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
|
||||
-->
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/time_display"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:background="@color/white" >
|
||||
<View
|
||||
android:id="@+id/center_view"
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="1dp"
|
||||
android:background="#00000000"
|
||||
android:layout_centerInParent="true"
|
||||
android:visibility="invisible"
|
||||
android:importantForAccessibility="no" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/hour_space"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/time_placeholder"
|
||||
android:layout_toLeftOf="@+id/separator"
|
||||
android:layout_centerVertical="true"
|
||||
android:visibility="invisible"
|
||||
style="@style/time_label"
|
||||
android:importantForAccessibility="no" />
|
||||
<FrameLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignRight="@+id/hour_space"
|
||||
android:layout_alignLeft="@+id/hour_space"
|
||||
android:layout_marginLeft="@dimen/extra_time_label_margin"
|
||||
android:layout_marginRight="@dimen/extra_time_label_margin"
|
||||
android:layout_centerVertical="true" >
|
||||
<com.android.datetimepicker.AccessibleTextView
|
||||
android:id="@+id/hours"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/time_placeholder"
|
||||
android:textColor="@color/blue"
|
||||
android:gravity="center_horizontal"
|
||||
android:layout_gravity="center"
|
||||
style="@style/time_label" />
|
||||
</FrameLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/separator"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/time_separator"
|
||||
android:paddingLeft="@dimen/separator_padding"
|
||||
android:paddingRight="@dimen/separator_padding"
|
||||
android:layout_alignRight="@+id/center_view"
|
||||
android:layout_centerVertical="true"
|
||||
style="@style/time_label"
|
||||
android:importantForAccessibility="no" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/minutes_space"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/time_placeholder"
|
||||
android:layout_toRightOf="@+id/separator"
|
||||
android:layout_centerVertical="true"
|
||||
android:visibility="invisible"
|
||||
style="@style/time_label"
|
||||
android:importantForAccessibility="no" />
|
||||
<FrameLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignRight="@+id/minutes_space"
|
||||
android:layout_alignLeft="@+id/minutes_space"
|
||||
android:layout_marginLeft="@dimen/extra_time_label_margin"
|
||||
android:layout_marginRight="@dimen/extra_time_label_margin"
|
||||
android:layout_centerVertical="true" >
|
||||
<com.android.datetimepicker.AccessibleTextView
|
||||
android:id="@+id/minutes"
|
||||
style="@style/time_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="@string/time_placeholder"
|
||||
android:layout_gravity="center" />
|
||||
</FrameLayout>
|
||||
<com.android.datetimepicker.AccessibleTextView
|
||||
android:id="@+id/ampm_hitspace"
|
||||
android:layout_width="@dimen/ampm_label_size"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignLeft="@+id/ampm_label"
|
||||
android:layout_alignRight="@+id/ampm_label" />
|
||||
<TextView
|
||||
android:id="@+id/ampm_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/time_placeholder"
|
||||
android:paddingLeft="@dimen/ampm_left_padding"
|
||||
android:paddingRight="@dimen/ampm_left_padding"
|
||||
android:layout_toRightOf="@+id/minutes_space"
|
||||
android:layout_alignBaseline="@+id/separator"
|
||||
style="@style/ampm_label"
|
||||
android:importantForAccessibility="no" />
|
||||
</RelativeLayout>
|
||||
81
res/layout/time_picker_dialog.xml
Normal file
81
res/layout/time_picker_dialog.xml
Normal file
@@ -0,0 +1,81 @@
|
||||
<?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/time_picker_dialog"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:focusable="true"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/time_display_background"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white" >
|
||||
|
||||
<include
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/header_height"
|
||||
android:layout_gravity="center"
|
||||
layout="@layout/time_header_label" />
|
||||
</FrameLayout>
|
||||
|
||||
<com.android.datetimepicker.time.RadialPickerLayout
|
||||
android:id="@+id/time_picker"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/picker_dimen"
|
||||
android:layout_gravity="center"
|
||||
android:background="@color/circle_background"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true" />
|
||||
|
||||
<View
|
||||
android:id="@+id/line"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dip"
|
||||
android:background="@color/line_background" />
|
||||
|
||||
<LinearLayout
|
||||
style="?android:attr/buttonBarStyle"
|
||||
android:layout_width="@dimen/date_picker_component_width"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<Button
|
||||
android:id="@+id/clear_button"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/done_background_color"
|
||||
android:minHeight="48dp"
|
||||
android:text="@string/clear_label"
|
||||
android:textColor="@color/done_text_color"
|
||||
android:textSize="@dimen/done_label_size" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/done_button"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/done_background_color"
|
||||
android:minHeight="48dp"
|
||||
android:text="@string/done_label"
|
||||
android:textColor="@color/done_text_color"
|
||||
android:textSize="@dimen/done_label_size" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
24
res/layout/year_label_text_view.xml
Normal file
24
res/layout/year_label_text_view.xml
Normal file
@@ -0,0 +1,24 @@
|
||||
<?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.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/year_label_height"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/date_picker_year_selector"
|
||||
android:textSize="@dimen/year_label_text_size" />
|
||||
Reference in New Issue
Block a user