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 {
applicationId "eu.uwot.fabio.altcoinprices"
minSdkVersion 14
targetSdkVersion 27
versionCode 35
versionName '1.4.13a'
versionCode 36
versionName '1.4.14'
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
......@@ -25,13 +25,13 @@ android {
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
implementation fileTree(include: ['*.jar'], dir: 'libs')
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:27.1.0'
compile 'com.android.support:support-v4:27.1.0'
compile 'com.android.support:design:27.1.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
implementation 'com.android.support:appcompat-v7:27.1.0'
implementation 'com.android.support:support-v4:27.1.0'
implementation 'com.android.support:design:27.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
}
......@@ -13,8 +13,8 @@ class GraphUrl {
" \"autosize\": true,\n" +
" \"symbol\": \"";
private final String URL1 = "\",\n" +
" \"interval\": ";
private final String URL2 = ",\n" +
" \"interval\": \"";
private final String URL2 = "\",\n" +
" \"timezone\": \"Europe/Rome\",\n" +
" \"theme\": \"Light\",\n" +
" \"style\": \"1\",\n" +
......@@ -73,15 +73,6 @@ class GraphUrl {
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;
}
......
......@@ -85,9 +85,6 @@ public class SettingsActivity extends AppCompatActivity implements AdapterView.O
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
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)) {
period = "1";
......@@ -129,8 +126,6 @@ public class SettingsActivity extends AppCompatActivity implements AdapterView.O
}
Log.d("SETTINGS", "period2: " + period);
editor.putString("period", period);
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