diff options
author | Scott Jackson <daneren2005@gmail.com> | 2014-11-01 11:27:37 -0700 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2014-11-01 11:27:37 -0700 |
commit | 2565520ef21b58ff773fe94825d4456df64c6103 (patch) | |
tree | f5472e8a76358a57fcc2f731e52582892ee8777a /src | |
parent | 43e47ab5cfbc9f39b076a425aaa1e5c470193ff9 (diff) | |
download | dsub-2565520ef21b58ff773fe94825d4456df64c6103.tar.gz dsub-2565520ef21b58ff773fe94825d4456df64c6103.tar.bz2 dsub-2565520ef21b58ff773fe94825d4456df64c6103.zip |
Fix error if val is "" for some reason
Diffstat (limited to 'src')
-rw-r--r-- | src/github/daneren2005/dsub/view/SeekBarPreference.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/github/daneren2005/dsub/view/SeekBarPreference.java b/src/github/daneren2005/dsub/view/SeekBarPreference.java index e96d76f8..a22d049b 100644 --- a/src/github/daneren2005/dsub/view/SeekBarPreference.java +++ b/src/github/daneren2005/dsub/view/SeekBarPreference.java @@ -116,7 +116,11 @@ public class SeekBarPreference extends DialogPreference implements SeekBar.OnSee SeekBar seekBar = (SeekBar)view.findViewById(R.id.seek_bar);
seekBar.setMax(mMax - mMin);
- seekBar.setProgress(Integer.parseInt(mValue));
+ try {
+ seekBar.setProgress(Integer.parseInt(mValue));
+ } catch(Exception e) {
+ seekBar.setProgress(0);
+ }
seekBar.setOnSeekBarChangeListener(this);
return view;
|