Skip to content

Commit

Permalink
Reset min+max when changing sources
Browse files Browse the repository at this point in the history
  • Loading branch information
asl97 committed Feb 16, 2018
1 parent eda8be0 commit 01eb104
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/.idea/misc.xml

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

4 changes: 2 additions & 2 deletions src/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ android {
minSdkVersion 14
targetSdkVersion 26
resConfigs "en"
versionCode 2
versionName "0.0.2"
versionCode 3
versionName "0.0.3"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
Expand Down
4 changes: 2 additions & 2 deletions src/app/src/main/java/to/uk/asl97/amp_ap/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ public void onItemSelected(AdapterView<?> parent, View view, int position, long
String item = parent.getItemAtPosition(position).toString();
this.act.c_source_cur = item;
this.act.reader_cur = this.act.sources.linkedmap_cur.get(item);
this.act.amp.clear();

SharedPreferences sharedPref = this.act.getPreferences(Context.MODE_PRIVATE);
SharedPreferences.Editor editor = sharedPref.edit();
Expand All @@ -64,7 +63,6 @@ public void onItemSelected(AdapterView<?> parent, View view, int position, long
String item = parent.getItemAtPosition(position).toString();
this.act.c_source_avg = item;
this.act.reader_avg = this.act.sources.linkedmap_avg.get(item);
this.act.amp.clear();

SharedPreferences sharedPref = this.act.getPreferences(Context.MODE_PRIVATE);
SharedPreferences.Editor editor = sharedPref.edit();
Expand Down Expand Up @@ -243,6 +241,8 @@ private void stop(){
}

void update_information(){
this.amp.clear();
amp.init(this.reader_cur.read());
TextView stats = findViewById(R.id.Stats);
stats.setText(String.format(getString(R.string.Stats), this.c_source_cur, this.c_source_avg, BUILD_MODEL));
}
Expand Down

0 comments on commit 01eb104

Please sign in to comment.