Quantcast
Channel: xda-developers - Android Themes
Viewing all articles
Browse latest Browse all 4090

Settings background (background_holo_dark)

$
0
0
[Using Android 4.3.1 (CM10.2) on a Galaxy Nexus]

I'm attempting to replace the stock gradient background of the settings menu. I was able to get it to show all black instead of the gradient but I can't seem to get it to show a PNG image.

This is what is found in the /res/drawable/background_holo_dark.xml file

Original gradient:
Code:

<shape
xmlns:android="http://schemas.android.com/apk/res/android">
<gradient android:startColor="#ff000000"
android:endColor="#ff272d33" android:angle="270.0" />
</shape>

Black background:
Code:

<?xml version="1.0" encoding="utf-8"?>
<shape
  xmlns:android="http://schemas.android.com/apk/res/android">
    <solid android:color="@color/black" />
</shape>

Attempt at using a PNG image (image placed in /drawable-nodpi/background_holo_dark.png) courtesy of this thread
Code:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical"
    android:background="@drawable/background_holo_dark" />

Using the above code to use an image as the background causes settings to force close. When I open Root Browser (which uses background_holo_dark.xml) it says something along the lines of "size of image too large".

Anyone know why the code fails? 4.2.x only required you to delete the .xml file and add the .png file to nodpi which doesn't work for 4.3.x. Prior to 4.2.x all you had to do was replace the .png file.

Viewing all articles
Browse latest Browse all 4090

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>