You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -96,16 +97,11 @@ If you want to explore the [NativeScript Playground](https://play.nativescript.o
96
97
* View tasks: Newly added tasks are listed as active and can be tapped
97
98
* Complete tasks: Tapping an active task shows an action dialog with options
98
99
* Delete tasks: Tapping an active or completed task shows an action dialog with options
99
-
*(In progress) Advanced design
100
+
* Advanced design
100
101
* Input and button for adding tasks are styled
101
102
* Tabs are styled
102
103
* Active tasks are styled
103
-
* (Coming soon) Completed tasks are styled
104
-
* (Coming soon) Advanced functionality
105
-
* (Coming soon) Store timestamp data for each task
106
-
* (Coming soon) View task history
107
-
* (Coming soon) Manage tasks in bulk
108
-
* (Coming soon) Schedule tasks: Users can set deadlines for tasks by picking a date from a calendar widget
104
+
* Completed tasks are styled
109
105
110
106
> **TIP:** All sections of this tutorial contain a *Some NativeScript basics* and *Requirement implementation* sub-sections. You can skip the basics sub-section and jump straight to the implementation for a more hands-on approach.
111
107
@@ -661,3 +657,48 @@ To implement a style particularly for the text of active tasks, you can set an `
661
657
padding-bottom: 10;
662
658
}
663
659
```
660
+
661
+
## Advanced design: Styled completed tasks
662
+
663
+
Here's how your app will look at the start and at the end of this section.
This section applies the basic NativeScript knowledge from [Advanced design: Styled active tasks](#advanced-design-styled-active-tasks).
672
+
673
+
### Requirement implementation
674
+
675
+
1. In `app.js`, on line 76, set an `id` for the `<Label>` that represents completed tasks and enable text wrapping. Enabling text wrapping ensures that longer text shows properly in your list
1. On line 74, set an `id`, add the `separatorColor` property, and set it to `transparent`. This way, the separator will no longer appear in your list. You can use the `id` to style the margins for the `<ListView>`.
681
+
682
+
```HTML
683
+
<ListViewid="completed-list"for="done in dones"@itemTap="onDoneTap"height="100%"separatorColor="transparent" >
684
+
```
685
+
1. In `app.css`, create the style for completed tasks. Set font size, color, text decoration, and some padding to position the text on the page. Play with margins and paddings until you get a result that works for you.
686
+
687
+
```CSS
688
+
#completed-task {
689
+
font-size: 20;
690
+
color: #d3d3d3;
691
+
margin-left: 20;
692
+
padding-top: 5;
693
+
padding-bottom: 10;
694
+
text-decoration: line-through;
695
+
}
696
+
```
697
+
698
+
1. Create a style for the entire `<ListView>` and set a top margin for it. This way, text will not show directly below the action bar. Play with the top margin until you get a result that works for you.
0 commit comments