Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SedentaryBehaviourApplication
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Peter Joseph De Jonckheere CESM2014
SedentaryBehaviourApplication
Commits
fee76d83
Commit
fee76d83
authored
6 years ago
by
Peter Joseph De Jonckheere CESM2014
Browse files
Options
Downloads
Patches
Plain Diff
Added graph code to other screen
parent
76209379
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/com/notificationFramework/sedentary/frontEnd/NotificationClicked.java
+27
-0
27 additions, 0 deletions
...tionFramework/sedentary/frontEnd/NotificationClicked.java
with
27 additions
and
0 deletions
src/main/java/com/notificationFramework/sedentary/frontEnd/NotificationClicked.java
+
27
−
0
View file @
fee76d83
...
@@ -9,6 +9,12 @@ import android.view.View;
...
@@ -9,6 +9,12 @@ import android.view.View;
import
android.widget.Button
;
import
android.widget.Button
;
import
android.widget.ProgressBar
;
import
android.widget.ProgressBar
;
import
com.jjoe64.graphview.GraphView
;
import
com.jjoe64.graphview.series.DataPoint
;
import
com.jjoe64.graphview.series.LineGraphSeries
;
import
java.util.List
;
/**
/**
* Created by Peter De Jonckheere on 22/01/2018.
* Created by Peter De Jonckheere on 22/01/2018.
* <p>
* <p>
...
@@ -62,5 +68,26 @@ public class NotificationClicked extends AppCompatActivity {
...
@@ -62,5 +68,26 @@ public class NotificationClicked extends AppCompatActivity {
ProgressBar
progress
=
findViewById
(
R
.
id
.
progressBar
);
ProgressBar
progress
=
findViewById
(
R
.
id
.
progressBar
);
progress
.
setMax
((
shared
.
getInt
(
getString
(
R
.
string
.
daily_goal_set
),
R
.
integer
.
daily_goal_minutes
)));
progress
.
setMax
((
shared
.
getInt
(
getString
(
R
.
string
.
daily_goal_set
),
R
.
integer
.
daily_goal_minutes
)));
progress
.
setProgress
(
shared
.
getInt
(
getString
(
R
.
string
.
daily_progress
),
0
));
progress
.
setProgress
(
shared
.
getInt
(
getString
(
R
.
string
.
daily_progress
),
0
));
setUpGraph
();
}
private
void
setUpGraph
(){
GraphView
graph
=
(
GraphView
)
findViewById
(
R
.
id
.
graph
);
List
<
Integer
>
acks
=
SaveFile
.
getWeeklyAcks
(
this
.
getApplicationContext
());
DataPoint
[]
dataPoints
=
new
DataPoint
[
7
];
int
j
=
0
;
for
(
int
i
=
0
;
i
<
acks
.
size
();
i
=+
2
){
DataPoint
dp
=
new
DataPoint
(
acks
.
get
(
i
),
acks
.
get
(
i
+
1
));
dataPoints
[
j
]
=
dp
;
j
++;
}
for
(
int
i
=
0
;
i
<
7
;
i
++){
if
(
dataPoints
[
i
]
==
null
){
dataPoints
[
i
]
=
new
DataPoint
(
0
,
0
);
}
}
LineGraphSeries
<
DataPoint
>
series
=
new
LineGraphSeries
<>(
dataPoints
);
graph
.
addSeries
(
series
);
graph
.
setTitle
(
getString
(
R
.
string
.
your_progress
));
}
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment