BlackOut screen in preference window

I am creating a PreferenceScreen at runtime. But screen dimming when trying to scroll.

For ListView

there is a condition to avoid such a situation,

android:cacheColorHint="@android:color/transparent"

      

But there is no such state for PreferenceScreen.

How can I avoid turning off the screen in PreferenceScreen?

+3


source to share


2 answers


Try this thing.



getListView().setBackgroundColor(Color.TRANSPARENT);
getListView().setBackgroundColor(Color.rgb(4, 26, 55));

      

+1


source


This is an old question, but maybe this answer will help those who find it:

Try the following:

In your android manifest file add "@android: style / Theme.Light.WallpaperSettings" to your preference activity.



Example:

<activity
        android:label="@string/cube2_settings"
        android:name=".CubeWallpaper2Settings"
        android:theme="@android:style/Theme.Light.WallpaperSettings"
        android:icon="@drawable/ic_launcher_wallpaper"
        android:exported="true"
        android:screenOrientation="unspecified" >
</activity>

      

0


source







All Articles