-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTasks.java
More file actions
59 lines (48 loc) · 1.88 KB
/
Tasks.java
File metadata and controls
59 lines (48 loc) · 1.88 KB
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
package com.sachet.database2;
import java.io.Serializable;
public class Tasks implements Serializable {
public static final long serialVersionUID = 20181027L;
private long m_Id;
private final String mName;
private final String mDescription;
private final int mSortOrder;
public Tasks(long m_Id, String name, String description, int sortOrder) {
this.m_Id = m_Id;
mName = name;
mDescription = description;
mSortOrder = sortOrder;
}
public long getId() {
return m_Id;
}
public String getName() {
return mName;
}
public String getDescription() {
return mDescription;
}
public int getSortOrder() {
return mSortOrder;
}
public void setId(long m_Id) {
this.m_Id = m_Id;
}
@Override
public String toString() {
return "Name :"+mName
+"\nDescription :"+mDescription
+"\nSortOrder :"+mSortOrder;
}
}
//we are going to assign the value to m_id field when we add Tasks to our database so we need to store
/**
* Fragment can be thought as a subactivity, it can have its own layout, and can be embedded inside an activity's layout
* to add some functionality in a modular fashion
* When we dont use fragments most of our code goes into the content_main layout, one of the aim
* of fragment is that it can be reused, so addeditactivity behaves just like any other activity as far as layout is
* concerned but we also get the ability to reuse the fragment, in fragment's layout we put all the widgets that we want
* to display the functional screen for our activity
* incorporating an existing layout into a fragment is quite simple
* -----------------------------------------------------------------------------------------------------------------------
* getActivity()-get reference to the activity that the fragments is attached to
*/