Skip to content

Commit d171845

Browse files
recycling is important
1 parent 9838216 commit d171845

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

library/src/eu/inmite/android/lib/dialogs/BaseDialogFragment.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ public Dialog onCreateDialog(Bundle savedInstanceState) {
4444
// custom dialog background
4545
final TypedArray a = getActivity().getTheme().obtainStyledAttributes(null, R.styleable.DialogStyle, R.attr.sdlDialogStyle, 0);
4646
Drawable dialogBackground = a.getDrawable(R.styleable.DialogStyle_dialogBackground);
47+
a.recycle();
4748
dialog.getWindow().setBackgroundDrawable(dialogBackground);
4849
return dialog;
4950
}
@@ -218,6 +219,7 @@ public View create() {
218219
mButtonBackgroundColorNormal = a.getColor(R.styleable.DialogStyle_buttonBackgroundColorNormal, defaultButtonBackgroundColorNormal);
219220
mButtonBackgroundColorPressed = a.getColor(R.styleable.DialogStyle_buttonBackgroundColorPressed, defaultButtonBackgroundColorPressed);
220221
mButtonBackgroundColorFocused = a.getColor(R.styleable.DialogStyle_buttonBackgroundColorFocused, defaultButtonBackgroundColorFocused);
222+
a.recycle();
221223

222224
View v = getDialogLayoutAndInitTitle();
223225

0 commit comments

Comments
 (0)