android - How to disable PreferenceFragment transparency? -
i guess it's ok set background color in average fragment average layout, here i've got preferencefragment
, layout (preferencescreen
) doesn't support android:background
field. what's neat way handle it?
add following preferencefragment class declaration
@override public view oncreateview(@nonnull layoutinflater inflater, viewgroup container, bundle savedinstancestate) { view view = super.oncreateview(inflater, container, savedinstancestate); if (view != null) { view.setbackgroundcolor(getresources().getcolor(android.r.color.background_dark)); } return view; }
Comments
Post a Comment