Closed ted66 closed 10 years ago
// custom dialog background final TypedArray a = getActivity().getTheme().obtainStyledAttributes(null, R.styleable.DialogStyle, R.attr.sdlDialogStyle, 0); Drawable dialogBackground = a.getDrawable(R.styleable.DialogStyle_dialogBackground); a.recycle(); dialog.getWindow().setBackgroundDrawable(dialogBackground);
a is nullpoint and dialogBackground is null too
How did you manage to make it null? Did you set it as null in yours styles.xml?
yes,it my falut
thx ur answer
// custom dialog background final TypedArray a = getActivity().getTheme().obtainStyledAttributes(null, R.styleable.DialogStyle, R.attr.sdlDialogStyle, 0); Drawable dialogBackground = a.getDrawable(R.styleable.DialogStyle_dialogBackground); a.recycle(); dialog.getWindow().setBackgroundDrawable(dialogBackground);
a is nullpoint and dialogBackground is null too