HWThemes for EMUI 4.0 - issue with incorrect stretching of UI elements (i.e.messages) - P8lite Themes and Apps

The problem I'm facing is the way the backgrounds for messages (bg_message_recevied.9.png and bg_message_send.9.png) are being stretched (see the screenshot and notice how the message box gets ungly when long message present).
In order to conceal the problem I have made the png files bigger but it does not look as nice as I would like to.
Does anyone know what to do in order to force them to resize properly? i.e. while keeping the corners of the images scaled properly?
I've edited the files which were scaled properly when used without changes in different theme but they do not work properly on mine once being modified (I've tried to make modifications using XnView, paint.Net, MS Paint, ImageEdit and result was always the same).
Any help would be much appreciated.

Ok, problem solved.
For some elements where the name ends with .9 the 9-patch is required to be used ( http://draw9patch.com ).
Explanation from site: "A nine-patch-image is used in android to and normally ends width the extension *.9.png and is used to make a image stretchable without destroying the corners. ". So the specially modified PNGs need to be used with markers for stretching.

wolfensg said:
Ok, problem solved.
For some elements where the name ends with .9 the 9-patch is required to be used ( http://draw9patch.com ).
Explanation from site: "A nine-patch-image is used in android to and normally ends width the extension *.9.png and is used to make a image stretchable without destroying the corners. ". So the specially modified PNGs need to be used with markers for stretching.
Click to expand...
Click to collapse
So when after you used the draw 9 patch tool, do you "recompile" the archive file, or do you simply "store" it?

mmapcpro said:
So when after you used the draw 9 patch tool, do you "recompile" the archive file, or do you simply "store" it?
Click to expand...
Click to collapse
Usualy when I am to modify any 9patch based asset (and usually any other asset or XML file) I do:
- copy the original PNG file and do required editing
- open the edited PNG file in any tool which enables putting the stretch sections ( ninepatch-editor-1.29.jar or Patchworker)
- save modified PNG file (it will have stretch marks in black 1 px wide bars on each side)
- then I use the xUltimate-9Patch compiler to compile the marks into the PNG
- then I put the modified/final PNG file in the original location
In terms of location it usually is within com.android.messaging or so - which is a zip file (with another .HWT zip container) so anyway... the repacking the archive after all the above steps is the final step.

wolfensg said:
Usualy when I am to modify any 9patch based asset (and usually any other asset or XML file) I do:
- copy the original PNG file and do required editing
- open the edited PNG file in any tool which enables putting the stretch sections ( ninepatch-editor-1.29.jar or Patchworker)
- save modified PNG file (it will have stretch marks in black 1 px wide bars on each side)
- then I use the xUltimate-9Patch compiler to compile the marks into the PNG
- then I put the modified/final PNG file in the original location
In terms of location it usually is within com.android.messaging or so - which is a zip file (with another .HWT zip container) so anyway... the repacking the archive after all the above steps is the final step.
Click to expand...
Click to collapse
Do you know where I can download that 9-patch compiler tool? I'm having trouble finding it.

mmapcpro said:
Do you know where I can download that 9-patch compiler tool? I'm having trouble finding it.
Click to expand...
Click to collapse
Actually... its very easy... first link when you google it : http://forum.xda-developers.com/showthread.php?p=9526315#post9526315

wolfensg said:
The problem I'm facing is the way the backgrounds for messages .
Click to expand...
Click to collapse
Sooo.... this mean a new theme will come soon ?

Azzureux said:
Sooo.... this mean a new theme will come soon ?
Click to expand...
Click to collapse
This is very old thread (at least if we compare it with the creation of my MIUI Dark theme

Related

[Q for Theme development] Multiple lockscreens with JVS framework

Hello,
I always got Multiple lockscreen frameworks such as EDT and JKay's Lockscreens. I really want to know, actually where are these files located in framework-res..
I want to port EDT's JVR lockscreens to JVS framework.
Anybody willing to help me?
Regards,
Rahul
I'm quite interested in this too...and I guess that nobody will write us down a list with needed files .....I can tell you what I've found out so far and hope that it will be of any help to you.
The smali files for the lockscreen itself I think they should be in android.policy.jar
Then there also should be some changes in framework.jar which I do not know.
The ressource files like pictures etc are in the framework-res.apk
Then you also need the edt.apk in /system/app
Decompile the files with apkmanager/baksmali
Use a comparision tool like winmerge to see what files are added additionaly compared with the standard stock files. And also too see if there are smali changes in some files.
Good luck
Sent from my GT-I9000 using Tapatalk
why bother, they are not bug free anyways
$omator said:
why bother, they are not bug free anyways
Click to expand...
Click to collapse
You said that more than once now, but I sure as hell don't suffer any bugs while using them on JVQ or JVR.
While we're at it, I thought, hey, what the hell, I can learn and do it myself. Always good to learn this sort of thing. So I got smali/baksmali, winmerge, and Whitehawkx's source files, which I think will work.
But that's not the point.
The point is that baksmali is desassembling the .dex files just fine, but when I want to make a new file after merging the files from the sources with the originals of the .dex... It makes a .dex with the original files.
That is: disassemble -> merge the files -> I make sure the files are there. They are. -> I use smali, it creates the new .dex -> As everytime I do anything, I think, hey, lets disassemble the new file again to make sure the new files are there -> The files are not there.
It's driving me crazy... I mean, how the hell does it create a file from something that isn't there any more?
I can sort of get that the new files and folders don't make it to the new .dex (although, no, I don't get why would that be), but how can the overwritten files go back to be the original ones?
Seriously, driving me crazy.
Edit: Ok, nevermind what I said... The files change frigging places when smali assembles them...?
Edit2: Suprise, surprise, it didn't boot, but now I don't know if it's because I did something wrong or because the source files aren't good for JVS. I'm gonna try to do it on JVP, I'm curious now...
$omator said:
why bother, they are not bug free anyways
Click to expand...
Click to collapse
Well because some of them have features people want to have...and also because people can live with some of the bugs. I don't care if it writes me SIM-Card is locked even if it isn't. The functionality doesn't decrease because of that.
But well these lockscreens give us a music widget that works with other players then the crappy samsung stock one. And I can unlock directly to messages or phone. If it was for me I would only need something like the fourtab(which sadly has a memory leak)...but if the whole package could be ported or whatsoever and people would like to do it why not ?
Code is present in the android-policy.jar and framework.jar (for some lockscreens). You need to copy over the Smali Files fromt he MOD to the JVS framework and android policy. After that you need to copy over the drawables, layouts and other xml files to the framework apk of JVS and assign them each a unique resource ID. These resource IDs need to be substituted with the new values in the Smali files. Since the framework-res.apk changes with Firmwares, the Resource IDs are different for each framework.
It's very complicated stuff for rookies. You need to know which stuff to copy where and what modifications to make for specific lockscreens. And you need to use Logcat and do a lot of trial and error.
And $omator is right. Those lockscreens all together don't work perfectly due to conflicting code. For example, I made a SGS II Lockscreen Port http://forum.xda-developers.com/showthread.php?t=1070564 . The Same Lockscreen that is found along with 9 Lockscreen MOD is incomplete and doesn't work perfectly. I don't mean to say that the 9 lockscreen mod is useless, but It is very handly provided you compromise on what you get.
dhiru1602 said:
Code is present in the android-policy.jar and framework.jar (for some lockscreens). You need to copy over the Smali Files fromt he MOD to the JVS framework and android policy. After that you need to copy over the drawables, layouts and other xml files to the framework apk of JVS and assign them each a unique resource ID. These resource IDs need to be substituted with the new values in the Smali files. Since the framework-res.apk changes with Firmwares, the Resource IDs are different for each framework.
It's very complicated stuff for rookies. You need to know which stuff to copy where and what modifications to make for specific lockscreens. And you need to use Logcat and do a lot of trial and error.
And $omator is right. Those lockscreens all together don't work perfectly due to conflicting code. For example, I made a SGS II Lockscreen Port http://forum.xda-developers.com/showthread.php?t=1070564 . The Same Lockscreen that is found along with 9 Lockscreen MOD is incomplete and doesn't work perfectly. I don't mean to say that the 9 lockscreen mod is useless, but It is very handly provided you compromise on what you get.
Click to expand...
Click to collapse
Very complicated to do something like that from scratch, yes.
If at least one of the persons that have made a 9 lockscreen JVS rom posted the sources... From there I've learned by now that it's fairly easy to just include them into the files.
But no one have.
If you really want to learn how to do it i can only recommend read lots of info and do some investigations by yourself.
If some guy made the stuff for lets say XXJVQ then grab the files and compare them with the stock files. Decompile them with apkmanager. (jar files can also be modded this way, you only need to add .apk to the jar extention, and remove it later after compiling back)
This way you can see what files need to be added and what values need to be changed/added. First try to understand the process and after that make your own mods.
I used Winmerge for comparisation of the files.
Well... I modded the overscroll by myself. It's a start.
Thanks to Team Obssessed, we can already have multiple lockscreens on JVS.
I already made a theme as I like and added the lockscreens thanks to the files of this rom.
Now I can have a proper JVS .
Is just that I'm too used to puzzle and MIUI lockscreens to go back to stock or AOSP. And those two work without bugs, so... And don't know about the rest.
and btw. apkmanager got aapktool with outdated baksmali/smali ...

[TOOL] Create ZipThemer patch from modified APK - Linux only

Hey guys & gals!
Here is a little tool I made.
What it does is take 2 APK files - the original, and the modified/themed one. It then extracts the APK's and collects all the files that have changed from the original in the modified APK. It also adds the new files in the modified APK.
It wont handle changes to the smali code, but any xml or png changes will work fine.
Then it builds the changed files into a zip file that can be flashed using ZipThemer.
To use:
make an empty directory for apkdiff to work in.
create 2 folders new_apk and old_apk and place the 2 files in their respective directories.
Run the script:
apkdiff /system/app Phone
The 2 parameters are:
The folder on your device the APK is located in
The name of the APK file (without .apk on the end)
There are a couple of parameters you may need to adjust at the top of the file.
The result will be a file in the "out" folder which can then be used on other devices to modify the original apk using ZipThemer. This is a lot smaller file than if you redistribute the whole modified APK.
I hope this makes sense to someone!!
I am sure there are bugs in it somewhere, so if you give it a try and it breaks let me know.
Cheers!
Great and useful work mate,
thank you very much!!!

[Mod] Simple Tutorial How to Change the Weather Text Color in the AOKP Drop Down Area

Just a small little tutorial with regard to changing the color of the text for the AOKP dropdown weather status lines.
- First copy your system-ui into whatever apk tool you like and decompile. For the purposes of this I will use the apk multi-tool. Once done, go to the res/layout/weather panel xml and add
android:textColor="#ff33b5e5"
Of course you can use any color hex code I use blue,,,well cause I like it LOL
- After the "android text size" code in line relating to the text such as the city id,,,temp hi and low id and others. Make sure you leave a space between android text size and the newly added color code.
- Once that is done save and back out.
- Recompile the system ui making sure to delete out the resources.arc and any changes you made such as the res/layout folder in the keep file made if you're using apk multi-tool.
- Once that is done, place the new system-ui in a flashable zip (in the system/app folder of that zip of course) and flash away. Enjoy and let me know if you have any problems.
If you liked or use hit the thanks button,,,PM me if you need help,,,PLEASE make a back up before you do anything with the system ui just in case you screw it up and need to go back!
Can u plz share ur systemui....
"T}{@ÑK$" ÑøT TÕ $Ä¥ Jû§T Pr€ë$ ÎT...!!!
Sent From MY ¥ Dûø$ Üs!nG ËvÕ X RoM V¡Å XpArEnT TaPtAlK 2

[Guide][Softkeys] Make your own softkeys/ Post them here

Hey guys!
I think there are many out there that has the Nexus 4 but cant find the right softkeys for them. So I made this guide for people who don't know how to do their own softkeys. And the ones who know can post them here .
I would recomend GIMP for this; it's easy(for basic things), good and free. If you can use another picture editor, it's fine (I cant exactly tell how you do this on other programs, but i believe it's pretty similar).
Make them
1. Download Gimp and install it if you don't have it. http://gimp.org/
2. Make a folder. You're going to have all your files in there.
3. Open Gimp (may take some time to load).
4. File - New - Set size to 300 x 300 - Advanced - Set X and Y to 320 - And fill it with transparency.
5. Now use your creativity! Look for tutorials on gimps website or on forums, if you need any ofcourse.
6. When you're done with your first softkey, for instance the home button, resize it (using the scaling tool) to 60 x 60 (you can test out different sizes but it has to be a square) (I use 60x60 because I think it's the best one).
7. File - Save as (.xcf) in the folder you created.
8. File- export- navigate to the folder - save as png (default).
9. Now make the buttons you use or would like to make and save them.
Installation
On some roms, like Xylon and Aokp, you can set the icons directly from the settings. If you don't use one of these roms, you have to do the following:
1. Use the attached template
2. Unzip it with Winrar or 7-zip.
3. Edit the xml file and replace the **
4. Rename your icons to the same names as the template icons in the systemui folder. For landscape mode icons, just add _land to the name(for example ic_sysbar_home_land)
5. When you're done, make a zip of the edited SystemUi folder and the edited xml file. Note: speed should be "store".
6. use Zipthemer to install it. If you dont know how to use it, see this
Notes: a) After you resize it to for instance 60x60, you can use the crop tool to cut away everything but the icon (be careful, dont cut the icon)
b) To change the color of the icon: colors - colorize
Dont forget to post your creativity here! And I'm happy to help!
Thanks to : azertguigui for his guide
Sorry for my english
I've uploaded my version down below
Quality tutorial up there, Keep up the good work
Thanks
Sent from my Nexus 4 using xda app-developers app
Thanks a million for this tutorial! Took me about 2 hours to get my head around it and whip this up!
You're welcome! Could you upload your softkeys in case anyone wants them?

[How-to] Change background of smart cover window of Find7a; flashable zip included

DISCLAIMER
Flash at your own risk.
INTRODUCTION
Hello everyone, This is my first time posting my own thread, I've been lurking around these forums since the release of Galaxy Note 1 (N7000) ,my first android phone. I've learnt to flash custom roms, root devices, etcetera. This is my first time I've extracted and repacked an apk file.
Anyways, I've learnt how to change the background wallpaper of the Smart Cover app whilst the cover is on the phone. I've used this site as my source; http://www.oppoforums.com/threads/m...-sfondo-per-le-custodie-easy-cover-etc.17149/
Credits goes to the author for the original apk and zip files. I am no app developer neither am I proficient in creating custom scripts or apk files. I just repacked the apk and zip files and replaced the jpg files located here:
\system\app\OppoLeather\res\drawable-hdpi\window_bg.jpg
\system\app\OppoLeather\res\drawable-xxhdpi\window_bg.jpg
​The first 3 flashable files were created by the aforementioned author from the linked forum.
INSTRUCTIONS
I flashed this using the custom ROM, Kulay OS v1.1 on my Find 7a X9006, on CWM Philz Touch Recovery 6.42.2.
I believe you will not face any problem using the stock ROM on any Custom Recovery.
First download the attached 7zip file, then extract
Choose your preferred flashable zip based on the attached screenshots in this thread
Copy it in the internal/External SD card of your phone
Reboot into recovery
Perform a wipe cache and Dalvik-cache (you will not lose your settings and apps installed)
Select the zip file you downloaded earlier and flash
Reboot the phone
SCREENSHOTS/ DOWNLOADS
You may also click the pic for their individual download links
BG 01:
BG 02:
BG 03:
BG 04:
BG 05:
BG 06:
BG 07:
BG 08:
BG 09:
BG 10:
BG 11:
BG 12:
PS
I am using NILLKIN Thin PU Leather Smart Flip Pounch Cover Case for Oppo Find 7 X9007 if anyone asks.
Hi @leihuwan,
Can I include this work as an option during installation in Kulay ROM in my next release?
tantrums said:
Hi @leihuwan,
Can I include this work as an option during installation in Kulay ROM in my next release?
Click to expand...
Click to collapse
Of course!
PS
Give me a few minutes, I will update OP for more stuff
update
Updated OP for more backgrounds (07 to 12), included individual download links per pic via mediafire
Support 7s or not ?
Yes, it works wird 7s... I tested it in my x9076
Gesendet von meinem Oppo Find 7
Hi leihuwan,
Thanks for the fine work. Working fine on my 9076, but it doesn't wake the screen when i open the smart cover. I have to double tap to wake it. Although not a big problem, would be nice to see a fix for it.
Once again thank you.
P.S tried four of your mods and the problem persists on all of them.
Hey,
I love this, thanks a lot! I always use BG 01, it's perfect.
However, it does not wake the device anymore if you use the new ColorOS 2.0.0i
Will you fix this? I'd love to continue using it, but if it prevents the device from waking up I can't
Thanks for this !
Each one of them, so much nicer than the stock one...
Great job.
DonVito2020 said:
Hi leihuwan,
Thanks for the fine work. Working fine on my 9076, but it doesn't wake the screen when i open the smart cover. I have to double tap to wake it. Although not a big problem, would be nice to see a fix for it.
Once again thank you.
P.S tried four of your mods and the problem persists on all of them.
Click to expand...
Click to collapse
What version of ColorOS are you using? Have you tried setting screen lock to None at Settings > Safety & Privacy > Screen Lock?
MB48 said:
Hey,
I love this, thanks a lot! I always use BG 01, it's perfect.
However, it does not wake the device anymore if you use the new ColorOS 2.0.0i
Will you fix this? I'd love to continue using it, but if it prevents the device from waking up I can't
Click to expand...
Click to collapse
I am terribly sorry. Truthfully I am not a programmer and my knowledge in coding and packaging APK files is very limited. I only translated the instructions I've discovered at oppoforums seen at the link at OP. Maybe they changed something in the apk of the official ColorOS 2.0 release. If someone more knowledgeable than me is present, feel free to chime in.
leihuwan said:
I am terribly sorry. Truthfully I am not a programmer and my knowledge in coding and packaging APK files is very limited. I only translated the instructions I've discovered at oppoforums seen at the link at OP. Maybe they changed something in the apk of the official ColorOS 2.0 release. If someone more knowledgeable than me is present, feel free to chime in.
Click to expand...
Click to collapse
Alright, thanks.
I read what you did and fixed the problem myself since it's pretty easy.
I took the original OppoLeather.apk of ColorOS 2.0.0i and modified the background of it and put it in your .zip
This works without problems for me and the device now wakes up properly. Yes, they did some changes to it in 2.0.0i.
If anyone else wants it, in the attachment is a working flashable .zip for ColorOS 2.0.0i with Background picture 1 of the original post.
please help...
MB48 said:
Alright, thanks.
I read what you did and fixed the problem myself since it's pretty easy.
I took the original OppoLeather.apk of ColorOS 2.0.0i and modified the background of it and put it in your .zip
This works without problems for me and the device now wakes up properly. Yes, they did some changes to it in 2.0.0i.
If anyone else wants it, in the attachment is a working flashable .zip for ColorOS 2.0.0i with Background picture 1 of the original post.
Click to expand...
Click to collapse
I suggest you to make a tutorial review....please,I have no idea on how to do it.....appreciate your kindness.....
For me it's perfect like this...
Before that ,the screen went on even with a little opening of the cover .
Now,I decide when the screen goes on...
huffaz841 said:
I suggest you to make a tutorial review....please,I have no idea on how to do it.....appreciate your kindness.....
Click to expand...
Click to collapse
Find the oppoleather.apk (it's somewhere in the /root partition of the phone)
copy it to your computer
rename it from .apk to .zip
you can now open it with any zip browser.
Replace the window_bg.jpg in /res/drawable-hdpi and /res/xxhdpi with a picture of your choice.
Make sure your picture is also a .jpg, has the exactly same name and resolution.
After you replaced the pictures in the .zip you can close your file browser and rename the file into .apk
Your apk is now modified.
To flash it:
Download any of the flashable .zip's the creator of this thread put up.
when you have a flashable .zip open it.
In there will be the OppoLeather.apk and some other files. Replace the OppoLeather.apk with your modified .apk.
Make sure your apk has the exact same name as the one you're replacing it with.
After replacing you can close your file browser and copy the modified flashable .zip on your phone.
Now you only have to flash it (see instructions in first post).
Hi! I know this is an old thread, but I have a question concerning this little mod. I recently got the N3 and since the cover had a square window, the default easy cover window of the OPPO N3 is a circle.
So, I decided to flash one of the modified packages provided by the op and they work great. However, there is a slight misalignment - unsurprisingly - due to the resolution and size differences between the 7/7a and the N3. What I would like to know, is whether it is possible to to decompile and modify the apk, in order to place the small window screen a bit higher. I have decompiled the apk myself, but I haven't yet figured which string to modify.
A small help would be greatly appreciated!!!
Feregorn said:
Hi! I know this is an old thread, but I have a question concerning this little mod. I recently got the N3 and since the cover had a square window, the default easy cover window of the OPPO N3 is a circle.
So, I decided to flash one of the modified packages provided by the op and they work great. However, there is a slight misalignment - unsurprisingly - due to the resolution and size differences between the 7/7a and the N3. What I would like to know, is whether it is possible to to decompile and modify the apk, in order to place the small window screen a bit higher. I have decompiled the apk myself, but I haven't yet figured which string to modify.
A small help would be greatly appreciated!!!
Click to expand...
Click to collapse
You can do it manually with a root enable file browser.
Find the OppoLeather.apk in /system/app/Oppoleather, copy it into your phone storage then transfer it to your computer, open the apk with 7-Zip, navigate to find window_bg_circle (.png or jpg), extract it, modify the picture while keeping its dimensions, put it back into the apk, transfer the apk in your phone storage. With the file browser, change the suffix of the original OppoLeather.apk into .bak, copy the modified apk into the /system/app/Oppoleather folder, modify its permissions according to the old file (i.e. rw-r--r--). That's it.
Thanks on behalf of many owners here. It's rare to see someone reply to something in such a helpful manner and in plain english instead of abbreviated jargon

Categories

Resources