5,598,297 Members 47,762 Now Online
XDA Developers Android and Mobile Development Forum

Settings background (background_holo_dark) [SOLVED!]

Tip us?
 
DonDizzurp
Old
(Last edited by DonDizzurp; 27th January 2014 at 09:32 PM.)
#1  
DonDizzurp's Avatar
Senior Member - OP
Thanks Meter 394
Posts: 2,244
Join Date: Aug 2009
Location: The Internet
Default Settings background (background_holo_dark) [SOLVED!]

[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.
Current Phone: Google G-nex
ROM: CyanogenMod v10.3.1
Kernel: LeanKernel v8.3
Recovery: ClockworkMod v6.0.4.3


Current Tablet: LG G-Pad 8.3
ROM: CyanogenMod v11 (nightly)
Kernel: Original CM11 Kernel
Recovery: TWRP v2.6.3.2


 
...
 
...
 
keep going
 
...
 
...
 
lol you clicked for no reason
 
 
DonDizzurp
Old
#2  
DonDizzurp's Avatar
Senior Member - OP
Thanks Meter 394
Posts: 2,244
Join Date: Aug 2009
Location: The Internet
I've looked everywhere and it seems every time someone asks something similar the thread ends without any solution.. looks like this isn't any different. Tried countless different things with no luck
Current Phone: Google G-nex
ROM: CyanogenMod v10.3.1
Kernel: LeanKernel v8.3
Recovery: ClockworkMod v6.0.4.3


Current Tablet: LG G-Pad 8.3
ROM: CyanogenMod v11 (nightly)
Kernel: Original CM11 Kernel
Recovery: TWRP v2.6.3.2


 
...
 
...
 
keep going
 
...
 
...
 
lol you clicked for no reason
 
 
DonDizzurp
Old
#3  
DonDizzurp's Avatar
Senior Member - OP
Thanks Meter 394
Posts: 2,244
Join Date: Aug 2009
Location: The Internet
Bump... still having no luck.
Current Phone: Google G-nex
ROM: CyanogenMod v10.3.1
Kernel: LeanKernel v8.3
Recovery: ClockworkMod v6.0.4.3


Current Tablet: LG G-Pad 8.3
ROM: CyanogenMod v11 (nightly)
Kernel: Original CM11 Kernel
Recovery: TWRP v2.6.3.2


 
...
 
...
 
keep going
 
...
 
...
 
lol you clicked for no reason
 
 
ricky310711
Old
#4  
ricky310711's Avatar
Recognized Contributor
Thanks Meter 4274
Posts: 3,355
Join Date: Feb 2013
Location: Sydney

 
DONATE TO ME
Quote:
Originally Posted by DonDizzurp View Post
Bump... still having no luck.
Im pretty sure it resides in framework-res.apk/res/drawable-nodpi/ the current background is in there so editing/replacing it should work!(note- the file might be in systemUI.apk/res/drawable-nodpi) im not too sure
Like my blog on facebook, add me to your circles, follow me on twitter or donate to me with paypal
 
DonDizzurp
Old
#5  
DonDizzurp's Avatar
Senior Member - OP
Thanks Meter 394
Posts: 2,244
Join Date: Aug 2009
Location: The Internet
Quote:
Originally Posted by ricky310711 View Post
Im pretty sure it resides in framework-res.apk/res/drawable-nodpi/ the current background is in there so editing/replacing it should work!(note- the file might be in systemUI.apk/res/drawable-nodpi) im not too sure
Thanks but ever since android 4.2.x the PNG in /nodpi was removed and an XML file in /drawable is used for the gradient. My question is what code is required in this XML file in order to use a PNG instead of the gradient

Sent from my Galaxy Nexus using Tapatalk
Current Phone: Google G-nex
ROM: CyanogenMod v10.3.1
Kernel: LeanKernel v8.3
Recovery: ClockworkMod v6.0.4.3


Current Tablet: LG G-Pad 8.3
ROM: CyanogenMod v11 (nightly)
Kernel: Original CM11 Kernel
Recovery: TWRP v2.6.3.2


 
...
 
...
 
keep going
 
...
 
...
 
lol you clicked for no reason
 
 
ricky310711
Old
#6  
ricky310711's Avatar
Recognized Contributor
Thanks Meter 4274
Posts: 3,355
Join Date: Feb 2013
Location: Sydney

 
DONATE TO ME
Quote:
Originally Posted by DonDizzurp View Post
Thanks but ever since android 4.2.x the PNG in /nodpi was removed and an XML file in /drawable is used for the gradient. My question is what code is required in this XML file in order to use a PNG instead of the gradient

Sent from my Galaxy Nexus using Tapatalk
really? im using 4.3 tw rom(My rom(smartdroid)) and i can still see the png file?
:P send your files and ill see what i can do!
Like my blog on facebook, add me to your circles, follow me on twitter or donate to me with paypal
 
DonDizzurp
Old
#7  
DonDizzurp's Avatar
Senior Member - OP
Thanks Meter 394
Posts: 2,244
Join Date: Aug 2009
Location: The Internet
FINALLY!!

If anyone else is stuck, follow the steps here: http://forum.xda-developers.com/show...php?p=49811369

Read my post in that thread as well if you get stuck.

Here's a short refresher course on apktool http://forum.xda-developers.com/show....php?t=1752201
Current Phone: Google G-nex
ROM: CyanogenMod v10.3.1
Kernel: LeanKernel v8.3
Recovery: ClockworkMod v6.0.4.3


Current Tablet: LG G-Pad 8.3
ROM: CyanogenMod v11 (nightly)
Kernel: Original CM11 Kernel
Recovery: TWRP v2.6.3.2


 
...
 
...
 
keep going
 
...
 
...
 
lol you clicked for no reason
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


XDA PORTAL POSTS

Easily Configure Xposed Module Projects in Eclipse

XDA Recognized Developer rovo89‘s innovative and versatile Xposed Framework allows … more

Android Control Center Becomes Quick Control Panel, Brings Host of New Features

You may recall that back in August of last year, we talked … more

Polish Your Custom Themes with Theme Debugger

Creating a custom Android theme from scratch can be quite the laborious task. In addition to … more

Clean Up Your Logcat Code with Lib Cleaner

Some of you may think that writing code is the hardest part of development. It’s not, as the … more