Change Background PreferenceActivity

How can I completely change the background color of preferenceActivity? See my screenshot. There is a white frame on the tablet around the background background and list background. I cannot figure out how to change its color / paintability. I just need to make it transparent.

This is how I took a screenshot. This code is placed in onCreate of PreferenceActivity.

this.getListView().setBackgroundDrawable(this.getResources().getDrawable(R.drawable.splash_bg));
this.getWindow().setBackgroundDrawable(this.getResources().getDrawable(R.drawable.splash_bg));

Hopefully I don't have to fall into any styles, and I just can access it in code for simplicity. enter image description here

+4
source share
1 answer

, . - android: id/list

:

    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:minHeight="?android:attr/listPreferredItemHeight"
        android:gravity="center_vertical"
        android:background="@drawable/DRAWABLE HERE"
 >
    <ListView android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:id="@android:id/list"
        android:layout_marginLeft="50dp"
        android:layout_marginRight="50dp"
        />

    </LinearLayout>

onCreate PrefActivity:

    this.setContentView(R.layout.pref_act);
+5

All Articles