Watch Face XML editing. - Samsung Gear S2

Has anyone successfully edited the XML on a custom watch face and imported it back into GWD? Is it possible to borrow some options from the stock watch faces, like the stylize button? GWD is seriously lacking in a few places but it seems to be possible, with some tweaking, to add some customer features in. Hopefully something as simple as changing the color of some watch hands by double tapping.......
Anyone have any tips on editing the XML???

absolutcarcrazy said:
Has anyone successfully edited the XML on a custom watch face and imported it back into GWD? Is it possible to borrow some options from the stock watch faces, like the stylize button? GWD is seriously lacking in a few places but it seems to be possible, with some tweaking, to add some customer features in. Hopefully something as simple as changing the color of some watch hands by double tapping.......
Anyone have any tips on editing the XML???
Click to expand...
Click to collapse
Yes, I have done this, but a very limited, specific task.
First I changed the xyz.gwd filename to be xyz.zip. Extracted the watchface.xml file. I took the watchface.xml into my xml editor (XML Marker ver 1.1) and discovered how the "swap background on tap" was coded. It involves using an image-set tag, and an action tag. I then used this to make a swap-on-tap Hour hand. Saved the updated xml code, and inserted this back into the xyz.zip. Then renamed this to xyz.gwd and put back into GearWatchDesigner\workspace\.
Open the design inside GWD. You can then look at the hour hand and see the button action to change image, although you cannot create this action within GWD, only an xlm editor. Did the usual build and Run on Device. Once the watchface was on my watch, I did have to reboot the watch for the functionality to work. But it DOES WORK. Tapping the hour hand did change the appearance of the hour hand (black/white swap).
This was a very simple test. But the basic idea of modifying the xml to do other things does work. HOWEVER, you need to know what other options are available. I have no idea if the xml codeset, that is understood by GWD when building the .tpk file, supports double-tap, stylize, or other complications. And if so, what the actual xml code would be for these functions.

Thanks for the information.
I had tried most of this but I failed to notice that hour hand would have the button action change. Guess I'll give it another go!

absolutcarcrazy said:
Thanks for the information.
I had tried most of this but I failed to notice that hour hand would have the button action change. Guess I'll give it another go!
Click to expand...
Click to collapse
The details of the modified XML
for the watch hand to be swapped, in the group\part\ replace the <image> with a <image-set>
<image>basic_clock_hands_hr_shadow.png</image>​becomes:
<image-set><image>basic_clock_hands_hr_shadow.png</image><image>action/image/basic_clock_hands_hr.png</image></image-set>​
Add the new action to the hour hand part
<action on_event="tap" target_part_id="basic_clock_hands_hr_shadow" type="image-set-show-next"/>​
and I have added a couple of watch screen shots. As I said, a very simple example.

Thanks again. I'll give this a try when I get home.
Sent from my SM-G925T using Tapatalk

Need some guidance again......
cnguinn said:
The details of the modified XML
for the watch hand to be swapped, in the group\part\ replace the <image> with a <image-set>
<image>basic_clock_hands_hr_shadow.png</image>​becomes:
<image-set><image>basic_clock_hands_hr_shadow.png</image><image>action/image/basic_clock_hands_hr.png</image></image-set>​
Add the new action to the hour hand part
<action on_event="tap" target_part_id="basic_clock_hands_hr_shadow" type="image-set-show-next"/>​
and I have added a couple of watch screen shots. As I said, a very simple example.
Click to expand...
Click to collapse
I really appreciate this example that you previously provided for me. Unfortunately, the newest update to GWD has broken this. I assume its because the XML schema has updated from 0.1 to 1.0. I cannot figure out how to write the new image set code to display the same thing with the updated watch face. Any help would be appreciated!! :fingers-crossed:

It Worked
Thanks to "cnguinn" for the instructions, followed these and it worked.
I had been scratching my head over this most of the morning, but what I hadn't done was rename the gwd file to a zip and save within the zip and then rename back to gwd.
I used the program "XmlPad3_02a" to edit the xml files.
adding the relevant lines to refer to the image file and changed the action set
I added the image file in the appropriate folders, ( res and debug/tpk)
and then just saved the whole folders ( rather than just the individual xml files) within the zip file.
Tested on the laptop and worked fine, exported up to the Gear S3 and perfect, new colour added to background on tap function.

Ryley199 said:
Thanks to "cnguinn" for the instructions, followed these and it worked.
I had been scratching my head over this most of the morning, but what I hadn't done was rename the gwd file to a zip and save within the zip and then rename back to gwd.
I used the program "XmlPad3_02a" to edit the xml files.
adding the relevant lines to refer to the image file and changed the action set
I added the image file in the appropriate folders, ( res and debug/tpk)
and then just saved the whole folders ( rather than just the individual xml files) within the zip file.
Tested on the laptop and worked fine, exported up to the Gear S3 and perfect, new colour added to background on tap function.
Click to expand...
Click to collapse
Sorry if you could tell me more.
It’s impossible for me to change the color of the hands along the anchor (pictures).
Please post the entire code of the hml file.
Thank you very much

Related

[REQ] Metamorph to remove 'phone' text from black droid launcher

I can't find the original post on this forum that contained the attachment, so I am attaching it here. I'm not sure what was changed in the file to get it to do it. Was hoping I could find more info from the person who made it... but I can't find the post.
Can anyone help with this, please?
Thanks!
That's weird. I just got a PM about an hour ago regarding the same question. When the "mods" thread got "cleaned up" much of the stuff went missing, unfortunately.
The phone text is cleared out in:
Rosie.apk\res\layout-port\button_bar.xml
Attached is a patched XML file that will clear the text out. You will still need to replace the applicable .png files with transparent ones, for example, if you want to remove the phone icon, etc.
Download <--- Right click to save the file, otherwise, it will attempt to load in your browser.
wow lol thats kinda funny
wtphoto said:
wow lol thats kinda funny
Click to expand...
Click to collapse
I know, right? Well, here you go .
JsChiSurf said:
That's weird. I just got a PM about an hour ago regarding the same question. When the "mods" thread got "cleaned up" much of the stuff went missing, unfortunately.
The phone text is cleared out in:
Rosie.apk\res\layout-port\button_bar.xml
Attached is a patched XML file that will clear the text out. You will still need to replace the applicable .png files with transparent ones, for example, if you want to remove the phone icon, etc.
Download <--- Right click to save the file, otherwise, it will attempt to load in your browser.
Click to expand...
Click to collapse
Thanks. That worked in removing the phone text, but it didn't center the phone icon on the button. Can you do that, too?
I can't seem to find the file that centers the phone image onto the middle button for the launcher. I've tried launcher.xml but no dice. bb_btn_middle.xml perhaps?
Also, could you provide some insight into what folders to edit? What is mdpi, land, port? Which folders get edited with our phone? I find myself constantly playing a guessing game with which folder the edits go into.
EDIT: Ok, it turns out it was the button_bar.xml file. Now that I knew that, I pulled it out of the zip in the first post and the phone icon is centered. Attached just the xml.
Jedis said:
I can't seem to find the file that centers the phone image onto the middle button for the launcher. I've tried launcher.xml but no dice. bb_btn_middle.xml perhaps?
Also, could you provide some insight into what folders to edit? What is mdpi, land, port? Which folders get edited with our phone? I find myself constantly playing a guessing game with which folder the edits go into.
EDIT: Ok, it turns out it was the button_bar.xml file. Now that I knew that, I pulled it out of the zip in the first post and the phone icon is centered. Attached just the xml.
Click to expand...
Click to collapse
The phone icon is in Rosie.apk res/drawable-normal-mdpi. Its called icon_p_phone_rest.png and icon_p_phone_on.png.
VinceOB said:
The phone icon is in Rosie.apk res/drawable-normal-mdpi. Its called icon_p_phone_rest.png and icon_p_phone_on.png.
Click to expand...
Click to collapse
I didn't need to edit the actual png, it was just something in the xml file that centered the placement of it. It's all fixed.
My goal is all Metamorph's with the black droid launcher with phone text removed, all clear widgets (Digital Clock Widget, GenieWidget, pure calendar, pure music player, power control widget, etc). Genie, pure calendar/music is done. Digital Clock Widget is working, but tapping on it to edit the alarm is busted since the WorldClock was removed for the lockscreen...
I'm sick of remembering which files were editted in the apk files to achieve the mods... Metamorphing will make everything much easier, but it's a process to figure out which files were edited, since repacking the zipfiles usually modifies the 'modified date'.

[Q] Is a theme or hack that can remove the Titanium Slider bar?

i'm wondering if there is a way to do away with the slider bar in the default wm6.5 home screen. in the pic below (i'm a new user so just copy/paste without spaces, lol.) i just slid the bar all the way to the top to take a screenshot, and i wanna know if i can just remove it for a simple clean homescreen.
i53. tinypic. com/2zeypuh .jpg
Why not switch to "classic today" screen, then check out the themes forum for themes you can apply or search for specific plugins? Is it just that you want the titanium function but not the outline around the selected panels? I'm not sure how to do that, but it should be possible by editing the xml file.
well, when i switch to the classic today screen, or just uncheck Windows Default, under Items, i lose the transparency of the toolbar and taskbar. i guess that if i cold just get rid of the big dark bar in the middle of my screen i would be satisfied. i would just like to be able to see my wallpapers. and yes, i want the titanium function but not the outline around the selected panels.
Ok, gotcha. I don't know off-hand how to do that, though It probably would be as simple as editing the file, or finding the .png that is of that image (in the windows directory) and replacing it with a panel that is completely transparent.
Maybe someone with some experience will come along that already knows how to do that.
To get you started, you may want to look at this theme, which has already made the panels transparent. if you like it, you can just use it. Otherwise, you could potentially compare the xml files, of find the transparent image that he is using in there and copy it over to your device. It's been a long time since i checked/looked, but the xml that controls the sliding panels today screen is usually something like home.xml or something.
[note: if your phone is not touchscreen, use/look at this thread instead]
If you start playing around, back everything up first! You may also want to browse the "post your screenshots thread" and see if you don't come across some other UI that you like better (or another theme w/o the panels). good luck!
krazibeast said:
i'm wondering if there is a way to do away with the slider bar in the default wm6.5 home screen. in the pic below (i'm a new user so just copy/paste without spaces, lol.) i just slid the bar all the way to the top to take a screenshot, and i wanna know if i can just remove it for a simple clean homescreen.
i53. tinypic. com/2zeypuh .jpg
Click to expand...
Click to collapse
Yes, you can but you need to edit the bronzeres.dll check this thread to learn how to do it, backup first your original file.
Check these screens from my phone
Regards,
Enrique
Empel1960 said:
Yes, you can but you need to edit the bronzeres.dll check this [link] to learn how to do it, backup first your original file.
Check these screens from my phone
Regards,
Enrique
Click to expand...
Click to collapse
thank you all. but i'm not as experienced with xml, and editing. but whenever i do i end up running into security issues when trying to copy the files back to my phone.
about this bronzeres.dll file.. where is it located, and what would i need to change to alter the transparency?
krazibeast said:
thank you all. but i'm not as experienced with xml, and editing. but whenever i do i end up running into security issues when trying to copy the files back to my phone.
about this bronzeres.dll file.. where is it located, and what would i need to change to alter the transparency?
Click to expand...
Click to collapse
The bronzeres.dll is on the windows directory, but modifying the dll is more complicated than editing xml or cpr files, in my previous post there is a link where you can learn how to unsigne, edit, resign the dll file.
Regards
Enrique
Help
Hi i have the HD2
my ROM is 2.13.531.1 (90963) WWE
Manilla version 2.5.20121412.2
Radio 2.10.50.26
I downloaded the final cab and my phone still freezes when text messages come in and i cant send picture messages can someone please help me
thanks for all the help! i edited the bronzeres. dll and got exactly what i was looking for. check the URL for my result.
i52. tinypic. com/35l5bg9. jpg
but another question.. is there anyway to do away with the slider functionality and just have the titles. and when you tap it it takes you to the application? so there is no titile thats larger than the others, there just clickable links. just a question, because i'm content with my results.
Cabs available
Hi, I made a couple of CABS to make the slider transparent.
http://forum.xda-developers.com/showthread.php?t=909746

[How-To] Edit .9.png files for the MT4GS - step-by-step.

Return to Contents Page - doubleshot Developers Reference
----
Part 1: Custom Sense Lockring on the MT4GS - easy step-by-step.
Part 2: This thread.
Part 3: Edit Mode10 Files for the MT4GS - step-by-step
--------
This installment will cover working with .9.png files, their special handling requirements, and a little bit about what makes them so special.
This is a slightly more advanced guide, and I won't be over-exaggerating explanation of simple things like copy and paste that were covered in part 1.
Working with .9.png files is easy once you know what steps to take and have the tools set up on your computer - it's just time consuming and tedious. So let's take a look at what you need.
What you need:
1 - Android SDK installed
2 - Java JDK installed.
3 - Apk Manager 4.9
4 - 7-Zip installed and ready.
5 - Photoshop ( or equivalent - directions for photoshop ) installed and ready.
6 - A copy of HTCCamera.apk from the Sense ROM you are changing the graphic in.
* - Guide written for a Windows XP machine, please adjust accordingly if your environment is different.
--------
This is a lot of stuff to manage, but if we take our time and do it in order it'll be a piece of cake. ( ~Tasty! )
First thing is to install the Android SDK and Java JDK - both actions are outside of the scope of this guide but well documented all over XDA.
This guide will pick up assuming both the Android SDK and the Java JDK are installed.
This guide also assumes that Apk Manager is installed. Please see the Apk Manager 4.9 thread for the tool if you have trouble in this area.
Lastly, this guide assumes you have read my guide: Custom Sense Lockring on the MT4GS - easy step-by-step. as I won't be explaining how to do things again that were already covered there.
( ... and of course, that you have Photoshop installed and ready...or another graphics program of your choice - but instructions are for Photoshop. )
--------
Okay, we have everything installed, now we need to get our hands on one of those .9.png files so we can play with it.
Let's talk about them for a minute first. Those .9.png files are pretty special, because they are a stretchable graphic.
This means that Android can use the same graphic in many different places, and these different places can be different sizes.
These graphics have some special information attached to them, outside of the border of the graphic there are black lines and dots that tell Android how far and in which directions it can stretch the graphics.
An important thing to note here: These black lines and dots MUST BE black, and no other shade or color. If they are not perfectly black, it will not work.
If you simply extract the graphic from the .apk file with 7-Zip, edit it, and put it back in, your .apk file will break. The reason being is the extra information about how and where to stretch the graphic gets broken when you do this.
The only way to edit these files correctly is to de-compile the .apk, then edit the graphic, and then re-compile the .apk file.
The example we are going to use is from the HTCCamera.apk, and it is called 'scene_frame_pressed.9.png'. It is in the 'res' -> 'drawable-hdpi' folder in the .apk
--------
Preparation: Setup.
First things first, let's set ourselves up. Make a new folder on your desktop, and call it 'CameraEdit'
Next, get a copy of HTCCamera.apk and put it in this folder.
Now, find your apk_manager_4.9 folder, where you set up this tool, and open it.
You will see a handful of folders in here, but there are only two folders we will be working with:
1 - place-apk-here-for-modding
2 - projects
( There is a third, called 'keep', but it's not there yet. It will be generated later. )
Make a copy of your HTCCamera.apk file, and put it in the 'place-apk-here-for-modding' folder.
Okay, stop.
Now we have:
1 - A new folder on the desktop with a fresh copy of HTCCamera.apk in it. This is our final product when we are finished.
2 - A second copy of HTCCamera.apk in the 'place-apk-here-for-modding' folder in the apk manager tool.
So far, pretty simple.
--------
Part 1: De-compiling your apk.
Now that you have your .apk file in the 'place-apk-here-for-modding' folder, go into the apk_manager_4.9 folder and you will see an MS-DOS batch file called 'script'. Double left click this to open it up.
Now you see a cool green menu, with a lot of numbers and options - but don't worry i'm gonna walk you through it. Just make sure not to close this window until I tell you to - simply ignore it when you aren't using it.
First thing you have to do is type the number '22' and hit enter. This lets us select what .apk file we are going to work with.
The only option on the list is '1 - HTCCamera.apk'
Type the number 1, then press enter.
You now find yourself back at that main menu, and up in the top right corner of the window it will say 'Current-App: HTCCamera.apk |'
Now we are ready to decompile the apk file. Type the number 9 and press enter.
It will say 'decompiling apk' and when it is done you will see the main menu again, with a blinking cursor after 'Please make your decision' at the bottom.
Now, we can forget about this window for a little while. Don't close it, just ignore it.
You can find your de-compiled apk in the 'projects' folder.
--------
Part 2: Coloring.
Open up Photoshop, and once it's loaded go to File-> Open, and navigate to the 'projects' folder in the 'apk_manager_4.9' tool.
You will see a folder called 'HTCCamera.apk', go in here, then into the 'res' folder, and then into the 'drawable-hdpi' folder.
Once there, you will find 'scene_frame_pressed.9.png' - open this file into Photoshop.
Once you have this open, you will notice something you didn't see before - there are solid black lines on each of the four sides of the colored square of the graphic.
You do not want to touch, change, edit or in any way affect these black lines. To alter them even the slightest bit will make your whole .apk file broken - and we don't want that.
So what we are going to do is grab your 'Rectangle Marquee Tool' and select everything EXCEPT the black lines around the outside.
Once you have the whole picture selected, except the black lines, you will go up to the menu at the top of the Photoshop window and select 'Image'. From the drop-down list, select 'Adjustments' and then 'Hue/Saturation'
Now you have a dialog box for the Hue/Saturation control of the graphic.
The only thing we are going to change is the Hue, so make sure the 'Edit' box at the top of the window says 'Master' and then grab the Hue slider and drag it all the way to the right.
The text box above Hue should now say +180, and the color of the square has changed. ( If the color didn't change, make sure the 'preview' box is checked in the Hue/Saturation window )
Click on 'OK' and apply the change.
Save the file, and then close Photoshop.
--------
Pretty easy so far, right? not really that much to it - and we're almost done.
Next up we have to recompile the apk, and i'm going to make you take an extra step at the end of the process to reduce your chances of getting a bad apk from a compile error.
--------
Part 3: Re-compiling your apk.
Okay, find your apk manager window I told you not to close, and bring it back into focus.
You should see a blinking cursor at the bottom after 'Please make your decision'.
We are now going to type the number 11, and then press enter. This will tell it to compile the apk.
It will say 'Building Apk', and this part can take a little while - so just be patient.
When it is ready for you, the next thing it will say is:
Code:
Is this a system apk (y/n)
Type input:
You will type 'y' and press enter. Any apk that came from or goes into the /system/app folder on the device gets this answer.
Then it will say:
Code:
Aside from signatures, would you like to copy
over any additional files that you didn't modify
from the original apk in order to ensure the least
# of errors (y/n)
Type input:
You will again type 'y' and press enter.
A whole mess of text will shoot up in the window, and the very last line will be:
Code:
Press any key to continue...
Don't press anything yet, just ignore this program window for the moment.
Now, what you have to do is go back into the apk_manager_4.9 folder and you will find that 'keep' folder I mentioned before. It wasn't there until now, because it's a temporary folder the apk manager program is using to compile your apk with.
What you have to do is go into it, and delete any files you changed.
In this case it's easy, because we only changed one file.
Go into the 'keep' folder, then the 'res' folder, then the 'drawable-hdpi' folder, and find the 'scene_frame_pressed.9.png' file we edited.
Delete the 'scene_frame_pressed.9.png' file.
Now go back to the apk manager window, and press enter.
Let it do it's thing, and when it's done it'll be back at the main menu with a blinking cursor after 'Please make your decision:'
You can just hit the X in the top right corner to close the window, we're done with this wonderful tool now. ( yes - now you can finally close it. )
--------
Okay, now we have de-compiled, edited, and re-compiled our apk file - but we aren't done yet there are still some things to take care of.
Don't worry, it's almost done - and the hard part is over ( which wasn't really that hard, was it? )
--------
Part 4: Avoiding potential bugs.
Next, go into the 'place-apk-here-for-modding' folder in the apk_manager_4.9 folder.
You will see two .apk files:
1 - HTCCamera.apk
2 - unsignedHTCCamera.apk
The second one is the one you just edited, but you will notice the file size is much smaller then the original one.
Now, you could just copy the unsignedHTCCamera.apk into another folder, rename it deleting the 'unsigned' part at the beginning, and push it to your device.
We're going to add an extra step to the whole process to reduce the chances of a compile error and give you more chance for stability in the larger sense of your Android operating system.
Click to expand...
Click to collapse
Remember that folder on your desktop called 'CameraEdit' I had you make with a fresh copy of HTCCamera.apk in it? I want you to copy 'unsignedHTCCamera.apk' and paste it into this folder.
You now have two apk files in this folder, the fresh un-touched one, and the new one we did our work to.
So, use 7-Zip to extract the newly edited 'scene_frame_pressed.9.png' file from 'unsignedHTCCamera.apk' the way I taught you in Custom Sense Lockring on the MT4GS - easy step-by-step and drag it into the 'CameraEdit' folder.
You now have 3 files in this folder, the two .apk files and your newly edited .9.png graphic.
Simply add this graphic to the original HTCCamera.apk file with 7-Zip, and you can call this project done. All you have to do now is test it.
Install the new HTCCamera.apk file on your Android, take a picture, and then tap the thumbnail in the bottom corner that shows your new picture in the camera app.
It brings you to a screen where you see a full screen preview of the picture, so tap the screen and press 'grid view' from the options at the bottom.
When you see the grid of pictures, touch one and look at the color of the highlight that appears around the picture - this is what we changed.
Congratulations! You just edited your first .9.png file!
* - Don't forget to go back to the Apk Manager 4.9 thread and click thanks!
--------
Conclusion & Thoughts:
The reason we did that last step at the end is because we were only changing one small thing - there is no reason to risk the computer making a mistake while compiling the whole .apk file just to change one graphic.
By removing it from the newly compiled .apk, and placing it in the original one that you know works, you eliminate the potential for a lot of bugs and problems.
You don't have to take this extra step at the end, and could just use your re-compiled apk file - but if you've already put this much effort into it, wouldn't you want to minimize the risk of errors by taking an extra minute to do so?
Above and beyond editing a .9.png file, we have also learned how to de-compile, edit, and re-compile an .apk file for Android.
You can now de-compile an .apk file and change XML files or most anything else inside of it and re-compile a working .apk file.
Look for part 3 of this tutorial series that will teach you about .m10 files and how to work with them. Afterwards you will be able to work with all of the graphics (and most other files!) you come across in your Android system.
The only thing we changed in the graphic during the tutorial was the hue, because this isn't a guide on all the cool things you can do with Photoshop or a graphics program.
There are a lot of other creative things people can do with the graphics, and i'm looking forward to seeing what the rest of you come up with now that editing .9.png stretchable graphics is something the MT4GS community knows how to do.
Hope you all are as excited as I am!
Happy modding!
Question having read this:
A)Can I not just take the .9.png file we worked/saved in Part 2
B)Then by-pass Part 3
C)Then in Part 4 with 7-zip: use the .9.png file directly saved at Part 2 (without recompiling)?
Probably a silly question, but thought I'd ask before diving in.
Sent from my Bulletproof_Doubleshot using XDA App
dillalade said:
Question having read this:
A)Can I not just take the .9.png file we worked/saved in Part 2
B)Then by-pass Part 3
C)Then in Part 4 with 7-zip: use the .9.png file directly saved at Part 2 (without recompiling)?
Probably a silly question, but thought I'd ask before diving in.
Sent from my Bulletproof_Doubleshot using XDA App
Click to expand...
Click to collapse
No, in order for it to work correctly you must perform step 3.
What happens is when you de-compile the app, it takes that system information and translates that into those black lines or dots around the outside of the graphic file.
When you re-compile the app, it turns those black lines or dots back into the machine code it translates into - the system doesn't see them as simple black lines or dots.
If you were to put the graphic back into the .apk file through 7-Zip without actually re-compiling it, the system would see those black lines and dots, not the machine code instructions they should be, and treat it like a regular graphic file.
It then would not be able to stretch it, try to fit it in whatever situation it was trying to use it in, and then you could get any number of results from nothing to a never-ending loop you have to battery pull and re-install the ROM to get past.
( and yea, I found out about that never ending loop first-hand, there was nothing I could do to make it stop, short of that drastic solution )
Basically what it boils down to is those markers around the border of the graphic are you writing machine code without actually typing it - the compile operation translates your dots and lines into the code for you, but only during compiling.
If it wasn't for that, you could just extract and replace them the same way you did in part 1 of the guide. 7-Zip is incapable of this operation, as awesome as it is for other stuff.
This is the same principle behind trying to use 7-Zip to pull an XML file from an .apk file - try it, and then open the XML file in notepad++ and see what you get - it won't be what you want.
That's a good question, and I wanted to go into more detail about that in the guide, but this one was already getting pretty long and I didn't want to make it too much to read through.
--------
Now, if you are not going to edit the graphic, then that's a totally different story - you can feel free to pull it out with 7-Zip and put it back in, or in another .apk file.
That's only if you don't change it at all though. If you want to edit the graphic you have to follow the steps outlined above.
Because we aren't changing it when I have you pull it from your re-compiled .apk and put it into the fresh one at the end of the guide, that's an acceptable action.
I think that might be the piece of information that was lacking that caused you to ask your question.
Nice write up bro! This would have been very useful to me about a year ago lol. I get questions about 9s all the time and now I have somewhere to send them! Keep up the great work bro!
Sent from my BluMagic CM7 Glacier using the Blu Premium App
Blue6IX said:
No, in order for it to work correctly you must perform step 3.
What happens is when you de-compile the app, it takes that system information and translates that into those black lines or dots around the outside of the graphic file.
When you re-compile the app, it turns those black lines or dots back into the machine code it translates into - the system doesn't see them as simple black lines or dots.
If you were to put the graphic back into the .apk file through 7-Zip without actually re-compiling it, the system would see those black lines and dots, not the machine code instructions they should be, and treat it like a regular graphic file.
It then would not be able to stretch it, try to fit it in whatever situation it was trying to use it in, and then you could get any number of results from nothing to a never-ending loop you have to battery pull and re-install the ROM to get past.
( and yea, I found out about that never ending loop first-hand, there was nothing I could do to make it stop, short of that drastic solution )
Basically what it boils down to is those markers around the border of the graphic are you writing machine code without actually typing it - the compile operation translates your dots and lines into the code for you, but only during compiling.
If it wasn't for that, you could just extract and replace them the same way you did in part 1 of the guide. 7-Zip is incapable of this operation, as awesome as it is for other stuff.
This is the same principle behind trying to use 7-Zip to pull an XML file from an .apk file - try it, and then open the XML file in notepad++ and see what you get - it won't be what you want.
That's a good question, and I wanted to go into more detail about that in the guide, but this one was already getting pretty long and I didn't want to make it too much to read through.
--------
Now, if you are not going to edit the graphic, then that's a totally different story - you can feel free to pull it out with 7-Zip and put it back in, or in another .apk file.
That's only if you don't change it at all though. If you want to edit the graphic you have to follow the steps outlined above.
Because we aren't changing it when I have you pull it from your re-compiled .apk and put it into the fresh one at the end of the guide, that's an acceptable action.
I think that might be the piece of information that was lacking that caused you to ask your question.
Click to expand...
Click to collapse
Yes... I can see clearly now Blue!
Great stuff.
I'm gonna do some lockrings, some theming over stock apps, then look to dive into building a theme... progress through naturally with your tutorials.
Thanks
Sent from my Bulletproof_Doubleshot using XDA App
Wow. I haven't seen that guide since I had the G1.

[Tutorial][Keyboards!]MAKE YOUR OWN SWIFTKEY THEME FOR KEYBOARDS!!!

HEY THERE XDA!
ahmad89098 here and this is my first tutorial
In this tutorial, I am going to show you guys how to make your own custom theme for SwiftKey!
Note: I am not allowed to post links. So you will be needing to find source files yourself.
The hell is SwiftKey?
Swiftkey is an Android app which customizes your keyboard. You can buy themes for it. These themes are around $1.25. The SwiftKey app is very fun to use and gives an appelaing look to your keyboard!
There was a post on XDA as well in which, there were hundreds of more themes. The developer(s) called it Super SwiftKey.
At this point you might be wondering, how do you make your theme for it? Well, your'e gonna learn that today!
This tutorial is compatible for the following:
Complete Android Beginners (and above)
For Android Noobs (and above)
People who really want to get into keyboard design
People you want their own keyboard for SwiftKey
So without further ado, lets get started! :laugh:
1. GET YOUR TOOLS![/SIZE]
For making the keyboard, we will be needing the apk itself. We will later on install it once it has keyboards.
To download the apk go to google and google: download swiftkey apk and use the first link whose link says apk4fun. Donwload apk.
Once we have the apk file, we will need our tools. Download WinRAR and Notepad++ (Don't be lazy!)
2. GET READY TO WORK!
Now, we will need to get the files out of the apk.
Move the apk from your Downloads to your Desktop (for conveniance.)
Open Winrar. When you open it, it gives you the files on your desktop. Find the apk, open it. A new windows pops up, with some folders.
Now make a new folder on your Desktop. Name it Swiftkey.
Extract them files using WinRAR.
Once extracted, open up your folder. Should look something like this:
Congratulations! Your working space has now been set up!
2. NOW START TO WORK!
OK guys! We will now start our work.
Remember: The language we will be dealing in is xml. If you know about it, then you will be at an advantage. If you don't know problem!
Open the folder named "assets"
Then open "themes"
Now opens up a list of folder. If you are familiar with SwiftKey, then you know that when we open the themes menu, these are the exact names of the themes.
For beginner conveniance, we will work using the "pumpkin template". because it has a jpg background which can easily be replaced.
Now copy the "pumpkin" folder and paste in the same location.
We will be working in the new pumpkin folder. Name it whatever you like!
When we open the working folder, there are some folders. Open "hdpi"
Now open a list of xml files with a blank icon.
Open key_special.xml with notepad++ .
As you can see, the first line says,
<item state_pressed="true" drawable="key_base_pressed.9.png" />
This means that when a key on the keyboard is pressed, the key should look like the png specified. In this case, the png is
key_base_pressed.9.png.
Keeping this window open, go back to the working folder and open "key_base_pressed.9.png"
If you look at more files in the folder, you will find key_base_normal.9
When you compare these two png's, you will find that key_base_pressed is just a highlighted version of key_base_normal.
Now, edit key_base_normal.9 to whatever color you want your keys to be. Use Paint, Photoshop, or any other image editor.
After this, edit key_base_pressed.9 to what color you want a pressed key to be. Usually, a highlighted version of the color you have chosen is suitable. The whole thing, however, entirely depends on you.
Now, it is time to chose the background of the whole keyboard. This background will be overlapped by the keys.
To choose this, open the file"popup_background.xml" in Notepad++
We will now edit the line where it says: "<solid color="#333333" />"
#333333 is the color code. Now, when you decide the color you want, you need to find out the code for your color.
Now enter the code. Done!
We now have our own:
a solid background key color
a color for the key
and for when the key is pressed.
The only thing left is the text color. I am just getting to that.
there is a .png file, flip_left. Its like a wifi signal tilted. Orange is growing from lighter to darker.
Along with it is another png, flip_right. It is an inverted image of flip_left.
Edit these to your liking.
Chose your color. E.g blue.
Open flip_left.png in any image editor. We will use Paint
Zoom in as the image is very small.
Start working on your "triangles"
Do the same thing for flip_right.png. Note: these should be exactly the same tint of white in both.
Once completed, copy all these png's and edited xml files to the folders "hdpi" "ldpi" " xhdpi" "mhdpi". These are located in "pumpkin"
:laugh: CONGRATULATIONS :laugh:
WE HAVE FINISHED ALL THE EDITING :highfive: :victory:
The only thing now left is to compile all these files back into the apk. It is now time to wrap up.
Change your folder name to: "Whatever you want.."
Open the SwiftKey apk in WinRar.
Copy the folder "SwiftKey" to the apk.
Now delete all the original files in the apk.
Once deleted, copy the edited files from the SwiftKey folder from dekstop to the apk.
Delete the folder in the apk.
Done!!!!!!
You now have a custom keyboard! Install the apk on your phone and boom!
I hope you learned stuff.
Support me by liking and making use of this thread!
Goodbye!
AHMAD SALEEM MIRZA
I can't find the key_special.xml file. where is this located exactly?

GWD - How Do I Change Font Color on Tap Action?

Hi,
I know how to create an Action and assign a Tap or Double-Tap action to change an image, but if I am using a digital watch face and want to tap to change the color of the time display (as opposed to a background image), how would I go about doing that?
For example, if my default digital watch face shows the time digits in red, how can I set an action to change it to orange upon the Tap Action, then yellow, then green, etc.?
Thanks in advance!
-Swooperz
Swooperz said:
Hi,
I know how to create an Action and assign a Tap or Double-Tap action to change an image, but if I am using a digital watch face and want to tap to change the color of the time display (as opposed to a background image), how would I go about doing that?
For example, if my default digital watch face shows the time digits in red, how can I set an action to change it to orange upon the Tap Action, then yellow, then green, etc.?
Thanks in advance!
-Swooperz
Click to expand...
Click to collapse
There are a ton of watch faces out there that change their font color when you tap on the time digits. Surely someone knows how to create this effect in GWD. Alternatively, is there a way to view the xml from purchased or downloaded watch faces on my watch? Just to view the code for that action?
Thanks in advance!!
i was curious about the same thing.
so what i did was copied the .wgt file of a face that had that feature as it was being sent to my watch. root is needed to intercept the transfer from phone to watch.
renamed to .zip, unzipped and looked through the files.
its hard to explain but there is no special coding in the xml for this. it is basically using layers and a transparent png as a font.
i have never shared a gwd file so not sure if you can but i am willing to do a very basic time face and send it to you, if you would like. i will include all files so you can see what is happening.
let me know.
Hi Stealo,
That sounds awesome. I would love to see how this is done. I'd root my Note 8 but I don't think the Verizon Note 8 can be rooted safely. Anyone correct me if that is not right.
Anyway - yes, please do share whatever you find, Stealo, and let me know how I can help.
Cheers,
Swoop
Swooperz said:
Hi Stealo,
That sounds awesome. I would love to see how this is done. I'd root my Note 8 but I don't think the Verizon Note 8 can be rooted safely. Anyone correct me if that is not right.
Anyway - yes, please do share whatever you find, Stealo, and let me know how I can help.
Cheers,
Swoop
Click to expand...
Click to collapse
ok cool. i will try and get it done tonight, and post.
----------------------------------------------------------------
Ok, so i started writing a "how to" and it got way out of control, :silly:.
I cant take any credit for this, all i did was pull apart someone elses work and learn from it. The attached is my work but built in the same way as the other person did it. I hope this doesnt upset anyone. I will never share the original persons work.
I have attached all the files you need for this to work including my gwd file & tpk file. Im not sure if you will be able to import it into your GWD but give it ago. if not start a new face and rebuild it from the resources.
At any point you get stuck let me know and i will help you out.
Hi Stealo,
Thanks for posting this! Things have been crazy busy here and I have not yet had a chance to sit down and dig into this but I look forward to seeing what cool trickery lies in the scripts, etc.
Thanks again,
Swoop
Swooperz said:
Hi Stealo,
Thanks for posting this! Things have been crazy busy here and I have not yet had a chance to sit down and dig into this but I look forward to seeing what cool trickery lies in the scripts, etc.
Thanks again,
Swoop
Click to expand...
Click to collapse
hey swooperz,
nothing is scripted for this to work.
just layer composition and thats it.
if you need a hand or any explaining let me know.
stealo said:
hey swooperz,
nothing is scripted for this to work.
just layer composition and thats it.
if you need a hand or any explaining let me know.
Click to expand...
Click to collapse
Everything worked like a charm! I got one error about the TPK needing to be rebuilt when trying to deploy to my watch (unsure of the issue), but I chose only version 3 and it worked perfectly. Maybe my watch needs to have OS 4? I have a Samsung Gear S3 Frontier.
Anywho - now I am going to learn how bitmap fonts work and how to convert a TTF font that I own, to a bitmap font. :good:
This is awesome! Thanks again for helping me get over this hurdle. It was a big one for me. :laugh:
Swooperz said:
Everything worked like a charm! I got one error about the TPK needing to be rebuilt when trying to deploy to my watch (unsure of the issue), but I chose only version 3 and it worked perfectly. Maybe my watch needs to have OS 4? I have a Samsung Gear S3 Frontier.
Anywho - now I am going to learn how bitmap fonts work and how to convert a TTF font that I own, to a bitmap font. :good:
This is awesome! Thanks again for helping me get over this hurdle. It was a big one for me. :laugh:
Click to expand...
Click to collapse
i am using gwd 1.6.1 i think which lets you build for os 4.0 and lower.
the font in the example was the fortnite font.
very simple task but very boring to make, but you will only need to do once for each digit 0-9.
are you familiar with adobe illustrator or photoshop?
simply make the canvas the size you need with the same colour or pattern of the face, type a single number, adjust its size so it just fits height and width, cut it out so the number is transparent, save it as a png to preserve the transparency.
much more to it but like i said let me know if you get stuck.
regarding the background cut to make, i think i made it 200px wide and 80px high.
so that means you can fit 4 digits at 50px wide X 80px high, which is important for making the font.
stealo said:
i am using gwd 1.6.1 i think which lets you build for os 4.0 and lower.
the font in the example was the fortnite font.
very simple task but very boring to make, but you will only need to do once for each digit 0-9.
are you familiar with adobe illustrator or photoshop?
simply make the canvas the size you need with the same colour or pattern of the face, type a single number, adjust its size so it just fits height and width, cut it out so the number is transparent, save it as a png to preserve the transparency.
much more to it but like i said let me know if you get stuck.
regarding the background cut to make, i think i made it 200px wide and 80px high.
so that means you can fit 4 digits at 50px wide X 80px high, which is important for making the font.
Click to expand...
Click to collapse
Makes sense. I have Photoshop so will upgrade GWD and open the files up in Photoshop to have a look. Thanks again!
I got the set-up working with my own bitmap font and clickable button to change the colors - the caveat now is when a single digit shows up - the mask layer shows up from underneath the single digit, since it gets centered, and the mask is only half the width (one digit's width as opposed to two digit widths).
See my picture of both cases (still need to work out anti-aliasing artifacts).
Any ideas on how to work around that, yet still only use single digit hours?
EDIT: Just to be clear: my background is black, so other than the digits, there should be no purple color coming through as shown for the single digit of one.
Thanks,
Swoop
Swooperz said:
I got the set-up working with my own bitmap font and clickable button to change the colors - the caveat now is when a single digit shows up - the mask layer shows up from underneath the single digit, since it gets centered, and the mask is only half the width (one digit's width as opposed to two digit widths).
See my picture of both cases (still need to work out anti-aliasing artifacts).
Any ideas on how to work around that, yet still only use single digit hours?
EDIT: Just to be clear: my background is black, so other than the digits, there should be no purple color coming through as shown for the single digit of one.
Thanks,
Swoop
Click to expand...
Click to collapse
hey swoop,
good to see you making progress.
just off the top of my head
at the the bottom of the screen is a time line. so you could make 2 backgrounds and have 1 apear between the hours of 1 to 9 and the other from 10 to 12.
read about the conditional lines,
https://developer.samsung.com/galaxy-watch/design/watch-designer/gear-watch-dev
to fix the auto centering maybe align your text to the right so a single digit will snap right when changing.
i use only 24hr time, not sure why but always have. if i get time i will try it out and see.
regarding artifacts, i generally use illustrator, which produces cleaner images. if you dont have illustrator you can dowload a free alternative called inkscape, i think, or an online vector converter.
i always make an image twice as large if possible then clean it up and scale it down. im still learning also, so what i do may not be right but it works for me.
in the mean time let me know if what i said is right.
Thanks, Stealo.
I have Adobe CS 6 with Illustrator, so will try that next as well as start working on a timeline-based position of the background. Great idea! That way, I can leave the single digits centered (I hope), which looks better in my design.
Cheers!
is It possible to change with double tap, one object's color that moves ? (such as the second hand)
stealo said:
i was curious about the same thing.
so what i did was copied the .wgt file of a face that had that feature as it was being sent to my watch. root is needed to intercept the transfer from phone to watch.
renamed to .zip, unzipped and looked through the files.
its hard to explain but there is no special coding in the xml for this. it is basically using layers and a transparent png as a font.
i have never shared a gwd file so not sure if you can but i am willing to do a very basic time face and send it to you, if you would like. i will include all files so you can see what is happening.
let me know.
Click to expand...
Click to collapse
just found this thread.. may i ask you how did you intercept the transfer from phone to watch?
i have phone rooted, do i need root also on gear?
i'd like to do this to study some of watchfaces i bought, so i could learn to make them.
thanks in advance ^^
up @stealo
erghetto said:
up @stealo
Click to expand...
Click to collapse
hey sorry, dont use xda as much anymore.
You need to have a rooted device (phone/tablet) first, and a good file explorer, no root needed on watch at all. i cant give specifics as i dont use the devices anymore, i can try and point you in the right direction though.
what i did was monitor a folder in the WEAR app root directory on my phone, when i downloaded an app from the store it would store it on my phone for maybe ten seconds, then transfer to my watch.
Using your file explorer you can copy it and paste it to a new location before the transfer ends.
Rename it .zip, extract, learn and explore.
Like i said i am not 100% if it is still possible as i no longer use both devices. Please dont steal anybodies work though.
Good luck.
stealo said:
hey sorry, dont use xda as much anymore.
You need to have a rooted device (phone/tablet) first, and a good file explorer, no root needed on watch at all. i cant give specifics as i dont use the devices anymore, i can try and point you in the right direction though.
what i did was monitor a folder in the WEAR app root directory on my phone, when i downloaded an app from the store it would store it on my phone for maybe ten seconds, then transfer to my watch.
Using your file explorer you can copy it and paste it to a new location before the transfer ends.
Rename it .zip, extract, learn and explore.
Like i said i am not 100% if it is still possible as i no longer use both devices. Please dont steal anybodies work though.
Good luck.
Click to expand...
Click to collapse
Thanks for the info. I have root on my s8 so i could try, but wear app folder is a bit generic. Without knowing the folder's name i wouldn't know where to look.
Thanks again
erghetto said:
Thanks for the info. I have root on my s8 so i could try, but wear app folder is a bit generic. Without knowing the folder's name i wouldn't know where to look.
Thanks again
Click to expand...
Click to collapse
hey, sent you a pm.
mimmog said:
is It possible to change with double tap, one object's color that moves ? (such as the second hand)
Click to expand...
Click to collapse
I want to know the same thing. Basically I want to to double tap on say 3 o'clock area and have hour hand change images/color. How is this possible? Yes, you can change background defining itself as a buton and add "change image" action but how can you change other layer images by double tapping on another layer?

Categories

Resources