Settings background (background_holo_dark) [SOLVED!] - Android Themes

[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.

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

Bump... still having no luck.

DonDizzurp said:
Bump... still having no luck.
Click to expand...
Click to collapse
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

ricky310711 said:
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
Click to expand...
Click to collapse
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

DonDizzurp said:
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
Click to expand...
Click to collapse
really? im using 4.3 tw rom(My rom(smartdroid)) and i can still see the png file?
send your files and ill see what i can do!

FINALLY!!
If anyone else is stuck, follow the steps here: http://forum.xda-developers.com/showthread.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/showthread.php?t=1752201

Related

[Guide]How to de/recompile framework-res Sense 3.6

Edit: I figured out how to successfully edit framework-res for HTC Sense 3.6. I google'd the problem and found quite a bit of people having trouble with framework-res for Sense 3.6, so I figured I'd post a little guide on how to do it.
1. Download APK-Multitool and extract it to your C:/ directory.
2. Run the "Setup" batch file and use option 3.
3. Copy "Framework-res.apk" to the "Other" and "place-apk-here-for-modding" folders inside your APKMultitool folder.
4. Your going to need to run the "Setup" batch file again if you closed the terminal window. Choose option 2 which installs the framework.
5. Run the "Script" batch file and choose option 10 "Decompile apk with dependencies"
6. Locate the com.htc.resources.apk inside the same folder you took framework-res.apk. Drag com.htc.resources.apk onto the terminal window, this will automatically enter the path for your dependency and install it so you can de/recompile framework-res.
7. Do whatever you need to do with framework-res.
8. Choose option 11 "Compile system apk" and follow the prompts.
That's it, you should be able to successfully de/recompile framework-res using that method.
I don't know enough about your environment or Java to be much help, but check what version jdk is recommended. You might get a better response in general forums.
Nonverbose said:
I don't know enough about your environment or Java to be much help, but check what version jdk is recommended. You might get a better response in general forums.
Click to expand...
Click to collapse
I'm using the latest JDK which is version 7 (or update 7) and I'm running Windows 7 64 bit. I'm using a command prompt window for apktool, but I also have cygwin which also works with apktool. Every question I post in chef central or general Q&A gets ignored, which is why I thought I'd ask here where people know me.
Anything else you need to know?
Edit: Also how do I recompile framework-res from Sense 3.6? I can decompile just fine, but I've tried multiple programs (apktool, apkmulti-tool, and Virtuous ten studio) and none of them can recompile framework-res. I only changed a line in bools.xml.
ZaySk said:
I'm using the latest JDK which is version 7 (or update 7) and I'm running Windows 7 64 bit. I'm using a command prompt window for apktool, but I also have cygwin which also works with apktool. Every question I post in chef central or general Q&A gets ignored, which is why I thought I'd ask here where people know me.
Anything else you need to know?
Edit: Also how do I recompile framework-res from Sense 3.6? I can decompile just fine, but I've tried multiple programs (apktool, apkmulti-tool, and Virtuous ten studio) and none of them can recompile framework-res. I only changed a line in bools.xml.
Click to expand...
Click to collapse
Have you tried decompiling and recompiling with no changes? It could be a problem with your setup?
Nonverbose said:
Have you tried decompiling and recompiling with no changes? It could be a problem with your setup?
Click to expand...
Click to collapse
Hmm I'll give that a try. I know I tried that not long ago with android.policy, and it worked. I figured out the problem with android.policy, now I'm stuck on trying to recompile framework-res. I remember reading somewhere that certain proprietary ROM .apk's have dependencies on other ROM .apk's. I'm trying to re/decompile framework-res by itself, could that be the problem? If so which .apk do I need to use?
Appreciate you're help, thanks.
Have you read any of fernando sor's tutorials? He seems to have it sorted http://forum.xda-developers.com/showthread.php?t=1601511
Nonverbose said:
Have you read any of fernando sor's tutorials? He seems to have it sorted http://forum.xda-developers.com/showthread.php?t=1601511
Click to expand...
Click to collapse
Thank you! I had been searching for a thread like that since last night. Hopefully I'll be able to get things sorted out
ZaySk said:
Thank you! I had been searching for a thread like that since last night. Hopefully I'll be able to get things sorted out
Click to expand...
Click to collapse
No problem. Keep us updated.
Nonverbose said:
No problem. Keep us updated.
Click to expand...
Click to collapse
Ok, one more question and it's a pretty noob question. I can't for the life of me, find layout.xml! I even did an in-folder search for layout.xml and didn't find it. Is it not in framework-res for Sense 3.6? If so, what's the equivalent file? Or since I can't find the file, does that mean it's been depracated and I can skip that step? Sorry, I just want to be sure.
Edit: What about raws.xml? Is that also no longer in Sense 3.6 either?
I'm stuck at this part in the thread you linked to me -
go to res/values layout.xml
change this
Code:
<layout name="htc_list_item_2text_2stamp">@layout/zzzz_htc_list_item_2text_2stamp</layout>
<layout name="htc_list_item_2text_bright">@layout/zzzz_htc_list_item_2text_bright</layout>
<layout name="htc_list_item_image_2text_image_bright">@layout/zzzz_htc_list_item_image_2text_image_bright</layout>
<layout name="htc_list_item_imageicon_2text_2stamp">@layout/zzzz_htc_list_item_imageicon_2text_2stamp</layout>
<layout name="htc_list_item_imageicon_text">@layout/zzzz_htc_list_item_imageicon_text</layout>
<layout name="htc_list_item_separator">@layout/zzzz_htc_list_item_separator</layout>
<layout name="keyguard_screen_device_unlock">@layout/zzzz_keyguard_screen_device_unlock</layout>
<layout name="pin_keyboard">@layout/zzzz_pin_keyboard</layout>
to this
Code:
<item type="layout" name="htc_list_item_2text_2stamp">@layout/zzzz_htc_list_item_2text_2stamp</item>
<item type="layout" name="htc_list_item_2text_bright">@layout/zzzz_htc_list_item_2text_bright</item>
<item type="layout" name="htc_list_item_image_2text_image_bright">@layout/zzzz_htc_list_item_image_2text_image_bright</item>
<item type="layout" name="htc_list_item_imageicon_2text_2stamp">@layout/zzzz_htc_list_item_imageicon_2text_2stamp</item>
<item type="layout" name="htc_list_item_imageicon_text">@layout/zzzz_htc_list_item_imageicon_text</item>
<item type="layout" name="htc_list_item_separator">@layout/zzzz_htc_list_item_separator</item>
<item type="layout" name="keyguard_screen_device_unlock">@layout/zzzz_keyguard_screen_device_unlock</item>
<item type="layout" name="pin_keyboard">@layout/zzzz_pin_keyboard</item>
res/values layout.xml?
Nonverbose said:
res/values layout.xml?
Click to expand...
Click to collapse
It's not there.
Edit: Figured it out, thanks for your help Nonverbose.
ZaySk said:
It's not there.
Edit: Figured it out, thanks for your help Nonverbose.
Click to expand...
Click to collapse
Lol, help? I just realized that my answer was the almost the same as your question. Where did you find it?
Nonverbose said:
Lol, help? I just realized that my answer was the almost the same as your question. Where did you find it?
Click to expand...
Click to collapse
Lol, yea that post wasn't what helped me, it was you're previous posts. I used APKMulti-tool to decompile with com.htc.resources as a dependency and made my changes, then it FINALLY recompiled properly!

[MOD][XPERIA/other] Customizing UXPNXTLockscreen! [10Aug13]

Hello guys.
To re-theme stock UXP Lockscreen's clock/dateview on Xperia I created this topic. But codes can be used on other if you are interested.
-PREFACE-
Lots of Xperia users use UXPNXTLockscreen but if you bored on seeing same clock/dateview, this is for you.
While I was searching 'Lockscreen Themes', I saw some iPhone themes and it fired this thought so you will be able to create your own design.
-Example Snapshots-
Can be found on attachment. Searched / I modded.
-FILES-
Day, DayNumber, Month & Year .smali files.
(I seperated this from framework-res)
Added 2 packs.
Stock Pack- includes 4 smali files which uses system font!
FontPossibility Pack- includes 4 smali files which uses your selected font(s)!
-MODDING-
Decompile UxpNxtLockscreen.apk and copy one of pack inside com/erhany/ folder..
Mod w_clock.xml , other *.xml s or create a new .xml file.
PHP:
<com.erhany.Day android:layout_width="wrap_content" android:layout_height="wrap_content" />
<com.erhany.DayNo android:layout_width="wrap_content" android:layout_height="wrap_content" />
<com.erhany.Month android:layout_width="wrap_content" android:layout_height="wrap_content" />
<com.erhany.Year android:layout_width="wrap_content" android:layout_height="wrap_content" />
Here are the codes. You may need to add other lines like padding, style, textappearance etc. It's up to you and your creativity!
*If you use FontPossibility Pack, open .smali files and find 'LockscreenFont.ttf' and change its names to your selected fonts.
For 4 smali files you can use one font or four different fonts. It's up to you too.
Then copy your selected font(s) inside to assets/fonts/ folder in apk.
* And also you can change styles in smali files. Like August/Aug 09/9 Tue/Tuesday etc. Check EEEE dd M etc. on const-string v2 line to change style.
So I think you understood the method.
I hope it helps someone/ some people.
-NOTES-
I'm cutting thread here. Example clock I used systemUI's clock. Eclipse, droiddraw can help you to create your mods if you'r not so good at XML Modding.
These are so basic codes for programmers and I'm so new on android thing. Im just trying to develop myself on modding how i like and help noobs like me.
Happy mods.
in second screenshot , what rom are u used ? is that miui rom ??
wawan20 said:
in second screenshot , what rom are u used ? is that miui rom ??
Click to expand...
Click to collapse
You're talking to Erhany here, it could be any rom. He's great a modding stuff, remember. I think he is using Atomic GB.
Yo, great to see you're working on the lockscreen too now, Erhany. I think I once brought it up but you still don't think it's possible replacing sound toggle with camera shortcut? Here in this rom (or rom addon) for a GB rom in the Xperia Play section, someone has a lockscreen that looks like ours but with camera shortcut.
Can you learn anything from it, maybe?
http://forum.xda-developers.com/showthread.php?t=1860343
thank you for your work, but can you disable the widget screen to go straightly to the pattern lock screen like on ics
im saying that because when i use an external lock screen app its show me its screen then the widget lock screen(default device's lock screen) then the pattern lock screen, so i cant bypass the widget lock screen
thank you for your help :fingers-crossed:
Any idea how to exchange walkman for some other apps?

[Q] More Homescreens with default launcher

I'm trying to add more workspace screens to the default launcher homescreen.apk. I've used the apktool to extract the apk so that I can edit the xml files and it appears that how many pages that are available is located in /res/layout-land and layout-port in launcher.xml
these are the only lines i have yet found that look like anything to do with how many workspaces are available
Code:
<com.motorola.blur.home.Workspace android:id="@id/workspace" android:paddingLeft="@dimen/qsb_bar_height" android:paddingRight="@dimen/button_bar_height" android:layout_width="fill_parent" android:layout_height="fill_parent" launcher:defaultScreen="2" launcher:cellCountX="4" launcher:cellCountY="4" launcher:pageSpacing="@dimen/workspace_page_spacing" launcher:scrollIndicatorPaddingLeft="@dimen/qsb_bar_height" launcher:scrollIndicatorPaddingRight="@dimen/button_bar_height">
<include android:id="@id/cell1" layout="@layout/workspace_screen" />
<include android:id="@id/cell2" layout="@layout/workspace_screen" />
<include android:id="@id/cell3" layout="@layout/workspace_screen" />
<include android:id="@id/cell4" layout="@layout/workspace_screen" />
<include android:id="@id/cell5" layout="@layout/workspace_screen" />
so I figured adding extra include android:id="@id/cell#="@layout/workspace_screen" to both launcher files would add extra workspace screens but when I try to repack the apk it kicks an error, Error: No resource found that matches the given name (at 'id' with value '@id/cell#') for each time and whatever extra number of screens I add.
can anyone point me in the right direction and let me know what I'm doing wrong?
Thanks
95 views and no replies? Am I asking this question in the wrong forum?
Wannab007 said:
95 views and no replies? Am I asking this question in the wrong forum?
Click to expand...
Click to collapse
More likely people are reading but don't know how to help. Like me. LOL I'm curious though why you are attempting this rather than just installing a third party launcher?
Droid 4 - CM10.2
/res/layout-port/launcher.xml:
Code:
<include android:id="@id/#" layout="@layout/workspace_screen" />
/res/values/ids.xml:
Code:
<item type="id" name="#">false</item>
kwyrt said:
More likely people are reading but don't know how to help. Like me. LOL I'm curious though why you are attempting this rather than just installing a third party launcher?
Droid 4 - CM10.2
Click to expand...
Click to collapse
i notice some things dont work with the nova launcher or the others ive tried, for example, swiping the favorites on the default launcher opens up a larger list of favorites, this doesnt work on the 3rd party launchers that ive tried
also its good to learn new ****
Mentor.37 said:
/res/layout-port/launcher.xml:
Code:
<include android:id="@id/#" layout="@layout/workspace_screen" />
/res/values/ids.xml:
Code:
<item type="id" name="#">false</item>
Click to expand...
Click to collapse
i totally missed those in values in ids, il try adding the extra cell# and see if that work
thanks
well i still must be doing something wrong in the process of repacking the apk or with signing or something, not sure what, it seems the apk does build properly but when i upload it to the phone and reboot, the default homescreen is no longer an option only the 3rd party launchers, guess i need to google and read more on how to properly decompile edit recompile apks
yup was doing it wrong, after repacking the apk with apkmultitool, extract the unsigned apk with 7zip, then open as archive the original or copy of with 7zip and replace the res directory, working now with all 7 cells

[help] nemus launcher mod

Hi !
First I own an Xperia V, ICS 4.0.4 with 9.0.1.D.0.10 Firmware
So , I use Nemus Launcher (It's the smoothest launcher for me) which has a notification function and can display notification bubbles in the top left hand corner of an APP in the homescreen.
My question is : How can I mod the APK of Nemus launcher in order to display the bubbles at the top right hand corner of an APP and IF POSSIBLE make it like iOS , I mean not completly on the application's icon but that is half in half out..
(Please look at the attached pic to see how it is..)
I know how to decompile an APK but to do what I described is beyond me :/
Please try to help me, Thanks !
THE PIC :
its possible and too hard
try to use other launcher's , its better than modding launcher :fingers-crossed:
sgt.reza said:
its possible and too hard
try to use other launcher's , its better than modding launcher :fingers-crossed:
Click to expand...
Click to collapse
But I want to stay on Nemus, since I try it I can change !
But if the dev succeed to put it at left , why can I make the contrary ?
Yozil13 said:
But I want to stay on Nemus, since I try it I can change !
But if the dev succeed to put it at left , why can I make the contrary ?
Click to expand...
Click to collapse
Because the dev has the source files, you don't; you'd have to decompile and hope it's something as simple as modifying one of the layout .xml files, or else do it in smali... which is a lot harder.
Antiga Prime said:
Because the dev has the source files, you don't; you'd have to decompile and hope it's something as simple as modifying one of the layout .xml files, or else do it in smali... which is a lot harder.
Click to expand...
Click to collapse
There is only 1 xml file (I think by the name) that can match to the notification bubbles -> launcher_noti_layout.xml :
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout android:id="@id/launcher_noti_container" android:background="#cc000000" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="35.339996dip"
xmlns:android="http://schemas.android.com/apk/res/android">
<TextView android:textColor="#ffffffff" android:gravity="center" android:layout_gravity="center" android:id="@id/launcher_noti_textview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="" android:drawablePadding="10.0dip" />
</FrameLayout>
I tried to edit it and replace "center" by top etc.. but NOTHING changes..
As for .smali files there's some files named BadgeInfo BadgeService etc.. but it is JAVA language and I DO NOT UNDERSTAND ANYTHING
I have attached a .rar file with NEMUS decompiled, if you can check it and solve my problem it would be nice :angel:
Yozil13 said:
There is only 1 xml file (I think by the name) that can match to the notification bubbles -> launcher_noti_layout.xml :
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout android:id="@id/launcher_noti_container" android:background="#cc000000" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="35.339996dip"
xmlns:android="http://schemas.android.com/apk/res/android">
<TextView android:textColor="#ffffffff" android:gravity="center" android:layout_gravity="center" android:id="@id/launcher_noti_textview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="" android:drawablePadding="10.0dip" />
</FrameLayout>
I tried to edit it and replace "center" by top etc.. but NOTHING changes..
As for .smali files there's some files named BadgeInfo BadgeService etc.. but it is JAVA language and I DO NOT UNDERSTAND ANYTHING
I have attached a .rar file with NEMUS decompiled, if you can check it and solve my problem it would be nice :angel:
Click to expand...
Click to collapse
If nothing changes, then that is either not the file you're looking for, you don't know what you should be expecting with changing the gravity, or it's done in java. For the record, smali is not java.
Secondly, you did not attach anything, and I don't think I'm interested in figuring out how to do that, I don't use Nemus Launcher, and don't plan on doing so, no offense.
Antiga Prime said:
If nothing changes, then that is either not the file you're looking for, you don't know what you should be expecting with changing the gravity, or it's done in java. For the record, smali is not java.
Secondly, you did not attach anything, and I don't think I'm interested in figuring out how to do that, I don't use Nemus Launcher, and don't plan on doing so, no offense.
Click to expand...
Click to collapse
Ok no problem
I upload it for others , i've still hope lol

[GUIDE][LP,MM] How To Add Image In About Phone Menu!!

Welcome everyone!!!
Here i Guide You to How to add image in about phone menu
Requirements
Apktool
Knowledge of decompiling/recompiling
Settings.apk
notepad++
an image
VIDEO GUIDE
For more guides join our offical facebook group
Subscribe to my youtube channel here
Firstly setup apktools on your windows after that extract framework-res.apk,Mediatek-res.apk and SystemUI.apk
Now install all these above apk in your apktool by using following commands
framework
Code:
apktool if framework-res.apk
mediatek-res
Code:
apktool if mediatek-res.apk
systemui
Code:
apktool if SystemUi.apk
after that extract your settings.apk from your rom and decompile it using
Settings
Code:
apktool d settings.apk
after decompilition is sucessful locate to settings folder and go to path
Code:
res/layout
here create a new xml file with any name for example i create a xml with name paras.xml
now add this code to your new xml file or jus copy paste the code
Code:
<?xml version="1.0" encoding="utf-8"?>
<ImageView android:layout_gravity="center" android:paddingBottom="6.0dip" android:layout_width="480.0px" android:layout_height="147.0px" android:src= Drawable/pg" android:scaleType="fitXY"
xmlns:android="http://schemas.android.com/apk/res/android" />
now if you look at above code there is height and width is mention now you have to create or resize your image with same height and width also in Drawble/ name of your image
now save it with extention (.xml)
after that
open path
Code:
res/xml/device_info_settings.xml
here you have to add code
Code:
<PreferenceCategory android:layout="layout/paras" android:title="" android:key="blah" />
now look at code there is layout/paras "paras" should be same name as u create a new xml in res/layout
now at last
open path
Code:
res/drawble
and add a image of your choice which u want to add in your about phone settings.
all done if u getting confused watch my video guide above
at last save yor xmls and recompile your settings apk
using
Code:
APKTOOL B SETTINGS
push your apk to your phone replace this with your original ,all done
THANX FOR READ
Dont forget to hit thanks
I'm almost positive you didn't come up with this mod on your own especially due to all the various guides already shared to do this mod . If your gonna create a guide which already exists then there's no need to post or at least give credit to original source that's only fair. I'm the furthest thing from an xda police officer but I'm just sayin.
SICKMADE said:
I'm almost positive you didn't come up with this mod on your own especially due to all the various guides already shared to do this mod . If your gonna create a guide which already exists then there's no need to post or at least give credit to original source that's only fair. I'm the furthest thing from an xda police officer but I'm just sayin.
Click to expand...
Click to collapse
Sir m new here, and i didnt found any thred in which someone teach this. . i googled n search i come up with empty hand thats y i write this guide i found this my self while rom porting ...and there is no video guide also .. m also a begginer i jus help some noobies here. No if any want to theme i can guide them beacause there are too much comlicated guide which are not easily understandble by a noobie..thats why i write guides along videos .....thnx for your time that u noticedd ... M jus helping noobies .. No offence here..

Categories

Resources