Skip to content

Commit

Permalink
Fix errors in Profile Editor #50
Browse files Browse the repository at this point in the history
  • Loading branch information
timomer committed Mar 18, 2017
1 parent 135e731 commit ad99841
Show file tree
Hide file tree
Showing 16 changed files with 647 additions and 622 deletions.
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions app/app.iml
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.1.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/design/23.1.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/mediarouter-v7/22.0.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/recyclerview-v7/23.1.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/23.1.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/recyclerview-v7/23.4.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/23.4.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.crashlytics.sdk.android/answers/1.3.2/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.crashlytics.sdk.android/beta/1.1.3/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.crashlytics.sdk.android/crashlytics-core/2.3.5/jars" />
Expand Down Expand Up @@ -148,13 +148,12 @@
<orderEntry type="library" exported="" name="play-services-analytics-7.5.0" level="project" />
<orderEntry type="library" exported="" name="okhttp-2.7.0" level="project" />
<orderEntry type="library" exported="" name="play-services-appindexing-7.5.0" level="project" />
<orderEntry type="library" exported="" name="recyclerview-v7-23.1.0" level="project" />
<orderEntry type="library" exported="" name="play-services-ads-7.5.0" level="project" />
<orderEntry type="library" exported="" name="play-services-safetynet-7.5.0" level="project" />
<orderEntry type="library" exported="" name="support-v4-23.4.0" level="project" />
<orderEntry type="library" exported="" name="play-services-7.5.0" level="project" />
<orderEntry type="library" exported="" name="appcompat-v7-23.1.0" level="project" />
<orderEntry type="library" exported="" name="play-services-appinvite-7.5.0" level="project" />
<orderEntry type="library" exported="" name="support-annotations-23.1.0" level="project" />
<orderEntry type="library" exported="" name="beta-1.1.3" level="project" />
<orderEntry type="library" exported="" name="engine.io-client-0.6.3" level="project" />
<orderEntry type="library" exported="" name="fabric-1.3.6" level="project" />
Expand All @@ -167,6 +166,7 @@
<orderEntry type="library" exported="" name="fab-1.6.1" level="project" />
<orderEntry type="library" exported="" name="answers-1.3.2" level="project" />
<orderEntry type="library" exported="" name="play-services-wallet-7.5.0" level="project" />
<orderEntry type="library" exported="" name="support-annotations-23.4.0" level="project" />
<orderEntry type="library" exported="" name="play-services-drive-7.5.0" level="project" />
<orderEntry type="library" exported="" name="play-services-panorama-7.5.0" level="project" />
<orderEntry type="library" exported="" name="realm-annotations-1.1.1" level="project" />
Expand All @@ -175,8 +175,8 @@
<orderEntry type="library" exported="" name="j2v8-4.5.0" level="project" />
<orderEntry type="library" exported="" name="realm-android-library-1.1.1" level="project" />
<orderEntry type="library" exported="" name="jsr305-1.3.9" level="project" />
<orderEntry type="library" exported="" name="recyclerview-v7-23.4.0" level="project" />
<orderEntry type="library" exported="" name="play-services-base-7.5.0" level="project" />
<orderEntry type="library" exported="" name="support-v4-23.1.0" level="project" />
<orderEntry type="library" exported="" name="play-services-gcm-7.5.0" level="project" />
<orderEntry type="library" exported="" name="crashlytics-2.5.2" level="project" />
<orderEntry type="library" exported="" name="gson-2.4" level="project" />
Expand Down
5 changes: 3 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ android {
minSdkVersion 21
targetSdkVersion 22

versionCode 47
versionName "1.4.2"
versionCode 48
versionName "1.5"

multiDexEnabled true

Expand Down Expand Up @@ -61,6 +61,7 @@ dependencies {
compile 'com.eclipsesource.j2v8:j2v8:4.5.0@aar'
compile 'com.github.tony19:logback-android-classic:1.1.1-4'
compile 'org.slf4j:slf4j-api:1.7.12'
compile 'com.android.support:recyclerview-v7:23+'

//For NS Package
compile 'com.google.guava:guava:11.0'
Expand Down
3 changes: 3 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".Profile_EditorV2"
android:label="@string/title_activity_profile_editor" />
<activity
android:name=".EnterTreatment"
android:label="@string/title_activity_enter_treatment" />
Expand Down
10 changes: 5 additions & 5 deletions app/src/main/java/com/hypodiabetic/happ/Migration.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import java.util.Date;
import java.util.List;

import com.hypodiabetic.happ.tools.TimeSpan;
import com.hypodiabetic.happ.TimeSpan;

/**
* Created by Tim on 31/10/2016.
Expand Down Expand Up @@ -75,16 +75,16 @@ private static void convertOldProfile(String profile, SharedPreferences prefs){

if (value.equals("") && !h.equals(0)){
//We have no value for this hour, extend previous hour added to cover this
profileTimeSpansList.get(profileTimeSpansList.size()-1).endTime = endTime;
profileTimeSpansList.get(profileTimeSpansList.size()-1).setEndTime(endTime);
} else {
if (value.equals("") && h.equals(0)){
//We have no value for the first hour, set 0
value = "0";
}
timeSpan = new TimeSpan();
timeSpan.time = startTime;
timeSpan.endTime = endTime;
timeSpan.value = tools.stringToDouble(value);
timeSpan.setStartTime( startTime);
timeSpan.setEndTime( endTime);
timeSpan.setValue( tools.stringToDouble(value));
profileTimeSpansList.add(timeSpan);
}
}
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/java/com/hypodiabetic/happ/Objects/Profile.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@

import com.hypodiabetic.happ.Constants;
import com.hypodiabetic.happ.MainApp;
import com.hypodiabetic.happ.TimeSpan;
import com.hypodiabetic.happ.UserPrefs;
import com.hypodiabetic.happ.tools;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import com.hypodiabetic.happ.tools.TimeSpan;


/**
* Created by tim on 03/08/2015.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

import java.util.Date;
import java.util.List;
import com.hypodiabetic.happ.tools.TimeSpan;
import com.hypodiabetic.happ.TimeSpan;

/**
* Created by Tim on 19/02/2016.
Expand Down
Loading

0 comments on commit ad99841

Please sign in to comment.