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?

enter image description here

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

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -