Loading app/src/main/java/net/fabiszewski/ulogger/ListWithEditTextPreference.java +4 −3 Original line number Diff line number Diff line Loading @@ -62,9 +62,10 @@ class ListWithEditTextPreference extends ListPreference implements Preference.On private void init(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { setOnPreferenceChangeListener(this); TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.ListWithEditTextPreference, defStyleAttr, defStyleRes); otherSummary = a.getText(R.styleable.ListWithEditTextPreference_otherSummary); a.recycle(); try (TypedArray attributes = context.obtainStyledAttributes(attrs, R.styleable.ListWithEditTextPreference, defStyleAttr, defStyleRes)) { otherSummary = attributes.getText(R.styleable.ListWithEditTextPreference_otherSummary); } } Loading app/src/main/java/net/fabiszewski/ulogger/ProviderPreferenceDialogFragment.java +4 −4 Original line number Diff line number Diff line Loading @@ -128,10 +128,10 @@ public class ProviderPreferenceDialogFragment extends ListPreferenceDialogWithMe int resId = android.R.layout.select_dialog_singlechoice; final Context context = getContext(); if (context != null) { final TypedArray typedArray = context.obtainStyledAttributes(null, R.styleable.AlertDialog, R.attr.alertDialogStyle, 0); resId = typedArray.getResourceId(R.styleable.AlertDialog_singleChoiceItemLayout, resId); typedArray.recycle(); try (final TypedArray attributes = context.obtainStyledAttributes(null, R.styleable.AlertDialog, R.attr.alertDialogStyle, 0)) { resId = attributes.getResourceId(R.styleable.AlertDialog_singleChoiceItemLayout, resId); } } return resId; } Loading Loading
app/src/main/java/net/fabiszewski/ulogger/ListWithEditTextPreference.java +4 −3 Original line number Diff line number Diff line Loading @@ -62,9 +62,10 @@ class ListWithEditTextPreference extends ListPreference implements Preference.On private void init(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { setOnPreferenceChangeListener(this); TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.ListWithEditTextPreference, defStyleAttr, defStyleRes); otherSummary = a.getText(R.styleable.ListWithEditTextPreference_otherSummary); a.recycle(); try (TypedArray attributes = context.obtainStyledAttributes(attrs, R.styleable.ListWithEditTextPreference, defStyleAttr, defStyleRes)) { otherSummary = attributes.getText(R.styleable.ListWithEditTextPreference_otherSummary); } } Loading
app/src/main/java/net/fabiszewski/ulogger/ProviderPreferenceDialogFragment.java +4 −4 Original line number Diff line number Diff line Loading @@ -128,10 +128,10 @@ public class ProviderPreferenceDialogFragment extends ListPreferenceDialogWithMe int resId = android.R.layout.select_dialog_singlechoice; final Context context = getContext(); if (context != null) { final TypedArray typedArray = context.obtainStyledAttributes(null, R.styleable.AlertDialog, R.attr.alertDialogStyle, 0); resId = typedArray.getResourceId(R.styleable.AlertDialog_singleChoiceItemLayout, resId); typedArray.recycle(); try (final TypedArray attributes = context.obtainStyledAttributes(null, R.styleable.AlertDialog, R.attr.alertDialogStyle, 0)) { resId = attributes.getResourceId(R.styleable.AlertDialog_singleChoiceItemLayout, resId); } } return resId; } Loading