I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 84edc743 authored by str4d's avatar str4d
Browse files

Fixed SeekBarPreferences to check resource strings

parent b7dfc45b
No related branches found
No related tags found
No related merge requests found
...@@ -49,8 +49,14 @@ public class SeekBarPreference extends DialogPreference implements SeekBar.OnSee ...@@ -49,8 +49,14 @@ public class SeekBarPreference extends DialogPreference implements SeekBar.OnSee
public SeekBarPreference(Context context, AttributeSet attrs) { public SeekBarPreference(Context context, AttributeSet attrs) {
super(context, attrs); super(context, attrs);
mContext = context; mContext = context;
mDialogMessage = attrs.getAttributeValue(androidns, "dialogMessage"); int dialogMessageR = attrs.getAttributeResourceValue(androidns, "dialogMessage", 0);
mSuffix = attrs.getAttributeValue(androidns, "text"); mDialogMessage = (dialogMessageR == 0)
? attrs.getAttributeValue(androidns, "dialogMessage")
: context.getResources().getString(dialogMessageR);
int textR = attrs.getAttributeResourceValue(androidns, "text", 0);
mSuffix = (textR == 0)
? attrs.getAttributeValue(androidns, "text")
: context.getResources().getString(textR);
mDefault = attrs.getAttributeValue(androidns, "defaultValue"); mDefault = attrs.getAttributeValue(androidns, "defaultValue");
mMax = Integer.parseInt(attrs.getAttributeValue(androidns, "max")); mMax = Integer.parseInt(attrs.getAttributeValue(androidns, "max"));
if (attrs.getAttributeValue(androidns, "direction") != null) { if (attrs.getAttributeValue(androidns, "direction") != null) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment