[Bugfix][Gingerbread-JV*] Oversized/Unaligned browser combobox in themes. - Galaxy S I9000 Themes and Apps

Hi! I noticed this bug in ock's theme originally and then when I was trying to make my own theme banged heads with it myself.
The issue is that in the browser the combobox button seems to spill over into the text and generally is stretched poorly.
Like this:
I tried at first simply creating a .9.png version and removing the originals and replacing with the .9s. This made the bar vanish completely.
Eventually I got it working with a bit of a work-around, by compiling the .apk twice and extracting the images.
Having to explain that process recently lead me to the real answer though.
combobox_disabled.png and combobox_nohighlight.png ARE .9.pngs even though they do not have the .9.png extension.
apkmanager won't decompile (or compile) them as .9's because they don't have the right extension (and the right extension 'breaks' the theme).
Attatched are my .9.png versions of both images. I added the guidelines from scratch, but they seem to be correct. If your theme has this issue and you need to fix it, just drop the 'compiled' versions into your res/drawable-hdpi and apk-manager should happily compile it and the issue should be resolved.

tried both versions to just replace the ones in my framework-res.apk (didn't decompile the file but just replaced the files) and both didn't solve the problem.

XlAfbk said:
tried both versions to just replace the ones in my framework-res.apk (didn't decompile the file but just replaced the files) and both didn't solve the problem.
Click to expand...
Click to collapse
That -may- not work. That was one of the first things I tried to do - replace with .pngs straight from stock without a decompile/recompile of the whole apk.
The format of the zip file might be slightly ambiguous.
9s - are the raw pngs with draw9patch guidelines.
compiled - are the compiled draw9patch pngs. If you use a draw9patch compiler on the files in the 9s directory you get these.
Even though the pngs are compiled you still need to go through the decompile/recompile procedure with apk manager. (using the 'compiled' pngs).

sargorn, I've tried several times to decompile and recompile the framework with no luck. The new framework is ok, except this damn combo box rendering.
I personally gave up trying :|.

Toss me the framework and I'll give it a shot.

here's mine, based on JVB. thx fo giving it a try

XlAfbk said:
here's mine, based on JVB. thx fo giving it a try
Click to expand...
Click to collapse
Hi,
I tried decompiling and then recompiling your framework and it does not recompile.
zzzzz_tw_quickcontact_slider_btn_pressed.9.png and zzzzz_tw_quickcontact_slider_btn_selected.9.png were both 0 bytes.
If you've just been replacing images this probably won't work
Here it is decompiled and recompiled with stock copies of those two files and the combo box 'fix'.
The filesize seems very 'off' so I'm not sure if it'll work or not.

ro_explorer said:
sargorn, I've tried several times to decompile and recompile the framework with no luck. The new framework is ok, except this damn combo box rendering.
I personally gave up trying :|.
Click to expand...
Click to collapse
I've just de/recompiled JVH's framework-res and the combobox fix still seems to work. (Although maybe it's not needed in JVH, didn't test it!).

I tried it again with JVH and failed again. What I did:
1. decompile framework-res.apk with apkmanager
(2. make some of my changes to some xml files)
3. place the 2 files from compiled in drawable-hdpi-v4
4. recompile the apk
Everything but the comboboxes works as expected.
I'm attaching the apk, maybe you could have a look at it. If you can make it work please tell me what I did wrong. Many thx

XlAfbk said:
I tried it again with JVH and failed again. What I did:
1. decompile framework-res.apk with apkmanager
(2. make some of my changes to some xml files)
3. place the 2 files from compiled in drawable-hdpi-v4
4. recompile the apk
Everything but the comboboxes works as expected.
I'm attaching the apk, maybe you could have a look at it. If you can make it work please tell me what I did wrong. Many thx
Click to expand...
Click to collapse
As im here looking for the fix for my dhd I thought I might be able to help
Looking at your framework I can clearly see that those images in there are not fixed.
Try simply dragging and dropping the fixed pngs straight into your framework

liamstears said:
Try simply dragging and dropping the fixed pngs straight into your framework
Click to expand...
Click to collapse
that won't work, was said before, needs to be compiled in

Try out the jvo rom - I think this issue may be resolved in that framework.
Sent from my GT-I9000 using XDA Premium App

I still have that issue with my JVO theme

Related

[Q] Theme errors in apkmanager compile/decompile

I've just tried some of the themes available here against the apkmanager tool - decompiling and then compiling the framework-res.apk and twframework-res.apk and all of the custom themes give tons of errors (sometimes won;t even compile back) .. the only one that goes without troubles is the stock framework-res.apk and twframework-res.apk
I'm just wondering whether this is correct or not and where is the issue - is it apkmanager or the themes that are wrong ?
w83 said:
I've just tried some of the themes available here against the apkmanager tool - decompiling and then compiling the framework-res.apk and twframework-res.apk and all of the custom themes give tons of errors (sometimes won;t even compile back) .. the only one that goes without troubles is the stock framework-res.apk and twframework-res.apk
I'm just wondering whether this is correct or not and where is the issue - is it apkmanager or the themes that are wrong ?
Click to expand...
Click to collapse
I never had much luck with APKManager, that's why I use APKTool.
Try v1.3.1 if you can find it, 1.3.2 has problems.
Apk Manager uses apktool too.
@w83
Take a look at log.txt.
I guess it's due to corrupted .9.png.
Solution:
Replace all modded .9.png with original files, decompile, make your changes, compile.
Then you can put in your modded .9.pngs again...
scheichuwe said:
Apk Manager uses apktool too.
@w83
Take a look at log.txt.
I guess it's due to corrupted .9.png.
Solution:
Replace all modded .9.png with original files, decompile, make your changes, compile.
Then you can put in your modded .9.pngs again...
Click to expand...
Click to collapse
Is it really a solution ? .. cause it seems like all of the modded .9.pngs are basically broken
You're right, let's say workaround
For fixing your modded .9.png search for xUltimate draw 9 patcher. I don't know what it's called exactly.
But for editing framework-res.apk the workaround should be acceptable.
I can manage to decompile the theme (usually with some patched pngs messed up) but when I try to compile it (even without any changes) I end up with tons of errors in the form:
apktools/vagreen_frame/res/values/public.xml:3760: error: Public symbol drawable/zzzzz_tw_quickcontact_top_frame declared here is not defined.
(lots of these ones)
any idea what's wrong ?
w83 said:
I can manage to decompile the theme (usually with some patched pngs messed up) but when I try to compile it (even without any changes) I end up with tons of errors in the form:
apktools/vagreen_frame/res/values/public.xml:3760: error: Public symbol drawable/zzzzz_tw_quickcontact_top_frame declared here is not defined.
(lots of these ones)
any idea what's wrong ?
Click to expand...
Click to collapse
Once your 9.pngs are poorly done, errors such as the above would appear. There were only 6 9.png errors and the log generated a loh file size of 130+kb. But once solved, all errors were eliminated.
Sent from my GT-I9000 using XDA App
scheichuwe said:
You're right, let's say workaround
For fixing your modded .9.png search for xUltimate draw 9 patcher. I don't know what it's called exactly.
But for editing framework-res.apk the workaround should be acceptable.
Click to expand...
Click to collapse
I'm either using the android sdk draw9patch to generate the pngs or even GIMP to do it. Just make sure the first and last row/column must be either alpha or black. No other colours are allowed there.
Sent from my GT-I9000 using XDA App
g00ndu said:
I'm either using the android sdk draw9patch to generate the pngs or even GIMP to do it. Just make sure the first and last row/column must be either alpha or black. No other colours are allowed there.
Click to expand...
Click to collapse
Ok so ur saying that after I should correct the patch 9 pngs in the framework and it should compile correctly ? .. so two options: [1] decompile, replace the pngs with correct ones, compile ? .. or .. [2] correct pngs, compile in eclipse, replace in framework, decompile, compile ?
I am pretty sure that I've already tried correcting them using [1] and it didn't help at all .. I was still flooded with errors ..
I guess I'll try to modify things from the bottom up .. take the stock theme with extended menu and play around with it .. are there any significant changes in the .jars inside the /system/framework in most of current themes ?
but still it would be way nicer if I could decompile and compile one of current themes without errors .. I'm so curious how the theme gurus are doing it .. I envy their knowledge
w83 said:
...
but still it would be way nicer if I could decompile and compile one of current themes without errors .. I'm so curious how the theme gurus are doing it .. I envy their knowledge
Click to expand...
Click to collapse
Replace all modded .9.png with original files, decompile, make your changes, compile.
The person who made the theme did it lazily and incorrectly. The first couple versions of my ROM had this problem. Did some research into how .9 PNGs work.
If you want to fix them, I can tell you how. It's a bit tedious.
scheichuwe said:
Replace all modded .9.png with original files, decompile, make your changes, compile.
Click to expand...
Click to collapse
Yep that worked perfectly !! Thx mate for that
I'll try to mod something and see how it works
MikeyMike01 said:
The person who made the theme did it lazily and incorrectly. The first couple versions of my ROM had this problem. Did some research into how .9 PNGs work.
Click to expand...
Click to collapse
Most of the available themes can't be compiled and decompiled without errors
w83 said:
Most of the available themes can't be compiled and decompiled without errors
Click to expand...
Click to collapse
But mine can.
Spent a couple days fixing every .9 PNG one at a time. All you have to do is:
Decompile the unthemed .apk
Copy the broken PNG equivalents from the unthemed .apk
Decompile the themed .apk
Delete the broken .9 PNGs
APK Manager will rename the broken xxxxx.9.png to xxxxx.png
Open the non-broken PNGs in your favorite image editor
Delete everything but the 1 pixel border
Paste the edited PNG over it, without touching the 1 pixel border
Save
Recompile the themed.apk
MikeyMike01 said:
But mine can.
Spent a couple days fixing every .9 PNG one at a time. All you have to do is:
Decompile the unthemed .apk
Copy the broken PNG equivalents from the unthemed .apk
Decompile the themed .apk
Delete the broken .9 PNGs
APK Manager will rename the broken xxxxx.9.png to xxxxx.png
Open the non-broken PNGs in your favorite image editor
Delete everything but the 1 pixel border
Paste the edited PNG over it, without touching the 1 pixel border
Save
Recompile the themed.apk
Click to expand...
Click to collapse
Thank you so very much for sharing this info!!!
MikeyMike01 said:
But mine can.
Click to expand...
Click to collapse
Perfect
MikeyMike01 said:
Delete everything but the 1 pixel border
Paste the edited PNG over it, without touching the 1 pixel border
Click to expand...
Click to collapse
You can just edit the broken png in draw9patch (or gimp or whatever) but sticking to the patch 9 png rules
Thanks for sharing !
Could you briefly explain how the editing in draw9patch is done, please.
MikeyMike01 said:
But mine can.
Spent a couple days fixing every .9 PNG one at a time. All you have to do is:
Decompile the unthemed .apk
Copy the broken PNG equivalents from the unthemed .apk
Decompile the themed .apk
Delete the broken .9 PNGs
APK Manager will rename the broken xxxxx.9.png to xxxxx.png
Open the non-broken PNGs in your favorite image editor
Delete everything but the 1 pixel border
Paste the edited PNG over it, without touching the 1 pixel border
Save
Recompile the themed.apk
Click to expand...
Click to collapse
But lets say I want to change the default blue of 'statusbar_background.9.png' to full plain black. If I leave the 1 pixel border and fill the rest to black, wouldn't I have a blue border in the status bar?
brittosa said:
But lets say I want to change the default blue of 'statusbar_background.9.png' to full plain black. If I leave the 1 pixel border and fill the rest to black, wouldn't I have a blue border in the status bar?
Click to expand...
Click to collapse
No, there's a special one pixel border that has black and transparent pixels that tell the system how to stretch the image without making it look stretched.
That's why you'll note that .9 PNG files are buttons and other things that are used to make different sized objects.
Sent from my Captivate.

[Q] THEMES

Hello everyone.I would like to ask something and i hope someone will answer.
I'm fan of some themes.But in one theme i like that and in the other i like that.
Is there a way to make a mix of them and how?
Thanks in advance!!!
Yes, it is possible.
https://docs.google.com/Doc?docid=0AcdxIJRSH9ypZGZzc2pxNDlfMjdnazk4OHNxZA&hl=en
http://forum.xda-developers.com/showthread.php?t=916814
Thanks a lot.Now i need a lot of study to accomplise that!!!
you can easily change the png files in the framework-res.apk and the twframework-res.apk of any theme's zip.just take any theme as a base and change the pngs within opening the theme and then the apks by winrar or something like it.the pngs are stored in the drawable-hdpi and/or drawable-hdpi-v4 folders.
Whenever I try to change framework res, and replace the old edited frameworkres I get bootloops. After that I have to flash a stock rom with odin and then flash my cooked rom. Even if I push the original framework res.apk, that doesn't solve the problem. No issue with twframework res.apk. I can edit twframework res .APK and works fine.
Please help.
try using 7zip instead, its better at replacing files
aditya104 said:
Whenever I try to change framework res, and replace the old edited frameworkres I get bootloops. After that I have to flash a stock rom with odin and then flash my cooked rom. Even if I push the original framework res.apk, that doesn't solve the problem. No issue with twframework res.apk. I can edit twframework res .APK and works fine.
Please help.
Click to expand...
Click to collapse
reflashing a whole rom shouldn't be necessary
first of all, you should make a backup of your system, just in case
and you should always keep a working theme on your phone so that if you get stuck at boot, you just boot into CWM and flash the working one and everything should be fine again
and for your basic problem of editing themes, have a look at R64s guide:
http://forum.xda-developers.com/showpost.php?p=10383323&postcount=577
explains all the basic stuff and works great for me

.9 PNG Change Error Compiling

Hey Guys, so I'm working on a theme port (Yes I've Asked Multiple Questions About This) , well, when I change a .9 PNG file, it has errors compiling. How do I compile then? Can I not change .9 PNG files?
alphadog32 said:
Hey Guys, so I'm working on a theme port (Yes I've Asked Multiple Questions About This) , well, when I change a .9 PNG file, it has errors compiling. How do I compile then? Can I not change .9 PNG files?
Click to expand...
Click to collapse
M&S gives a tutorial about it here:
http://forum.xda-developers.com/showthread.php?t=1506177
Personally, I've found that if all you're doing is adjusting the hue or saturation (the color of the image) you can straight make the edit. At least I've had the two changes I've made work without doing anything special.
Sent from my SGH-T989 using xda premium
yoft1 said:
M&S gives a tutorial about it here:
http://forum.xda-developers.com/showthread.php?t=1506177
Personally, I've found that if all you're doing is adjusting the hue or saturation (the color of the image) you can straight make the edit. At least I've had the two changes I've made work without doing anything special.
Sent from my SGH-T989 using xda premium
Click to expand...
Click to collapse
Thanks, but I'm just moving from one theme that I'm porting, to the other, which is the ported one.
alphadog32 said:
Thanks, but I'm just moving from one theme that I'm porting, to the other, which is the ported one.
Click to expand...
Click to collapse
So you're having trouble moving the image to the new .apk or what are you asking?
yoft1 said:
So you're having trouble moving the image to the new .apk or what are you asking?
Click to expand...
Click to collapse
Okay, I have a stock framework, and then I have a bunch of png's from another theme in the i9100 section, if I put a .9 image, it wont compile right. So again, if I put the. 9 from the theme to the stock, it wont compile.
alphadog32 said:
Okay, I have a stock framework, and then I have a bunch of png's from another theme in the i9100 section, if I put a .9 image, it wont compile right. So again, if I put the. 9 from the theme to the stock, it wont compile.
Click to expand...
Click to collapse
As long as you're replacing files with the exact same name and not creating new ones it should compile. Alternatively, you don't even need to uncompile and recompile. Just take your stock framework and open (not extract) it in 7zip. It'll show you all the files. Drag and drop your modified files over into the 7zip window. It shouldn't have to compress them or anything, it'll just replace the files that have the same name. That's how I make all my modifications.
yoft1 said:
As long as you're replacing files with the exact same name and not creating new ones it should compile. Alternatively, you don't even need to uncompile and recompile. Just take your stock framework and open (not extract) it in 7zip. It'll show you all the files. Drag and drop your modified files over into the 7zip window. It shouldn't have to compress them or anything, it'll just replace the files that have the same name. That's how I make all my modifications.
Click to expand...
Click to collapse
That's, ill give it a shot tomorrow.
alphadog32 said:
Okay, I have a stock framework, and then I have a bunch of png's from another theme in the i9100 section, if I put a .9 image, it wont compile right. So again, if I put the. 9 from the theme to the stock, it wont compile.
Click to expand...
Click to collapse
Paste ur error log so I can tell you the problem
M&S

[FIX] Fix for errors recompiling Phone.apk from HTC ICS/JB roms

This is mainly for the rom devs/themers out there.
Since ICS, there have been issues recompiling Phone.apk - the recompile fails with errors in various strings.xmls in the values language folders.
Had the same issue trying to recompile Phone.apk in the lastest Sense4+ ROMs. But thanks to a sharp eyed user over in the Apktool thread I managed to fix the faulty xmls.
Thought I'd upload them here, to save others the effort. Just add the folders in the zip to your decompiled Phone.apk, and it should recompile fine. Have tested these with both Sense4 and Sense4+ Phone.apk, both recompiled fine.
DOWNLOAD HERE
fisha21 said:
This is mainly for the rom devs/themers out there.
Since ICS, there have been issues recompiling Phone.apk - the recompile fails with errors in various strings.xmls in the values language folders.
Had the same issue trying to recompile Phone.apk in the lastest Sense4+ ROMs. But thanks to a sharp eyed user over in the Apktool thread I managed to fix the faulty xmls.
Thought I'd upload them here, to save others the effort. Just add the folders in the zip to your decompiled Phone.apk, and it should recompile fine. Have tested these with both Sense4 and Sense4+ Phone.apk, both recompiled fine.
DOWNLOAD HERE
Click to expand...
Click to collapse
Good work mate
problem recompiling custom hand made skin as well , have to use both VTS and apktool .. no big deal , but i prefer making everything with VTS
Do you face that to ??
Dougi said:
problem recompiling custom hand made skin as well , have to use both VTS and apktool .. no big deal , but i prefer making everything with VTS
Do you face that to ??
Click to expand...
Click to collapse
I did have one issue where ICS skins wouldnt recompile. Was due to an error in decompiling AndroidManifest. Check the difference in manifest between VTS and manual apktool....you'll see there is a "minimum SDK version" line missing from the manifest in VTS. If you add that back in, it should recompile properly.
Though I only had that issue trying to convert JB skins to ICS. Currently working with JB skins and they compile just fine.
Sent from my HTC One X using xda premium

[Q] Decompiling and building SystemUI.apk

Okay, so I am trying to get the navbar working on the Samsung Galaxy Note 3. Pretty much, I have a feeling that SystemUI is missing the icons for the navbar, which causes it to crash when the build.prop has the line "qemu.hw.mainkeys=0". The SystemUI has all the other files that were required for the S4 sysui mod, except for the icons. Being a noob at this, I went ahead and tried to add the icons, but my apk resulted in "System UI has stopped.".
So I decided maybe I am doing something wrong. So with Android Multitool for windows, I installed framework-res.apk, SystemUI.apk, and twframework-res.apk. Next I select the SystemUI.apk for decompiling, and decompile it. Then I simply select the decompiled directory (didn't modify anything!), and recompile it. I then open the new SystemUI.apk in 7z and add the META-INF and AndroidManifest.xml from the old SystemUI.apk. I then select the newly compiled SystemUI.apk for signing, then I sign it.
This is just decompiling, then building the same thing without modifications. SystemUI.apk before decompiling is 2.7 MB, the newly compiled one is only 2 MB! Something is missing out of the new one, but when I compare them in 7z, the only thing I can see that is different is the packed size; whereas the old one has files and folders that take up more space packed than the new one.
When I try doing this with just apktool and cmd, I get java errors like crazy, and the whole SystemUI.apk ends up only half decompiling.
Any idea what I am doing wrong?
Your best bet would be to copy the log to pastebin, and post it in the apktool support thread. Get more views there for sure. Which version of apktool are you using? Can you decompile and recompile anything? Also, if you want post your systemui up and i could see if I can get it to work, narrow it down to a problem on your end that way.
Sent from my SM-N900T using Xparent Skyblue Tapatalk 2
This is my first time doing this, so of course I make a noob mistake! I thought I had to sign ALL apks, but this is a SYSTEM app, and I don't sign it. All is well! Thanks for the reply. I also updated my apktool to 1.5.2, so that may have helped too.
all you have to do is add a + before the @ sign in the line that is giving you errors....umm depending if it is xml errors....
post the errors.....
gakio12 said:
This is my first time doing this, so of course I make a noob mistake! I thought I had to sign ALL apks, but this is a SYSTEM app, and I don't sign it. All is well! Thanks for the reply. I also updated my apktool to 1.5.2, so that may have helped too.
Click to expand...
Click to collapse
You don't need to sign it? I have also this problem. It gives me error that SystemUI has stopped.

Categories

Resources