-
Notifications
You must be signed in to change notification settings - Fork 0
/
newtask.kv
108 lines (93 loc) · 2.64 KB
/
newtask.kv
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<SubjectField>
id: subject_field
<SubjectDropDown>
id: subject_drop_down
items: app.sub_list
<SubjectTextField>
<NewTaskPage>
id: new_task_page
orientation: 'vertical'
padding: dp(10)
spacing: dp(10)
MDLabel:
text: 'New Task'
font_style: 'H5'
size_hint_y: None
size: self.texture_size
BoxLayout:
size_hint: 1, None
size: self.minimum_size
padding: dp(10), 0
spacing: 20
orientation: 'horizontal'
id: row_1
MDTextField:
hint_text: 'Task name'
mode: 'rectangle'
required: True
helper_text_mode: 'on_error'
id: task_name
MDDropDownItem:
id: task_type_dropdown
items: ['Homework', 'Worksheet', 'Quiz', 'Test', 'Project']
dropdown_bg: [1, 1, 1, 1]
MDTextField:
hint_text: 'Subject'
id: task_subject
# SubjectField:
# size_hint: None, None
# size: self.minimum_size
# SubjectDropDown:
# MDCheckbox:
# size_hint: None, None
# on_state: app.update_subject_field
MDTextField:
multiline: True
hint_text: 'Task Description'
helper_text: 'optional'
helper_text_mode: 'on_focus'
id: task_description
max_text_length: 500
GridLayout:
cols: 2
spacing: 10
MDLabel:
text: 'Date Set:'
font_style: 'Body1'
size_hint_y: 0.1
size: self.texture_size
MDLabel:
text: 'Date Due:'
font_style: 'Body1'
size_hint_y: 0.1
size: self.texture_size
MDRaisedButton:
id: date_set
text: str(root.today)
size_hint: 1, 0.5
opposite_colors: True
on_release: root.show_date_set_picker()
MDRaisedButton:
id: date_due
text: str(root.today)
elevation_normal: 2
opposite_colors: True
size_hint: 1,0.5
on_release: root.show_date_due_picker()
GridLayout:
cols: 2
#row_default_height: 40
size_hint: 1, 0.3
spacing: 10
MDRaisedButton:
text: "Cancel"
elevation_normal: 2
opposite_colors: True
size_hint: 1,1
on_release: app.changeScreen('main_app_screen')
MDRaisedButton:
text: "Save"
elevation_normal: 2
opposite_colors: True
size_hint: 1,1
on_release: root.check_data_task()