Fellow Android chefs, I need some help.
Up to Android 4.1.2 you could easily change the Settings background by replacing the framework-res/res/drawable-nodpi/background_holo_dark.png. This png was also responsible for background in SystemUI, Mms and some other apps.
From Android 4.2.0 Google changed this behavior. They've hardcoded it in the /framework-res/red/drawable/background_holo_dark.xml and have moved from png resource to color - gradient or solid.
This is the content of background_holo_dark.xml:
Code:
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android">
<gradient android:startColor="#ff000000" android:endColor="#ff272d33" android:angle="270.0" />
</shape>
I have a problem reverting this change back to the pre-4.2.0 behavior, means - I want to use the background_holo_dark.png instead of the coded color in the xml.
Any thoughts?
Are images referable in xml files?
I know nothing of ROM development, I'll try not to be nuisance, but here goes...
Can you store the .png you want to use somewhere suitable, and then refer to it in the /framework-res/red/drawable/background_holo_dark.xml file?
for example (pseudo code, n00b remember )
Code:
<image = /where/ever/the/image/is/stored.png
</image>
Hope this helps (at least a bit)
Thanks for the reply. Yes, I know that I need to point in the xml to the png, but I don't know the right format that's xml expecting.
brainmaster said:
Thanks for the reply. Yes, I know that I need to point in the xml to the png, but I don't know the right format that's xml expecting.
Click to expand...
Click to collapse
Oh, I see. Sorry I couldn't've been of more help.
---edit---
Wait a moment, I confess I don't think I read your Q properly: I didn't realise it was coded into framework-res.apk, I assumed it was contained within Settings.apk .
HTCDreamOn said:
Oh, I see. Sorry I couldn't've been of more help.
Click to expand...
Click to collapse
No problem. I appreciate the effort.
Sorry for intruding but take a look here. See the last part of post 36. If you still don't get it, just PM Uber.
http://forum.xda-developers.com/showpost.php?p=36079807&postcount=36
Sent from my Nexus 7
veeman said:
Sorry for intruding but take a look here. See the last part of post 36. If you still don't get it, just PM Uber.
http://forum.xda-developers.com/showpost.php?p=36079807&postcount=36
Sent from my Nexus 7
Click to expand...
Click to collapse
Thanks, gonna take a look.
The next question would be - how can i delete xml through the VRTheme System?
Related
I've got adw launcher decompiled and I would like to change startup defaults. To start out I'd like to change the startup main dock style from 3 to 5. Can someone tell me which xml file and variable holds this value?
config_main_dock_style is in res/values/config.xml -- atleast according to CM7's version.
https://github.com/CyanogenMod/andr...er/blob/gingerbread/res/values/config.xml#L77
FaultException said:
config_main_dock_style is in res/values/config.xml -- atleast according to CM7's version.
https://github.com/CyanogenMod/andr...er/blob/gingerbread/res/values/config.xml#L77
Click to expand...
Click to collapse
Thanks for the reply. it turned out to be:
Code:
<string name="config_main_dock_style">2</string>
located in values/strings.xml
jocala said:
Thanks for the reply. it turned out to be:
Code:
<string name="config_main_dock_style">2</string>
located in values/strings.xml
Click to expand...
Click to collapse
Ah. Must be a different version.
Hi dudes, so im trying to get the T9 dialer from CM9 onto 4.1.1 ROM for the Galaxy Nexus..
This is far as i got:
It all works 100% BUT the app names have changed to "true" and "false" lol
I know its because the androidmanifest is pointing to the wrong value but im not sure how to fix it... can anyone point me in the right direction?
Cheers
attatched is the Contacts.apk working with the wrong app names
I'm driving into work. I'll look when I get in.
Sent from my Galaxy Nexus using xda premium
lithid-cm said:
I'm driving into work. I'll look when I get in.
Sent from my Galaxy Nexus using xda premium
Click to expand...
Click to collapse
Awesome bro I gave up after my mouse went flat and i chucked it out the window lol. You might have an issue decompiling it also, if you do its because of the manifest... sure you'll figure that out though.
Sent from my Galaxy Nexus using Tapatalk 2
CdTDroiD said:
Awesome bro I gave up after my mouse went flat and i chucked it out the window lol. You might have an issue decompiling it also, if you do its because of the manifest... sure you'll figure that out though.
Sent from my Galaxy Nexus using Tapatalk 2
Click to expand...
Click to collapse
Why not just zip up the source code? I am grabbing apktool now, but shouldn't be a reason with this being aosp after all.
Line:
Code:
<application android:label="@bool/config_use_two_panes" android:icon="@mipmap/ic_launcher_contacts" android:name="com.android.contacts.ContactsApplication" android:taskAffinity="android.task.contacts" android:hardwareAccelerated="true">
Needs to change
Code:
@bool/config_use_two_panes > @string/contactsList
=====
Line:
Code:
<activity android:theme="@style/DialtactsTheme" android:label="@bool/config_editor_field_order_primary" android:icon="@mipmap/ic_launcher_phone" android:name=".activities.DialtactsActivity" android:enabled="@android:bool/config_bluetooth_wide_band_speech" android:taskAffinity="android.task.contacts.phone" android:clearTaskOnLaunch="true" android:launchMode="singleTask" android:screenOrientation="portrait" android:windowSoftInputMode="stateAlwaysHidden|adjustNothing" android:uiOptions="splitActionBarWhenNarrow">
Need to change
Code:
@bool/config_editor_field_order_primary > @string/launcherDialer
=====
Line:
Code:
<activity android:theme="@style/PeopleTheme" android:label="@bool/config_editor_include_phonetic_name" android:name=".activities.PeopleActivity" android:clearTaskOnLaunch="true" android:launchMode="singleTop" android:uiOptions="splitActionBarWhenNarrow">
Need to change
Code:
@bool/config_editor_include_phonetic_name > @string/people
=====
Line:
Code:
<activity android:theme="@style/ContactPickerLayout" android:label="@bool/config_use_two_panes" android:name=".activities.ContactSelectionActivity" android:clearTaskOnLaunch="true" android:launchMode="singleTop" android:uiOptions="splitActionBarWhenNarrow">
Need to change
Code:
@bool/config_use_two_panes > @string/contactsList
That should be it. Enjoy.
lithid-cm said:
Why not just zip up the source code? I am grabbing apktool now, but shouldn't be a reason with this being aosp after all.
Click to expand...
Click to collapse
Heres the decompiled version, Ive also included the modified AndroidManifest.xml that it needs to install the app (But wont decompile)
The manifest in the source is the CM9 one
lithid-cm said:
Line:
Code:
<application android:label="@bool/config_use_two_panes" android:icon="@mipmap/ic_launcher_contacts" android:name="com.android.contacts.ContactsApplication" android:taskAffinity="android.task.contacts" android:hardwareAccelerated="true">
Needs to change
Code:
@bool/config_use_two_panes > @string/contactsList
=====
Line:
Code:
<activity android:theme="@style/DialtactsTheme" android:label="@bool/config_editor_field_order_primary" android:icon="@mipmap/ic_launcher_phone" android:name=".activities.DialtactsActivity" android:enabled="@android:bool/config_bluetooth_wide_band_speech" android:taskAffinity="android.task.contacts.phone" android:clearTaskOnLaunch="true" android:launchMode="singleTask" android:screenOrientation="portrait" android:windowSoftInputMode="stateAlwaysHidden|adjustNothing" android:uiOptions="splitActionBarWhenNarrow">
Need to change
Code:
@bool/config_editor_field_order_primary > @string/launcherDialer
=====
Line:
Code:
<activity android:theme="@style/PeopleTheme" android:label="@bool/config_editor_include_phonetic_name" android:name=".activities.PeopleActivity" android:clearTaskOnLaunch="true" android:launchMode="singleTop" android:uiOptions="splitActionBarWhenNarrow">
Need to change
Code:
@bool/config_editor_include_phonetic_name > @string/people
=====
Line:
Code:
<activity android:theme="@style/ContactPickerLayout" android:label="@bool/config_use_two_panes" android:name=".activities.ContactSelectionActivity" android:clearTaskOnLaunch="true" android:launchMode="singleTop" android:uiOptions="splitActionBarWhenNarrow">
Need to change
Code:
@bool/config_use_two_panes > @string/contactsList
That should be it. Enjoy.
Click to expand...
Click to collapse
I know thats what i figured, sorry should have been clearer, my issue is i cant recompile with that AndroidManifest...
CdTDroiD said:
I know thats what i figured, sorry should have been clearer, my issue is i cant recompile with that AndroidManifest...
Click to expand...
Click to collapse
Are you using apktool, sources? When you say recompile.
lithid-cm said:
Are you using apktool, sources? When you say recompile.
Click to expand...
Click to collapse
Yea using apktool 1.4.3
java -jar apktool.jar b Contacts
To get it to install on the device i used the 4.1.1 manifest from my original Contacts.apk and the META folder for signing, otherwise it wont install, and for some reason i dont understand it seems to change the manifest on install or something crazy... either that or im just to tired and missing something lol
SO it will only recompile if i use the CM9 Contacts manifest
heres the pastebin of the recompile
http://pastebin.com/yQLnVeSy
Ah right its because of the MANIFEST.MF that im using that is screwing it up...
but how do i get around that? Thanks for your help by the way mate
CdTDroiD said:
Ah right its because of the MANIFEST.MF that im using that is screwing it up...
but how do i get around that? Thanks for your help by the way mate
Click to expand...
Click to collapse
I guess I don't understand why you are making it harder then it is. This is aosp, you should be using an aosp base, making your changes and compiling. This isn't a sense, blur, touchwiz or miui. Sources are available and there is no reason to use apktool. Chances are it's a bug, I would go about it the right way and just build the app from source. If you need my help to work out issues with apktool, I can't help you. I would though be more then happy to help you build it the right way.
lithid-cm said:
I guess I don't understand why you are making it harder then it is. This is aosp, you should be using an aosp base, making your changes and compiling. This isn't a sense, blur, touchwiz or miui. Sources are available and there is no reason to use apktool. Chances are it's a bug, I would go about it the right way and just build the app from source. If you need my help to work out issues with apktool, I can't help you. I would though be more then happy to help you build it the right way.
Click to expand...
Click to collapse
Ok i didnt even think of it for some reason, ill compile it from source and see how i go... Thanks mate
I'm recently trying to edit my framework with this mod
http://forum.xda-developers.com/show....php?t=1916094
Well actually the steps in that thread are very simple, but since I'm trying to apply that to my Xperia Ray so it must have slightly different steps
What I want to ask :
- In framework/res, I found drawable-.........( mdpi,hdmpi,ldpi,etc.). If I'm going to replace the .9png's picture in there, should I make the picture as same as the original picture dimension? I'm using Dev-Drawable app in the Play Store ( it makes picture to drawable- hdpi,mdpi,etc. ), the result of using it is it gives me the mdpi version of the picture but with different dimesion from the original picture.
- I found errors and it says that I have errors in the /res/values/public.xml
I found this :
Code:
Don't do that! I think I should explain the purpose of public.xml file in the project wiki, because many people are confused. Note that you don't need this file when you build an apk from sources and apktool building mechanisms are very similar, so guess what: you could remove this file from decoded application and apktool will rebuild it without any problems. I had a reason why to generate public.xml - it's a feature, not a bug!
Well, the reason is: there may be references to resources in the application code. If resources ids will change after build, then code will reference different resources than in original apk. public.xml file gives us sureness that resources will get same ids after build - it's the only one reason to use this file. And you want to manually modify these ids
Adding or removing new resources is somewhat tricky. Yeah, I should write about that in the wiki.
You could remove any line from public.xml (even making a "hole" in the ids) at any moment, but you must be sure, that resource isn't referenced in the code.
There is never much sense in modifying ids in public.xml, because then modified lines lose their purpose.
If you want to add new resources, e.g. drawables and use them in the XML files you don't have to change anything in the public.xml file.
If you want to add new resources and use them in your code, then you have to add them into public.xml, because you need to reference them somehow. Or you could use Resources.getIdentifier() method, but this is ugly.
And now the most tricky part: if you want to remove some resources, you have to remove info about them from public.xml as well. So first you have to be sure that they aren't referenced in the code. But there is also this "hole" problem, so:
If these resources are at the end of ids stack, then there is no problem.
If resources are near the end of ids stack and you are sure, that all resources after them aren't referenced in the code as well, then you could just remove them all. Actually you have did virtually the same, cause after modifying ids you made these lines totally useless, you broke them, so you could just remove them.
If you want to remove some resources, but add same or greater quantity of new ones (of the same type), then there is no problem - new resources will automatically fill in "holes" in ids. You don't have to add them to public.xml .
If none of above conditions are met, then you have holes and you have to fill them by something. But you don't have to add "useless .pngs" - just add:
Code:
<item type="drawable" name="DUMMY1" />
<item type="drawable" name="DUMMY2" />
<item type="drawable" name="DUMMY3" />
...
Like above, you don't have to add these resources to the public.xml .
And because I'm a newbie I don't really get what that mean. So I just delete the files that I'm going to replace and I can re-compile the framework, but I got bootloop, LOL.
I confused about :
1."You could remove any line from public.xml (even making a "hole" in the ids) at any moment, but you must be sure, that resource isn't referenced in the code."
What are the "holes" and " referenced in the code" mean?
2. Because I want to add .png's picture to the drawable-mdpi folder, Do I need to add dummies to the public.xml ?
3. I'm using the tricky signing method ( open archive in the original framework, copy meta-inf & android manifest and replace those files to the modded framework). Is this cause me an error?
Help me mateee
Why do you post this thread 2 times?
mihahn said:
Why do you post this thread 2 times?
Click to expand...
Click to collapse
Cause no one reply & help meee:crying:
RivaultUser said:
What I want to ask :
- In framework/res, I found drawable-.........( mdpi,hdmpi,ldpi,etc.). If I'm going to replace the .9png's picture in there, should I make the picture as same as the original picture dimension? I'm using Dev-Drawable app in the Play Store ( it makes picture to drawable- hdpi,mdpi,etc. ), the result of using it is it gives me the mdpi version of the picture but with different dimesion from the original picture.
Click to expand...
Click to collapse
It's best to keep the original dimensions yes although not essential, but some images will look strange if not.
RivaultUser said:
- I found errors and it says that I have errors in the /res/values/public.xml
I found this :
Code:
Don't do that! I think I should explain the purpose of public.xml file in the project wiki, because many people are confused. Note that you don't need this file when you build an apk from sources and apktool building mechanisms are very similar, so guess what: you could remove this file from decoded application and apktool will rebuild it without any problems. I had a reason why to generate public.xml - it's a feature, not a bug!...
I confused about :
1."You could remove any line from public.xml (even making a "hole" in the ids) at any moment, but you must be sure, that resource isn't referenced in the code."
What are the "holes" and " referenced in the code" mean?
Click to expand...
Click to collapse
It means you can remove lines so long as they don't point to anything in the drawables folder for example.
RivaultUser said:
2. Because I want to add .png's picture to the drawable-mdpi folder, Do I need to add dummies to the public.xml ?
Click to expand...
Click to collapse
No.
RivaultUser said:
3. I'm using the tricky signing method ( open archive in the original framework, copy meta-inf & android manifest and replace those files to the modded framework). Is this cause me an error?
Click to expand...
Click to collapse
No. If you're doing it like in my guide you should be fine. Re read the bold quoted text above.
hi all..
I don't know where i must share this guide
so please call the moderator to deleted my post if i'm in wrong thread
this is not my really guide..so i give credits to the developer who first discovered this guide
and please write a comment if i'm wrong or i don't give credits to the developer
check this out
first you must decompile twframework-res.apk
and you can find
res/colour
well here is basically a bridge connecting the actual color code
example
i used this xml
tw_textappearance_grouptitle.XML
and i found this code
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/tw_color001" />
</selector>​
and the code it self was tw_001
VALUES/colour.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="tw_color001">#ffff0000</color>
<color name="tw_color002">#ff99fe80</color>
<color name="tw_color003">#ff99ff00</color>
<color name="tw_color004">#ffff4500</color>
<color name="tw_color005">#ffc8c8c8</color>
<color name="tw_color006">#ffff0033</color>
<color name="tw_color007">#ffccfe80</color>
<color name="tw_color008">#ff5e5e5e</color>
<color name="tw_color009">#ff6c6c6c</color>
<color name="tw_color010">#ff105886</color>
<color name="tw_color011">#ff4f4f4f</color>
<color name="tw_color012">#ff636363</color>
and further​
and it is the database code that you will change the color using the color hex code
after you change the colour codes recompile the apk
i'm sorry about my stupid english...
if this simple guide was help you..please press thanks
Credits...to all developer
From where u got this guide?
Want To Ask Question? Ask Here
Thanks,
TechnoSavie
(re) guide
technosavie said:
From where u got this guide?
Want To Ask Question? Ask Here
Thanks,
TechnoSavie
Click to expand...
Click to collapse
i found this guide from my experience sir
when i use ussr v8 my font colour is white
and when i use ussr v9 my font colour is grey
so..i try to change ussr v9 using twframework ussr v8
and my font colour was change to white
I think why do not I just
decompile it twframework it
worked
i'm sorry about my stupid english
:good:
nice guide bro
there are many prople here who keep asking how to fix black text on black text...
this guide will help them
Ubuntu themed apps and other stuff here
Click to expand...
Click to collapse
--->make phone faster and battery efficient
--->partition and link2sd for NOOBS?!?!?
--->3d games for galaxy y (no root no lag)
Thanks this could come of use.
Sent from my Quad-core 1.5GHz 512MB RAM GT-S5360 using xda premium
Thnxx. Working perfectly.
:thumbup:
Sent from my HTC-Desire using xda app-developers app
thanks
Awesome..!!! Very helpful even for devs..
Sent from my GT-S6102 using Xparent ICS Tapatalk 2
samsoul16 said:
Awesome..!!! Very helpful even for devs..
Sent from my GT-S6102 using Xparent ICS Tapatalk 2
Click to expand...
Click to collapse
oh ya
u can try this guide bro..
may be next time i wanna share other guide using framework-res.apk
but i confuse about this...
nice! thanks!
u're wellcome bro
Hey what xml editor did you use because notepad++ dont seemed to be reading them correctly, might seem of topic but ive been been trying to do this all day, as well as img coulors
benjiboythelad said:
Hey what xml editor did you use because notepad++ dont seemed to be reading them correctly, might seem of topic but ive been been trying to do this all day, as well as img coulors
Click to expand...
Click to collapse
i used notepad ++
but,i suggest u to used Vts
search in xda
not working on samsung galaxy grand quattro, but thanks fr your hard-work
nice work
This is not the proper way to change font color. The results are not as shown.. If you wanna know. Pm me . I found its way and happily creating new looks fr my device
Hello friend, this is my first post after years of just being a silent reader ... I finally decided to create an account on this forum.
Now I want to ask, what's the name of the action bar and the 9patch.png name of this image number one in attachment below
then these two objects below on image number two marked with arrows
and one more question about this editing contact page that I can't figure it out how to change its background instead of holo white, any other pages was changed except this one, where is the damn layout xml for this thing?
help from my friends here will be greatly appreciated and I would be grateful
C.E.R.N said:
Hello friend, this is my first post after years of just being a silent reader ... I finally decided to create an account on this forum.
Now I want to ask, what's the name of the action bar and the 9patch.png name of this image number one in attachment below
then these two objects below on image number two marked with arrows
and one more question about this editing contact page that I can't figure it out how to change its background instead of holo white, any other pages was changed except this one, where is the damn layout xml for this thing?
help from my friends here will be greatly appreciated and I would be grateful
Click to expand...
Click to collapse
Welcome new XDA participant
I don't write down all png files I have modified and I don't have access to my theme right now but here are some clues:
1st screenshot: it's in framework-res.apk and check .9.png called "***bottom***" There aren't so much .9.png called like that.
2nd screenshot: it should be located into the Contacts.apk and there isn't a lot of .9.png files.
3rd screenshot: there's a .xml file into /res/drawable/ of Contacts.apk for the background.
Primokorn said:
Welcome new XDA participant
I don't write down all png files I have modified and I don't have access to my theme right now but here are some clues:
1st screenshot: it's in framework-res.apk and check .9.png called "***bottom***" There aren't so much .9.png called like that.
2nd screenshot: it should be located into the Contacts.apk and there isn't a lot of .9.png files.
3rd screenshot: there's a .xml file into /res/drawable/ of Contacts.apk for the background.
Click to expand...
Click to collapse
Okay, I will check all *bottom 9.png
And about the .xml can you give me any other clue?
C.E.R.N said:
Okay, I will check all *bottom 9.png
And about the .xml can you give me any other clue?
Click to expand...
Click to collapse
Check the color of "background_dial_holo_dark"
Primokorn said:
Check the color of "background_dial_holo_dark"
Click to expand...
Click to collapse
the value of "background_dial_holo_dark" refer to an .png image, I was replace this with my own .png image, or maybe it is "primary background color" ? in the folder values/colors/color.xml there is an code <color name="background_primary">#ffffffff</color> but I haven't change it yet.
I want to make half transparent effect on the background that shows my current wallpaper instead, if it's possible.
Would you mind to check my res folder if you're not busy, in the attachment...
C.E.R.N said:
the value of "background_dial_holo_dark" refer to an .png image, I was replace this with my own .png image, or maybe it is "primary background color" ? in the folder values/colors/color.xml there is an code <color name="background_primary">#ffffffff</color> but I haven't change it yet.
I want to make half transparent effect on the background that shows my current wallpaper instead, if it's possible.
Would you mind to check my res folder if you're not busy, in the attachment...
Click to expand...
Click to collapse
So try to remplace into colors.xml file
Code:
<color name="background_primary">#ffffffff</color>
by this
Code:
<color name="background_primary">#00ffffff</color>
Primokorn said:
So try to remplace into colors.xml file
Code:
<color name="background_primary">#ffffffff</color>
by this
Code:
<color name="background_primary">#00ffffff</color>
Click to expand...
Click to collapse
I will try that and report the result later
It works :good: thanks man