Skip to content

Commit ca56ef0

Browse files
author
J Liu
committed
Fixes the water percentage at first boot
1 parent be460f3 commit ca56ef0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/src/main/java/com/example/deco3801project/MainActivity2.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,8 @@ protected void onCreate(Bundle savedInstanceState) {
155155

156156
// Disable the seekBar
157157
seekBar.setEnabled(false);
158-
158+
seekBar.setProgress((int)calculateRemainingPercentage());
159+
waveLoadingView.setProgressValue(seekBar.getProgress());
159160
// Make sure the WaveLoadingView's water level changes accordingly
160161
seekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
161162
@Override
@@ -173,7 +174,6 @@ public void onStopTrackingTouch(SeekBar seekBar) {
173174

174175
}
175176
});
176-
177177
float interval = pref.getFloat("interval", (float) 1.0);
178178
int windowStart = pref.getInt("windowStart", 8);
179179
int windowEnd = pref.getInt("windowEnd", 20);

0 commit comments

Comments
 (0)