We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 0c7c54e + 5d0e1b8 commit 557ea17Copy full SHA for 557ea17
1 file changed
source-code/app/src/main/java/org/buildmlearn/toolkit/learnspelling/SpellingActivity.java
@@ -66,6 +66,8 @@ public class SpellingActivity extends Fragment implements
66
private EditText mEt_Spelling;
67
private SeekBar mSb_SpeechRate;
68
69
+ private static final float MIN_SPEECH_RATE = 0.01f;
70
+
71
@Nullable
72
@Override
73
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
@@ -204,7 +206,11 @@ private void submit() {
204
206
205
207
private float getProgressValue(int percent) {
208
float temp = ((float) percent / 100);
- return temp * 2;
209
+ float speechRate = temp * 2;
210
211
+ if (speechRate < MIN_SPEECH_RATE)
212
+ speechRate = MIN_SPEECH_RATE;
213
+ return speechRate;
214
}
215
216
0 commit comments