Definition at line 20 of file IntEditTextPreference.java.
◆ IntEditTextPreference() [1/3]
com.freerdp.freerdpcore.utils.IntEditTextPreference.IntEditTextPreference |
( |
Context |
context | ) |
|
|
inline |
◆ IntEditTextPreference() [2/3]
com.freerdp.freerdpcore.utils.IntEditTextPreference.IntEditTextPreference |
( |
Context |
context, |
|
|
AttributeSet |
attrs |
|
) |
| |
|
inline |
◆ IntEditTextPreference() [3/3]
com.freerdp.freerdpcore.utils.IntEditTextPreference.IntEditTextPreference |
( |
Context |
context, |
|
|
AttributeSet |
attrs, |
|
|
int |
defStyle |
|
) |
| |
|
inline |
◆ getPersistedString()
String com.freerdp.freerdpcore.utils.IntEditTextPreference.getPersistedString |
( |
String |
defaultReturnValue | ) |
|
|
inlineprotected |
Definition at line 71 of file IntEditTextPreference.java.
72 {
73 int value = getPersistedInt(-1);
74 if (value > bounds_max || value < bounds_min)
75 value = bounds_default;
76 return String.valueOf(value);
77 }
◆ onDialogClosed()
void com.freerdp.freerdpcore.utils.IntEditTextPreference.onDialogClosed |
( |
boolean |
positiveResult | ) |
|
|
inlineprotected |
Definition at line 84 of file IntEditTextPreference.java.
85 {
86 if (positiveResult)
87 {
88
89 if (getEditText().getText().length() == 0)
90 getEditText().setText("0");
91
92
93 int value = Integer.parseInt(getEditText().getText().toString());
94 if (value > bounds_max || value < bounds_min)
95 value = bounds_default;
96 getEditText().setText(String.valueOf(value));
97 }
98
99 super.onDialogClosed(positiveResult);
100 }
◆ persistString()
boolean com.freerdp.freerdpcore.utils.IntEditTextPreference.persistString |
( |
String |
value | ) |
|
|
inlineprotected |
◆ setBounds()
void com.freerdp.freerdpcore.utils.IntEditTextPreference.setBounds |
( |
int |
min, |
|
|
int |
max, |
|
|
int |
defaultValue |
|
) |
| |
|
inline |
Definition at line 64 of file IntEditTextPreference.java.
65 {
66 bounds_min = min;
67 bounds_max = max;
68 bounds_default = defaultValue;
69 }
The documentation for this class was generated from the following file: