Skip to content
Snippets Groups Projects
Commit 936b9398 authored by Peter Joseph De Jonckheere CESM2014's avatar Peter Joseph De Jonckheere CESM2014
Browse files

Do array store of daily ack for graph tomorrow.

parent 9a4c991f
No related branches found
No related tags found
No related merge requests found
......@@ -66,5 +66,6 @@ public class DataAnalysis {
editor.putInt(context.getString(R.string.ack_days), ackDays);
editor.putFloat(context.getString(R.string.avg_ack), avgAck);
editor.commit();
}
}
\ No newline at end of file
......@@ -33,6 +33,7 @@ import com.notificationFramework.stimulusStrategy.SigMotionDetect;
public class MainActivity extends AppCompatActivity {
private SharedPreferences shared;
/**
* Called when the MainActivity activity is started from somewhere else in the application, or
......@@ -46,6 +47,7 @@ public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
shared = this.getSharedPreferences(getString(R.string.preference_file_key), Context.MODE_PRIVATE);
setContentView(R.layout.activity_main);
setUpButtons();
}
......@@ -72,8 +74,6 @@ public class MainActivity extends AppCompatActivity {
startActivity(intent);
}
});
SharedPreferences shared =
this.getSharedPreferences(getString(R.string.preference_file_key), Context.MODE_PRIVATE);
ProgressBar progress = findViewById(R.id.progressBar);
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));
......@@ -83,6 +83,7 @@ public class MainActivity extends AppCompatActivity {
private void setUpGraph(){
GraphView graph = (GraphView) findViewById(R.id.graph);
LineGraphSeries<DataPoint> series = new LineGraphSeries<>(new DataPoint[] {
new DataPoint(0, 1),
new DataPoint(1, 5),
......@@ -91,6 +92,7 @@ public class MainActivity extends AppCompatActivity {
new DataPoint(4, 6)
});
graph.addSeries(series);
}
/**
* Creates the stimulus object which initiates the background processes of the application. Uses
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment