@@ -36,19 +36,97 @@ Add the dependency
3636- [x] Title sections
3737- [x] Action dialog
3838- [x] Calendars
39+ - [x] Tasks to combine or not with calendars
3940
4041
4142
4243## Next 🚀
43-
44- - [ ] Tasks to combine with calendars
45- - [ ] EditTexts
46- - [ ] Notifications screen views
44+ - [ ] Chat
4745
4846I will be glad to hear your suggestions 🙏
4947
48+ ## ☝️ Tasks
49+
50+ Recycler view with two different type of tasks
51+
52+ ``` Kotlin
53+ MinimalTask (
54+ title = " Everyone loves the pepperiness of onion curry rinsed with clammy thyme." ,
55+ date = dateStart1,
56+ startTime = dateStart1,
57+ endTime = dateEnd1,
58+ topRightIcon = SimpleIconModel (
59+ ResourcesCompat .getDrawable(
60+ resources,
61+ R .drawable.streamline_interface_setting_menu_horizontal,
62+ null
63+ ), null
64+ )
65+ )
66+ ```
67+
68+ ``` Kotlin
69+ SimpleTask (
70+ title = " It is the only guarantee of life." ,
71+ description = " Cum deus assimilant, omnes brabeutaes attrahendam talis, flavum adiuratores." ,
72+ date = dateStart4,
73+ category = CategoryTaskModel (
74+ " 1" ,
75+ CircleIconModel (
76+ ResourcesCompat .getDrawable(
77+ resources,
78+ R .drawable.streamline_interface_religion_cross_1,
79+ null
80+ ), null , null
81+ )
82+ ),
83+ topRightIcon = SimpleIconModel (
84+ ResourcesCompat .getDrawable(
85+ resources,
86+ R .drawable.ic_options,
87+ null
88+ ), null
89+ ),
90+ accentButton = AccentButtonModel (
91+ text = " #Daily" ,
92+ textSize = 12f ,
93+ textStyle = TextStyle .NORMAL ,
94+ tintColor = R .color.app_colorAccent
95+ )
96+ )
97+ ```
98+
99+ ``` Kotlin
100+ private fun setList (list : List <TaskAbstract >) {
101+ if (rvAdapter == null ) {
102+ rvAdapter = RvAdapterTasks (list, object : RvAdapterTasks .TaskInteractionListener {
103+ override fun onItemClickListener () {
104+ Toast .makeText(this @CalendarActivity," On item click" , Toast .LENGTH_SHORT ).show()
105+ }
50106
51- ## Calendars
107+ override fun onTopRightIconListener () {
108+ Toast .makeText(this @CalendarActivity," On top right icon click" , Toast .LENGTH_SHORT ).show()
109+ }
110+
111+ override fun onCategoryListener () {
112+ Toast .makeText(this @CalendarActivity," On category click" , Toast .LENGTH_SHORT ).show()
113+ }
114+
115+ override fun onActionButtonListener () {
116+ Toast .makeText(this @CalendarActivity," On action button click" , Toast .LENGTH_SHORT ).show()
117+ }
118+
119+ })
120+ val llManager = LinearLayoutManager (this )
121+ rv.layoutManager = llManager
122+ rv.adapter = rvAdapter
123+ return
124+ }
125+ rvAdapter?.updateTasks(list)
126+ }
127+ ```
128+
129+ ## ☝️ Calendars
52130![ TopHorizontalCalendarWithHeader] ( /Screenshots/Calendar/clean_ui_calendar.gif )
53131
54132``` Kotlin
@@ -69,8 +147,30 @@ I will be glad to hear your suggestions 🙏
69147 / >
70148```
71149
150+ ### Combine calendar with tasks
151+ ``` Kotlin
152+ topHorizontalCalendar?.init (object :
153+ TopHorizontalCalendarWithHeader .TopHorizontalCalendarInteractionListener {
154+ override fun onDaySelected (daySelected : Int , monthSelected : Int , yearSelected : Int , tasks : List <TaskAbstract >) {
155+ Toast .makeText(
156+ this @CalendarActivity,
157+ " $daySelected - ${monthSelected + 1 } - $yearSelected " ,
158+ Toast .LENGTH_SHORT
159+ ).show()
160+ setList(tasks)
161+ }
162+
163+ override fun getTasks (
164+ monthSelected : Int ,
165+ yearSelected : Int
166+ ): List <TaskAbstract > {
167+ return getRandomTasks(monthSelected)
168+ }
169+ })
170+ ```
171+
72172
73- ## ActionDialog
173+ ## ☝️ ActionDialog
74174![ SimpleToolbar] ( /Screenshots/Dialog/clean_ui_action_dialog.gif )
75175![ SimpleToolbar] ( /Screenshots/Dialog/clean_ui_action_dialog.jpg )
76176
@@ -90,7 +190,7 @@ val dialog = ActionDialog(title = "Sed ut perspiciatis",
90190```
91191
92192
93- ## Toolbar
193+ ## ☝️ Toolbar
94194### SimpleToolbar
95195These are a few possible combinations
96196
@@ -212,7 +312,7 @@ These are a few possible combinations
212312```
213313
214314
215- ## Settings
315+ ## ☝️ Settings
216316Combine these components to get your settings UI
217317
218318| Section check box | Section action | Section subtext |
@@ -324,7 +424,7 @@ Combine these components to get your settings UI
324424
325425
326426
327- ## Other
427+ ## ☝️ Other
328428
329429### TitleSection
330430``` XML
0 commit comments