Skip to content
Snippets Groups Projects
Commit 88b21396 authored by Volker Richert's avatar Volker Richert
Browse files

Merge branch 'feature/android_graphview' into develop

parents 547d9c2d 4b9e9205
No related branches found
No related tags found
No related merge requests found
...@@ -5,3 +5,4 @@ local.properties ...@@ -5,3 +5,4 @@ local.properties
.idea .idea
bugfender.properties bugfender.properties
/app/app.iml /app/app.iml
gradle.properties
\ No newline at end of file
...@@ -154,8 +154,7 @@ dependencies { ...@@ -154,8 +154,7 @@ dependencies {
compile 'com.mikepenz:google-material-typeface:2.2.0.1.original@aar' compile 'com.mikepenz:google-material-typeface:2.2.0.1.original@aar'
compile 'uk.co.chrisjenx:calligraphy:2.2.0' compile 'uk.co.chrisjenx:calligraphy:2.2.0'
compile 'com.bugfender.sdk:android:0.6.2' compile 'com.bugfender.sdk:android:0.6.2'
compile 'com.github.PhilJay:MPAndroidChart-Realm:v2.0.2@aar' compile 'com.jjoe64:graphview:4.2.1'
compile 'com.github.PhilJay:MPAndroidChart:v3.0.1'
compile 'com.android.support:support-v4:23.4.0' compile 'com.android.support:support-v4:23.4.0'
compile 'com.google.code.gson:gson:2.7' compile 'com.google.code.gson:gson:2.7'
compile 'com.squareup.retrofit2:retrofit:2.1.0' compile 'com.squareup.retrofit2:retrofit:2.1.0'
......
package info.nightscout.android.model.medtronicNg; package info.nightscout.android.model.medtronicNg;
import com.github.mikephil.charting.interfaces.datasets.IScatterDataSet;
import java.util.Date; import java.util.Date;
import io.realm.RealmObject; import io.realm.RealmObject;
......
...@@ -51,8 +51,7 @@ public class SettingsFragment extends PreferenceFragment implements OnSharedPref ...@@ -51,8 +51,7 @@ public class SettingsFragment extends PreferenceFragment implements OnSharedPref
*/ */
private void setMinBatPollIntervall(ListPreference pollIntervalPref, ListPreference lowBatPollIntervalPref) { private void setMinBatPollIntervall(ListPreference pollIntervalPref, ListPreference lowBatPollIntervalPref) {
final String currentValue = lowBatPollIntervalPref.getValue(); final String currentValue = lowBatPollIntervalPref.getValue();
final int pollIntervalPos = pollIntervalPref.findIndexOfValue(pollIntervalPref.getValue()), final int pollIntervalPos = (pollIntervalPref.findIndexOfValue(pollIntervalPref.getValue()) >= 0?pollIntervalPref.findIndexOfValue(pollIntervalPref.getValue()):0),
lowBatPollIntervalPos = lowBatPollIntervalPref.findIndexOfValue(currentValue),
length = pollIntervalPref.getEntries().length; length = pollIntervalPref.getEntries().length;
CharSequence[] entries = new String[length - pollIntervalPos], CharSequence[] entries = new String[length - pollIntervalPos],
......
...@@ -119,11 +119,10 @@ ...@@ -119,11 +119,10 @@
</LinearLayout> </LinearLayout>
<com.github.mikephil.charting.charts.ScatterChart <com.jjoe64.graphview.GraphView
android:id="@+id/chart"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="100dip"
android:visibility="visible" /> android:id="@+id/chart" />
<ScrollView <ScrollView
android:id="@+id/scrollView" android:id="@+id/scrollView"
......
...@@ -21,4 +21,20 @@ ...@@ -21,4 +21,20 @@
<item>3600000</item> <item>3600000</item>
<!--item>0</item--> <!--item>0</item-->
</string-array> </string-array>
<string-array name="chart_zoom">
<item>1 hour</item>
<item>3 hours</item>
<item>6 hours</item>
<item>12 hours</item>
<item>24 hours</item>
</string-array>
<string-array name="chart_zoom_hours">
<item>1</item>
<item>3</item>
<item>6</item>
<item>12</item>
<item>24</item>
</string-array>
</resources> </resources>
\ No newline at end of file
...@@ -57,4 +57,5 @@ ...@@ -57,4 +57,5 @@
<string name="no_registered_contour_next_link_devices">No registered Contour Next Link devices</string> <string name="no_registered_contour_next_link_devices">No registered Contour Next Link devices</string>
<string name="to_register_a_contour_next_link_you_must_first_plug_it_in_and_get_a_reading_from_the_pump">To register a Contour Next Link you must first plug it in, and get a reading from the pump.</string> <string name="to_register_a_contour_next_link_you_must_first_plug_it_in_and_get_a_reading_from_the_pump">To register a Contour Next Link you must first plug it in, and get a reading from the pump.</string>
<string name="serial_number">Serial number</string> <string name="serial_number">Serial number</string>
<string name="preferences_chart_interval">Chart Zoom</string>
</resources> </resources>
...@@ -41,6 +41,15 @@ ...@@ -41,6 +41,15 @@
android:entries="@array/poll_interval" android:entries="@array/poll_interval"
android:entryValues="@array/poll_interval_millis"/> android:entryValues="@array/poll_interval_millis"/>
</PreferenceCategory> </PreferenceCategory>
<PreferenceCategory android:title="Display">
<ListPreference
android:key="chartZoom"
android:defaultValue="3"
android:title="@string/preferences_chart_interval"
android:summary="%s"
android:entries="@array/chart_zoom"
android:entryValues="@array/chart_zoom_hours"/>
</PreferenceCategory>
<PreferenceCategory android:title="Sharing"> <PreferenceCategory android:title="Sharing">
<CheckBoxPreference <CheckBoxPreference
android:disableDependentsState="false" android:disableDependentsState="false"
......
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