Commit 456d9286 authored by cfabio's avatar cfabio

Fix a bug that prevented the graph from being loaded when period was day, week or month

parent c8dd888a
...@@ -7,8 +7,8 @@ android { ...@@ -7,8 +7,8 @@ android {
applicationId "eu.uwot.fabio.altcoinprices" applicationId "eu.uwot.fabio.altcoinprices"
minSdkVersion 14 minSdkVersion 14
targetSdkVersion 27 targetSdkVersion 27
versionCode 35 versionCode 36
versionName '1.4.13a' versionName '1.4.14'
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
} }
buildTypes { buildTypes {
...@@ -25,13 +25,13 @@ android { ...@@ -25,13 +25,13 @@ android {
} }
dependencies { dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs') implementation fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations' exclude group: 'com.android.support', module: 'support-annotations'
}) })
compile 'com.android.support:appcompat-v7:27.1.0' implementation 'com.android.support:appcompat-v7:27.1.0'
compile 'com.android.support:support-v4:27.1.0' implementation 'com.android.support:support-v4:27.1.0'
compile 'com.android.support:design:27.1.0' implementation 'com.android.support:design:27.1.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2' implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12' testImplementation 'junit:junit:4.12'
} }
...@@ -13,8 +13,8 @@ class GraphUrl { ...@@ -13,8 +13,8 @@ class GraphUrl {
" \"autosize\": true,\n" + " \"autosize\": true,\n" +
" \"symbol\": \""; " \"symbol\": \"";
private final String URL1 = "\",\n" + private final String URL1 = "\",\n" +
" \"interval\": "; " \"interval\": \"";
private final String URL2 = ",\n" + private final String URL2 = "\",\n" +
" \"timezone\": \"Europe/Rome\",\n" + " \"timezone\": \"Europe/Rome\",\n" +
" \"theme\": \"Light\",\n" + " \"theme\": \"Light\",\n" +
" \"style\": \"1\",\n" + " \"style\": \"1\",\n" +
...@@ -73,15 +73,6 @@ class GraphUrl { ...@@ -73,15 +73,6 @@ class GraphUrl {
break; break;
} }
/*switch (altcoinName) {
case "BTCUSD":
url = URL0 + exchange + ":" + altcoinName.toUpperCase() + URL1 + period + URL2;
break;
case "ETHUSD":
url = URL0 + exchange + ":" + altcoinName.toUpperCase() + URL1 + period + URL2;
break;
}*/
return url; return url;
} }
......
...@@ -85,9 +85,6 @@ public class SettingsActivity extends AppCompatActivity implements AdapterView.O ...@@ -85,9 +85,6 @@ public class SettingsActivity extends AppCompatActivity implements AdapterView.O
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
period = periodSpinner.getSelectedItem().toString(); period = periodSpinner.getSelectedItem().toString();
Log.d("SETTINGS", "period: " + period);
Log.d("SETTINGS", "R.string.hours: " + getResources().getString(R.string.hours));
if ("1 minute".equals(period)) { if ("1 minute".equals(period)) {
period = "1"; period = "1";
...@@ -128,9 +125,7 @@ public class SettingsActivity extends AppCompatActivity implements AdapterView.O ...@@ -128,9 +125,7 @@ public class SettingsActivity extends AppCompatActivity implements AdapterView.O
period = DEFAULT_PERIOD; period = DEFAULT_PERIOD;
} }
Log.d("SETTINGS", "period2: " + period);
editor.putString("period", period); editor.putString("period", period);
editor.commit(); editor.commit();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment