buzz twice to give users more time
[saartuer.git] / AndTuer / src / de / hacksaar / andtuer / IntegerTextPreference.java
1 package de.hacksaar.andtuer;
2
3 import android.content.Context;
4 import android.preference.EditTextPreference;
5 import android.util.AttributeSet;
6
7 public class IntegerTextPreference extends EditTextPreference {
8         public IntegerTextPreference(Context context, AttributeSet attrs, int defStyle) {
9                 super(context, attrs, defStyle);
10         }
11
12         public IntegerTextPreference(Context context, AttributeSet attrs) {
13                 super(context, attrs);
14         }
15
16         public IntegerTextPreference(Context context) {
17                 super(context);
18         }
19
20         @Override
21         protected String getPersistedString(String defaultReturnValue) {
22                 return String.valueOf(getPersistedInt(-1));
23         }
24
25         @Override
26         protected boolean persistString(String value) {
27                 return persistInt(Integer.valueOf(value));
28         }
29 }