1 00:00:04,640 --> 00:00:06,650 Alright so we've now created the 2 00:00:06,650 --> 00:00:09,230 layouts that we'll need to add new tasks 3 00:00:09,230 --> 00:00:11,510 and display them in a list. Now it's time 4 00:00:11,510 --> 00:00:13,459 to write the code that makes it happen. 5 00:00:13,459 --> 00:00:15,709 One common approach when dealing with 6 00:00:15,709 --> 00:00:17,869 records from a database, or from anywhere 7 00:00:17,869 --> 00:00:20,240 really, is to create a simple data class 8 00:00:20,240 --> 00:00:22,490 to store the fields. So I'm going to 9 00:00:22,490 --> 00:00:23,930 start by doing something like that, so 10 00:00:23,930 --> 00:00:26,960 we're going to click on our package, New go in 11 00:00:26,960 --> 00:00:29,750 to select Kotlin/File class. I'm going 12 00:00:29,750 --> 00:00:31,550 to type in the name Task - we'll call it 13 00:00:31,550 --> 00:00:33,950 Task. I'm going to use the drop-down and 14 00:00:33,950 --> 00:00:36,140 choose class rather than file, and press 15 00:00:36,140 --> 00:00:37,120 Enter, 16 00:00:37,120 --> 00:00:39,170 and then I'm going to add the word data 17 00:00:39,170 --> 00:00:41,870 before the class definition. So data 18 00:00:41,870 --> 00:00:44,480 class Task, and I'll talk about what that 19 00:00:44,480 --> 00:00:46,579 means in a short while. Now we're going 20 00:00:46,579 --> 00:00:48,260 to want to pass instances of this class 21 00:00:48,260 --> 00:00:51,020 around in bundles, so for that reason we 22 00:00:51,020 --> 00:00:53,300 need to make it serializable or parcelable. 23 00:00:53,300 --> 00:00:55,040 Now if you remember we did this 24 00:00:55,040 --> 00:00:57,980 with our basic photo class in the Flickr 25 00:00:57,980 --> 00:01:00,020 browser app, and we talked about these 26 00:01:00,020 --> 00:01:01,940 interfaces then. Now since we recorded 27 00:01:01,940 --> 00:01:04,188 that video, Kotlin has improved even 28 00:01:04,188 --> 00:01:06,950 further. So it now directly supports 29 00:01:06,950 --> 00:01:09,229 implementing the parcelable interface 30 00:01:09,229 --> 00:01:12,260 for us, and now it's so easy to do that 31 00:01:12,260 --> 00:01:14,450 serializable probably won't be used in 32 00:01:14,450 --> 00:01:16,820 Kotlin from now on. It's still there if 33 00:01:16,820 --> 00:01:18,440 you get performance problems with 34 00:01:18,440 --> 00:01:20,770 parcelable, but when you see just how easy 35 00:01:20,770 --> 00:01:23,750 implementing parcelable is, I suspect that 36 00:01:23,750 --> 00:01:25,159 most developers won't even consider 37 00:01:25,159 --> 00:01:28,010 serializable. So what we want here is a 38 00:01:28,010 --> 00:01:30,619 basic data class that implements the 39 00:01:30,619 --> 00:01:33,350 parcelable interface. Alright so let's go 40 00:01:33,350 --> 00:01:36,080 ahead and set this up for our tasks. So 41 00:01:36,080 --> 00:01:38,720 on the class definition line I'm going 42 00:01:38,720 --> 00:01:44,600 to adds parentheses var id: Long val 43 00:01:44,600 --> 00:01:49,880 name: String, val description: 44 00:01:49,880 --> 00:01:55,700 String and then val sortOrder: Int 45 00:01:55,700 --> 00:01:57,979 capital I. And then we're implementing 46 00:01:57,979 --> 00:01:59,659 Parcelable as I mentioned, so 47 00:01:59,659 --> 00:02:04,610 colon Parcelable, and you can see there 48 00:02:04,610 --> 00:02:06,259 Android Studio automatically takes care of 49 00:02:06,259 --> 00:02:08,360 importing android.os.parcelable. 50 00:02:08,360 --> 00:02:10,549 Alright so we've seen that before, and 51 00:02:10,549 --> 00:02:12,860 the next step then was to implement all 52 00:02:12,860 --> 00:02:14,900 the methods of the Parcelable 53 00:02:14,900 --> 00:02:17,150 interface. But now things have changed so we 54 00:02:17,150 --> 00:02:18,230 just need a simple 55 00:02:18,230 --> 00:02:19,970 annotation. I want to go ahead and add 56 00:02:19,970 --> 00:02:26,390 that annotation, so it's Parcelize, P a r c e l i z e, 57 00:02:26,390 --> 00:02:28,099 and of course it's an @ at the start 58 00:02:28,099 --> 00:02:30,620 of it because it's an annotation. Now I'm 59 00:02:30,620 --> 00:02:32,930 recording this video using version 1.2 60 00:02:32,930 --> 00:02:35,510 point 50 of Kotlin, and you saw a 61 00:02:35,510 --> 00:02:37,370 few videos ago that I actually updated 62 00:02:37,370 --> 00:02:39,049 to that version. And you can check what 63 00:02:39,049 --> 00:02:40,190 version that you're actually 64 00:02:40,190 --> 00:02:41,840 running by coming down to our build 65 00:02:41,840 --> 00:02:44,120 scripts. And let me open the project Task 66 00:02:44,120 --> 00:02:46,160 Timer and you can see that at the moment I'm 67 00:02:46,160 --> 00:02:47,840 running 1.2.50. 68 00:02:47,840 --> 00:02:51,500 Now in this version, the Parcelize 69 00:02:51,500 --> 00:02:53,810 annotation is still experimental. And 70 00:02:53,810 --> 00:02:55,370 as a result if we have a look at our 71 00:02:55,370 --> 00:02:58,220 class definition for Task, we've still 72 00:02:58,220 --> 00:03:00,530 got an error that our Task class doesn't 73 00:03:00,530 --> 00:03:02,090 implement the required interface methods - 74 00:03:02,090 --> 00:03:04,310 you can see that's coming up there. We've 75 00:03:04,310 --> 00:03:05,859 also got another error, though, up here 76 00:03:05,859 --> 00:03:08,720 and it says that Parcelize is an 77 00:03:08,720 --> 00:03:11,390 unresolved reference. Now I'm showing you 78 00:03:11,390 --> 00:03:12,920 this annotation because it's going to 79 00:03:12,920 --> 00:03:15,440 make producing Parcelable classes 80 00:03:15,440 --> 00:03:18,140 much easier. JetBrains are working on it 81 00:03:18,140 --> 00:03:19,910 and I'd be very surprised if they don't 82 00:03:19,910 --> 00:03:22,430 release it very soon. Right at the moment 83 00:03:22,430 --> 00:03:24,919 though, it's experimental. Now if it 84 00:03:24,919 --> 00:03:26,480 doesn't make it into a release version 85 00:03:26,480 --> 00:03:28,639 for some reason, we've covered how to 86 00:03:28,639 --> 00:03:30,769 implement Parcelable in detail in previous 87 00:03:30,769 --> 00:03:32,959 videos. You'll need to implement the 88 00:03:32,959 --> 00:03:34,609 method yourself, but you've got 89 00:03:34,609 --> 00:03:36,889 everything you need to do that. But this 90 00:03:36,889 --> 00:03:39,169 is obviously much easier and may even 91 00:03:39,169 --> 00:03:41,269 work without enabling experimental 92 00:03:41,269 --> 00:03:44,290 features. So up here on line 9, if 93 00:03:44,290 --> 00:03:46,849 Parcelize isn't giving you errors 94 00:03:46,849 --> 00:03:48,769 when you come to watch this video, then 95 00:03:48,769 --> 00:03:50,299 there's no need to enable the 96 00:03:50,299 --> 00:03:51,950 experimental features in Android Studio 97 00:03:51,950 --> 00:03:54,410 that I'm about to do. At the moment 98 00:03:54,410 --> 00:03:55,700 though, because I've got an error there, 99 00:03:55,700 --> 00:03:57,950 we do need to enable experimental 100 00:03:57,950 --> 00:04:00,290 features. So to do that we need to open 101 00:04:00,290 --> 00:04:02,629 up our other Gradle file, the Module 102 00:04:02,629 --> 00:04:05,690 app one. We need to scroll up to the top of 103 00:04:05,690 --> 00:04:07,639 the file, under the three apply plugins 104 00:04:07,639 --> 00:04:10,660 here, and I'm going to type in android 105 00:04:10,660 --> 00:04:16,310 Extensions with a capital E there, left and 106 00:04:16,310 --> 00:04:17,720 right curly braces and 107 00:04:17,720 --> 00:04:20,560 within it I'm going to type experimental 108 00:04:20,560 --> 00:04:27,890 equals true. And we sync the project and 109 00:04:27,890 --> 00:04:30,469 that error should disappear, but if not 110 00:04:30,469 --> 00:04:32,120 there's one other thing we may have to do 111 00:04:32,120 --> 00:04:34,190 to get that error to disappear so we 112 00:04:34,190 --> 00:04:35,990 can actually use the Parcelize 113 00:04:35,990 --> 00:04:39,440 annotation. Alright so we'll just wait 114 00:04:39,440 --> 00:04:40,460 for it to finish off. 115 00:04:40,460 --> 00:04:42,560 That's finished now so I'm going to close 116 00:04:42,560 --> 00:04:44,000 off this window, go back to our Task 117 00:04:44,000 --> 00:04:46,430 class, and we've noticed we've still got 118 00:04:46,430 --> 00:04:48,139 an error here and I'll just ignore the 119 00:04:48,139 --> 00:04:50,600 IDE error that popped up. We've still got the 120 00:04:50,600 --> 00:04:52,040 same error there about Unresolved 121 00:04:52,040 --> 00:04:54,229 reference Parcelize. So you can see in 122 00:04:54,229 --> 00:04:55,699 this case, even though I said the errors 123 00:04:55,699 --> 00:04:57,919 should've gone it's still showing for 124 00:04:57,919 --> 00:04:59,990 me. And that's because there's a bug in 125 00:04:59,990 --> 00:05:01,970 the lint checker and at the moment, for 126 00:05:01,970 --> 00:05:03,680 that reason, I also have to suppress the 127 00:05:03,680 --> 00:05:06,350 check. So I'm going to just type in here, 128 00:05:06,350 --> 00:05:08,810 on the next line up to Parcelize, the 129 00:05:08,810 --> 00:05:10,550 next annotation will be the SuppressLint. 130 00:05:10,550 --> 00:05:15,560 So @SuppressLint, then in parentheses 131 00:05:15,560 --> 00:05:20,050 I'm going to type, in double quotes Parcel 132 00:05:20,050 --> 00:05:24,949 Creator, and once I type that you can see 133 00:05:24,949 --> 00:05:27,110 that Parcelize annotation is no longer 134 00:05:27,110 --> 00:05:30,260 shown as an unresolved reference. And 135 00:05:30,260 --> 00:05:31,760 there is actually an open issue for this 136 00:05:31,760 --> 00:05:34,039 at the JetBrains issue tracker. So I'm 137 00:05:34,039 --> 00:05:35,210 just going to quickly bring that up just to 138 00:05:35,210 --> 00:05:37,400 show you that it is actually a bug at 139 00:05:37,400 --> 00:05:45,729 the moment. 140 00:05:45,729 --> 00:05:47,710 So you can see there that Parcelable 141 00:05:47,710 --> 00:05:49,539 editor shows warning about 142 00:05:49,539 --> 00:05:51,099 incomplete implementation on a class with 143 00:05:51,099 --> 00:05:53,319 Parcelize annotation. That's something that 144 00:05:53,319 --> 00:05:54,849 JetBrains are clearly going to be 145 00:05:54,849 --> 00:05:57,099 working on at the moment. I'll just go 146 00:05:57,099 --> 00:06:00,159 back to Android studio. So we thought at 147 00:06:00,159 --> 00:06:01,930 the time that seemed to have been fixed. 148 00:06:01,930 --> 00:06:03,460 I'm mentioning it just in case it 149 00:06:03,460 --> 00:06:04,870 reappears when you come to watch this 150 00:06:04,870 --> 00:06:07,029 video. So it may or may not though, but just 151 00:06:07,029 --> 00:06:09,159 to be clear only add this SuppressLint 152 00:06:09,159 --> 00:06:11,770 line, so in other words only suppress 153 00:06:11,770 --> 00:06:13,900 the check, if you've still got an error 154 00:06:13,900 --> 00:06:16,059 after enabling the experimental features. 155 00:06:16,059 --> 00:06:19,149 And for that matter, only enable the 156 00:06:19,149 --> 00:06:20,919 experimental feature if you got the 157 00:06:20,919 --> 00:06:22,059 error in the first place. 158 00:06:22,059 --> 00:06:23,770 Alright, so at this point though, that's 159 00:06:23,770 --> 00:06:26,759 our class. Our data class is now Parcelable. 160 00:06:26,759 --> 00:06:28,809 Now you might be wondering there, looking 161 00:06:28,809 --> 00:06:31,059 at these four properties that we've 162 00:06:31,059 --> 00:06:33,189 defined, why three of the properties were 163 00:06:33,189 --> 00:06:35,409 set to val, or perhaps why the ID 164 00:06:35,409 --> 00:06:38,169 property is set to var instead. Now 165 00:06:38,169 --> 00:06:40,689 instances of this class will reflect a 166 00:06:40,689 --> 00:06:43,120 row in the database. So if we allow the 167 00:06:43,120 --> 00:06:45,460 properties to be changed, we could end up 168 00:06:45,460 --> 00:06:46,870 with an object having different values 169 00:06:46,870 --> 00:06:48,969 to what's stored in the corresponding 170 00:06:48,969 --> 00:06:51,310 database row. And to prevent that from 171 00:06:51,310 --> 00:06:51,879 happening 172 00:06:51,879 --> 00:06:53,800 we're not going to allow these fields to 173 00:06:53,800 --> 00:06:56,860 be changed. So if the values aren't going 174 00:06:56,860 --> 00:06:58,270 to be changed, then it makes sense to 175 00:06:58,270 --> 00:07:00,279 declare them as val so that they 176 00:07:00,279 --> 00:07:02,529 actually can't be, and it also acts as 177 00:07:02,529 --> 00:07:04,689 documentation that the behavior is 178 00:07:04,689 --> 00:07:06,909 deliberate. But with that said, why isn't 179 00:07:06,909 --> 00:07:09,969 the ID property a val? Well if you think 180 00:07:09,969 --> 00:07:11,949 about it, when we save a new task we 181 00:07:11,949 --> 00:07:14,169 don't know what the ID is until after 182 00:07:14,169 --> 00:07:16,809 it's been saved to the database. If you 183 00:07:16,809 --> 00:07:18,189 remember from when we were testing the 184 00:07:18,189 --> 00:07:20,709 ContentProvider, we get the ID returned 185 00:07:20,709 --> 00:07:22,659 when we call the insert function to save 186 00:07:22,659 --> 00:07:25,180 the record. So we do need to update the 187 00:07:25,180 --> 00:07:27,370 ID field for a new record when the 188 00:07:27,370 --> 00:07:30,399 database tells us what ID it's used. So 189 00:07:30,399 --> 00:07:31,809 that'll make more sense when you see the 190 00:07:31,809 --> 00:07:34,599 records being saved in our code later. So 191 00:07:34,599 --> 00:07:35,860 the last thing to discuss here, though, 192 00:07:35,860 --> 00:07:39,039 about that our Task class is what a data 193 00:07:39,039 --> 00:07:41,379 class is. And I've got a link I'm just 194 00:07:41,379 --> 00:07:42,729 going to bring up on the screen and it's 195 00:07:42,729 --> 00:07:43,930 actually from the Kotlin language 196 00:07:43,930 --> 00:07:45,459 reference, and it's actually quite 197 00:07:45,459 --> 00:07:52,209 informative. So basically a data class is 198 00:07:52,209 --> 00:07:55,180 intended just to hold data. When you 199 00:07:55,180 --> 00:07:57,339 create a data class you get some useful 200 00:07:57,339 --> 00:07:59,420 functions created automatically. 201 00:07:59,420 --> 00:08:01,850 So you can see you've got an equals function 202 00:08:01,850 --> 00:08:03,380 there, used to compared two instances of 203 00:08:03,380 --> 00:08:05,180 the class to check if they're equal or 204 00:08:05,180 --> 00:08:07,790 not. There's also a toString there that 205 00:08:07,790 --> 00:08:08,930 includes all the properties in the 206 00:08:08,930 --> 00:08:11,360 constructor, and these componentN 207 00:08:11,360 --> 00:08:13,880 functions can be useful. They provide a 208 00:08:13,880 --> 00:08:16,070 way to de-structure an object into 209 00:08:16,070 --> 00:08:18,350 individual variables. Now that's 210 00:08:18,350 --> 00:08:20,150 something else you get for free with a 211 00:08:20,150 --> 00:08:21,980 data class, and you can follow this link 212 00:08:21,980 --> 00:08:24,410 to componentN functions if you don't 213 00:08:24,410 --> 00:08:25,880 know what de-structuring is and want to 214 00:08:25,880 --> 00:08:28,040 learn more about it. But I'll just go 215 00:08:28,040 --> 00:08:30,200 back to that main page we're at. So 216 00:08:30,200 --> 00:08:31,850 scrolling down though, this section here, 217 00:08:31,850 --> 00:08:34,039 Properties Declared in the class body, 218 00:08:34,039 --> 00:08:36,919 this section's also worth a read. The 219 00:08:36,919 --> 00:08:38,539 functions that generated automatically, 220 00:08:38,539 --> 00:08:41,929 equals, toString hashCode and copy, will 221 00:08:41,929 --> 00:08:43,909 only use properties that we declare in 222 00:08:43,909 --> 00:08:46,640 the primary constructor. Now that can be 223 00:08:46,640 --> 00:08:49,100 useful in some cases, such as comparing a 224 00:08:49,100 --> 00:08:51,470 Task that we've just created with one 225 00:08:51,470 --> 00:08:53,870 read from the database. So if we create a 226 00:08:53,870 --> 00:08:56,180 new task object from data entered by the 227 00:08:56,180 --> 00:08:59,690 user, it won't have a valid ID. The data 228 00:08:59,690 --> 00:09:01,610 read from the database will have an ID. 229 00:09:01,610 --> 00:09:03,710 So that means that a comparison for 230 00:09:03,710 --> 00:09:06,020 equality will fail because the ID 231 00:09:06,020 --> 00:09:07,310 properties won't match. 232 00:09:07,310 --> 00:09:09,680 So if comparisons like that are something 233 00:09:09,680 --> 00:09:12,140 you need to do, then you just move the ID 234 00:09:12,140 --> 00:09:14,780 into the class body. So let's go back to 235 00:09:14,780 --> 00:09:16,730 Android Studio. So I'm going to change 236 00:09:16,730 --> 00:09:18,640 this. I'm going to actually take out the 237 00:09:18,640 --> 00:09:22,700 definition for the ID and the comma as 238 00:09:22,700 --> 00:09:25,730 well, and I'm going to put that into the body there 239 00:09:25,730 --> 00:09:27,950 with the class body, and I'm going to set 240 00:09:27,950 --> 00:09:30,590 the value of to that to be equal to zero to 241 00:09:30,590 --> 00:09:33,050 initialize it. So now the ID property 242 00:09:33,050 --> 00:09:35,750 won't be included in the equals test, and 243 00:09:35,750 --> 00:09:37,840 also won't be included for the other 244 00:09:37,840 --> 00:09:40,850 auto-generated functions. So going back 245 00:09:40,850 --> 00:09:43,640 to the definition, or the documentation 246 00:09:43,640 --> 00:09:46,660 rather, for our data class. 247 00:09:46,660 --> 00:09:49,000 There's a definition here of the copy 248 00:09:49,000 --> 00:09:51,610 function, or description, I should say, for 249 00:09:51,610 --> 00:09:53,319 the copy function, and one use for that 250 00:09:53,319 --> 00:09:54,730 could be to make a copy of the task 251 00:09:54,730 --> 00:09:56,649 before allowing the user to edit the 252 00:09:56,649 --> 00:09:58,420 details. You could then check if the 253 00:09:58,420 --> 00:10:01,120 editor task equals the original, and only 254 00:10:01,120 --> 00:10:03,130 save the task back to the database if 255 00:10:03,130 --> 00:10:03,720 they're different. 256 00:10:03,720 --> 00:10:06,730 So that's Kotlin data classes. They're 257 00:10:06,730 --> 00:10:09,160 basically just a simple ordinary class 258 00:10:09,160 --> 00:10:10,959 with some extra functions added for us, 259 00:10:10,959 --> 00:10:13,209 and they can be very useful when encapsul 260 00:10:13,209 --> 00:10:15,759 ating data such as from a database. If 261 00:10:15,759 --> 00:10:17,589 you want to do things like comparing 262 00:10:17,589 --> 00:10:19,569 different instances of the class, or copy 263 00:10:19,569 --> 00:10:21,490 instances, then certainly consider 264 00:10:21,490 --> 00:10:23,829 creating a data class. But with all that 265 00:10:23,829 --> 00:10:26,050 said, I'm not going to use one in our app 266 00:10:26,050 --> 00:10:28,449 though. In fact that's why I've included 267 00:10:28,449 --> 00:10:30,910 this discussion of them here. Kotlin 268 00:10:30,910 --> 00:10:32,709 provides them and they can indeed be 269 00:10:32,709 --> 00:10:35,019 very useful, but generally we don't get 270 00:10:35,019 --> 00:10:36,699 anything for free and there's a downside 271 00:10:36,699 --> 00:10:39,940 to data classes. If you don't intend 272 00:10:39,940 --> 00:10:41,920 testing for equality, or copying them or 273 00:10:41,920 --> 00:10:43,750 de-structuring them, then you've got a class 274 00:10:43,750 --> 00:10:45,670 with all that extra overhead that you 275 00:10:45,670 --> 00:10:48,190 are not going to use. Now looking at 276 00:10:48,190 --> 00:10:49,750 the URL for this website up here, in the 277 00:10:49,750 --> 00:10:50,680 top left hand corner, 278 00:10:50,680 --> 00:10:53,680 it's kotlinlang.org. So this is 279 00:10:53,680 --> 00:10:55,779 documentation about the Kotlin language 280 00:10:55,779 --> 00:10:59,170 and isn't specific to Android. On Android 281 00:10:59,170 --> 00:11:00,850 there's a limit to the number of methods 282 00:11:00,850 --> 00:11:03,069 that your app can contain. Now the limit's 283 00:11:03,069 --> 00:11:05,949 64k and if your app has more than 64,000 284 00:11:05,949 --> 00:11:07,899 methods, it has to use something called 285 00:11:07,899 --> 00:11:10,449 multi decks. So that makes the app large 286 00:11:10,449 --> 00:11:11,500 and more complicated. 287 00:11:11,500 --> 00:11:13,899 Now this Kotlin documentation doesn't 288 00:11:13,899 --> 00:11:15,550 really consider things like that, and 289 00:11:15,550 --> 00:11:16,600 that's because it's all about the 290 00:11:16,600 --> 00:11:19,689 language and not specific to Android. Now 291 00:11:19,689 --> 00:11:21,430 you'll often come across recommendations 292 00:11:21,430 --> 00:11:23,319 to use data classes in Kotlin and I'm 293 00:11:23,319 --> 00:11:24,670 not saying that you shouldn't use them, 294 00:11:24,670 --> 00:11:27,220 but it really only makes sense if you're 295 00:11:27,220 --> 00:11:29,170 going to make use of the functions they 296 00:11:29,170 --> 00:11:31,209 include. If you're not going to need 297 00:11:31,209 --> 00:11:33,220 those functions in your app, then just use 298 00:11:33,220 --> 00:11:35,529 a simple class instead. And there's a 299 00:11:35,529 --> 00:11:36,880 simple discussion of this that I 300 00:11:36,880 --> 00:11:39,310 recommend you read, so let's just go to 301 00:11:39,310 --> 00:11:43,029 that URL. So I'm not going to go into 302 00:11:43,029 --> 00:11:44,920 detail about that in this video now but 303 00:11:44,920 --> 00:11:46,810 have a read of this at your leisure. 304 00:11:46,810 --> 00:11:48,850 It's interesting that each data class 305 00:11:48,850 --> 00:11:51,490 you create may increase the method count 306 00:11:51,490 --> 00:11:55,360 by 18, so keep that in mind as well. Al 307 00:11:55,360 --> 00:11:57,399 right so that's data classes - useful but 308 00:11:57,399 --> 00:12:00,279 only when you use what they provide. So 309 00:12:00,279 --> 00:12:01,870 I'm going to go back to our code in Android Studio, 310 00:12:01,870 --> 00:12:04,870 and I'm actually going to remove the 311 00:12:04,870 --> 00:12:07,600 data keyword here and set it back, just 312 00:12:07,600 --> 00:12:10,360 to a basic class. Alright, so that's our 313 00:12:10,360 --> 00:12:12,819 simple Task class created. We can now 314 00:12:12,819 --> 00:12:14,980 move on and create the activity to 315 00:12:14,980 --> 00:12:17,350 handle adding tasks. So I'm going to stop 316 00:12:17,350 --> 00:12:19,360 the video here, and we'll do that in the 317 00:12:19,360 --> 00:12:21,689 next one.