[GUIDE][TUT][.9.png] Theming your SamsungIME Keyboard - Verizon Samsung Galaxy Note II

Hey guys,
I was asked a week or so back to make a guide so others can theme the Stock SamsungIME.apk the way they like. I have made my thread to do this and you can put in request if this guide is not helpful(which I hope it is).
I will answer as many questions as I can, time permitting, and be as Noob friendly as I can, as well. I know this guide will not be perfect and there might be some things I am leaving out, and if so tell me, I will adjust the OP with any suggestions or changes. So here goes nothing...
Things you need:
Android SDK
Java JDK and JRE
Apktool
Notepad++
xUltimate-d9pc
Photo Editor (Gimp/Photoshop)
Before we begin, I am not going to go into how to load/decompile/recompile apks.. There are some good guides out there and here are some..
http://forum.xda-developers.com/showthread.php?t=2195680
http://forum.xda-developers.com/showthread.php?t=2206938​
After you have the SamsungIME.apk totally decompiled you will want to open the folder it decompiled into and start with the res/drawables-sw359dp-xhdpi folder. In this folder there is all the pngs you need to edit. For starters the keys themselves..
You want:
sip_key_bg_normal.9.png
sip_key_bg_option.9.png
sip_key_bg_pressed.9.png
​As you can tell, by the name, these are not normal pngs. You will see a 1 pixel border on all sides of the image. When editing the png either erase them or resize the canvas of the image. Just subtract by 2 form the height and the width, but remember when you save it re open it and adjust the canvas size back to the way it was. As my understanding of these goes, they are named this way because Android recognizing these .9.pngs and stretches them.. When I first attempted editing these I would have nothing but problems, of course because I was doing it wrong. I never could understand where the lines go and what they actually do. Thats probably because I was trying to do it with transparent/semi-transparent images and could not see the actual image expanding. Well when you are editing these with draw9patch, I noticed two very important things to look at (for the keyboard). The window to your right is how the actual image will look when expanded, but to see that you have to go to the bottom of the screen and the second scroll bar, move it all all the way to the right.
​
You will notice that it stretches the image.. This is the same thing Android does.
The middle image needs attention here because it expands it horizontally. So that means when you expand it all the way thats what you spacebar will look like. .
​
You notice that these edges (red lines) Are not defined they are rounded.. Because they are not patched correctly.
​Notice the difference? This after it was patched with the proper line alignment.
To start you want add to full lines on the bottom and the right side. Next is the top and the left side. These are the lines you need play with to make you image look right. I used to only add a 1 pixel dot in the middle and one pixel line on the left. But when I started getting more advanced with photoshop/gimp I noticed my images would not looking the same. When you add gradients or borders to you keys, seeing the image on the right expanded is important because you will draw you lines to make you image look like it did in photoshop/gimp. NOTE: Don't leave any space in the lines to the right and on the bottom. You can, however, do so on the left and top but it will distort your png.
Here are a few guides to help you if you have anymore questions:
http://forum.xda-developers.com/showthread.php?t=2326393
The next image of importance is:
qwerty_keypad_bg.png
​
This is the background of the keyboard.. NOTE: there is also one of these located in res/drawables-sw359dp--land-xhdpi, the only difference being the above image is for Portrait and land is for Landscape. Also, they are two different resolutions so be careful when changing them. You can change this image to anything you want.. It is a normal png so therefore no patching or further steps are needed.
Next would be all the other option pngs, backspace, space bar, voice, settings, enter key, etc. You will will find these starting with the word qwerty_.
So example:
qwerty_key_icon_enter.png
​
This is the enter key as it sits on your keyboard.. Yes there are other ones but there are for different actions.
Another thing we might want to change is the color of the CAPS key when it is enabled.
That png is named:
qwerty_key_bg_shift_capslock.png
​
As you can see a lot of these are named exactly what they are..well some at least..
Next is .xml edits. You want to locate res/values-sw359hp-xhdpi/colors.xml. You will need to open this with notepad++ to edit colors of the key text, pressed key text, shadow of those text, space bar lettering, etc. You will only (or I only do) need to focus on the first 12 lines. They pretty much explain themselves by there names.
Code:
<color name="normalkey_shadowcolor">#ff000000</color>
<color name="functionkey_shadowcolor">#ff000000</color>
<color name="functionkey_labelcolor">#ffe2e2e2</color>
<color name="normalkey_labelcolor">#ffe2e2e2</color>
<color name="pressedkey_labelcolor">#ff122438</color>
<color name="disablekey_labelcolor">#7fe2e2e2</color>
<color name="popup_normalkey_labelcolor">#ffffffff</color>
<color name="popup_pressedkey_labelcolor">#ff2d5a8c</color>
<color name="normalkey_extra_labelcolor">#ffe2e2e2</color>
<color name="spacekey_labelcolor">#ffb6b6b6</color>
Click to expand...
Click to collapse
You'll notice that the colors are hex codes.. So the first two letters or numbers is for the transparency.. The next six define the actual color.
After we have edited our xml we can go ahead and recompile the apk. You should recompile with no errors. If you do encounter an error it's possible that you edited the color wrong and made it seven letters instead of eight or vice versa. Make sure that you transfer the old AndroidManifest.xml and META-INF folder form your original APK and transfer them to your new APK in SamsungIME/dist/.
FInally, you can copy you NEW SamsunIME.apk to your sd card, reboot into recovery. I prefer this method (Thanks to @Deckoz2302) because I would have trouble with APK's fully copying through adb. When in recovery select Mount, then click System. Select back. Then select Advanced, than File Manager. When in File Manager goto wherever you put your new APK. Copy it. Then go to System/app/ and hit Select and slide to copy. Reboot!
:good:Special THANKS to: @Deckoz2302: Best developer I have ever talk to! @Rizal Lovins, @grilleld, @Arsaw, @twanskys204, @Winterlove, @GuneetAtwal and I REALLY hope I didn't leave anyone out! If I did I'm sorry, tell me and I will update!:good:​

FIRST......!!!
Thanks brother, I am going to give this a go tomorrow.
Today, young ,men on acid realize that all matter is merely energy condensed to a slow vibration, we are all one consciences sharing itself subjectively, there is no such thing as death, life is only a dream, and we are just imaginations of ourselves And now to the weather.....

Reserved. .
Sent from my Galaxy Nexus using xda app-developers app

This is quite the guide thanks so much for this.
Sent from Kendrick Lamar, King of New York

Nice Tut Great Work..!

Can all this be done on Mac osx?

Shamestick said:
Can all this be done on Mac osx?
Click to expand...
Click to collapse
If there is an Android SDK for OSX then i'd imagine it can be done on a Mac.

The SDK was fine, its getting the java jdk that's giving me issue

Shamestick said:
The SDK was fine, its getting the java jdk that's giving me issue
Click to expand...
Click to collapse
@Shamestick - Do you use Polaris to run Windows? That could work possibly.
Sent from my SCH-I605 using xda app-developers app

dudeicles said:
@Shamestick - Do you use Polaris to run Windows? That could work possibly.
Sent from my SCH-I605 using xda app-developers app
Click to expand...
Click to collapse
I do not, and I haven't gotten a copy of windows to dualboot with yet either. My problems always come whe i try to go to the downloading site for java, it just will never open on chrome or safari

well done my friend ! Nice to see you here

Text color SamsungIME.apk Note3-MOD
I have a big problem.
I decompiled the SamsungIME.apk from Note3-MOD to change the color of the KEY-Text from BLACK to WHITE.
But I can't find the right XML and location where the code has to be changed.
Can someone help me in this topic?

Superwolf77 said:
I have a big problem.
I decompiled the SamsungIME.apk from Note3-MOD to change the color of the KEY-Text from BLACK to WHITE.
But I can't find the right XML and location where the code has to be changed.
Can someone help me in this topic?
Click to expand...
Click to collapse
They will most likely be in values/colors.xml

For testing I already changed every black code to white in this XML but it does not change.

Superwolf77 said:
For testing I already changed every black code to white in this XML but it does not change.
Click to expand...
Click to collapse
Oops sorry its in /values-sw359dp-xhdpi/colors.xml.. Took me a long time to figure out that! lmao! Anyways have fun hope I helped!

Thank you for the help. It works fine now.

Thnks sir.. usefull :fingers-crossed:

Apks?
For those who have made custom keyboards will you please post your apks?

Good

Thanks for your tutorial. I have a question about adding a backround image for the keyboard.Not sure if thread is to old so please respond if you an answer question and ill write it . thanks

Related

Guide on how to correct the framework-res.apk so you can cook ICONs

OK folks,
Have a look at this guide that I created for editing the framework-res.apk so that you can then go to the UOT Kitchen and cook up your own ICONS and Batteries.
It is a long read and most folks can probably figure it out.
I have used this to create my own Battery and Status bar icons.
Regards,
Alperin1
I have converted your document to a PDF (some folks don't use Word).
Download here
If you want me to remove this I will.
thanks very helpful guide, but too involved for me. I will either use some one else theme, or use 7zip open archive and change PNG's trick.
Hopefully someone can upload an edited framework-res, for every DJ_Steve update that we all can share for UOT.. hint...hint...
thanks again, I may give this a try when I have time, hopefully I wont need to though.
chrisrotolo said:
thanks very helpful guide, but too involved for me. I will either use some one else theme, or use 7zip open archive and change PNG's trick.
Hopefully someone can upload an edited framework-res, for every DJ_Steve update that we all can share for UOT.. hint...hint...
thanks again, I may give this a try when I have time, hopefully I wont need to though.
Click to expand...
Click to collapse
Gopu already uploaded an edited framework-res..here it is
http://www.megaupload.com/?d=4TI7W0E1
ramtix said:
Gopu already uploaded an edited framework-res..here it is
http://www.megaupload.com/?d=4TI7W0E1
Click to expand...
Click to collapse
Ramtix, i knew that the framework was out thre for the others to use.
I guess the guide is for the folks that want to do all the work and learn a lttile bit about how the Framework is edited.
It took me a long time to figure out how to edit the 9.png files and compile them and just wanted to help others to do the same.
I tried that framework and failed to cook everytime
What is the use of those .9 pngs anyways?
chrisrotolo said:
I tried that framework and failed to cook everytime
What is the use of those .9 pngs anyways?
Click to expand...
Click to collapse
OK, what are the 9.pngs used for or why are they needed.
Stretchable Patches
If you have an image that you may need to stretch you then converting it to a 9.png will allow it to stretch. Also if you need put something in the PNG file, by converting it to a 9.png you can tell it where the text/data/information is allowed in the png file.
When you convert to a PNG you need to need to put a single pixel on the left side of the image and the top of the image. This pixel is not part of the image but in a frame around the image the frame also is just one pixel all the way around the image.
When you put the pixel on the top of the image you are telling the system where the image can be enlarged. Draw and line straight down from you pixel and this is where the image will stretch from. This just allows the image to grow to the left and to the right. Think of it as a square when you put the dot at the top of the square you can them change the square and stretch it left and right to make the square wider, so that it is now a rectangle. This all comes in handy when you rotate your device from landscape to portrait and back again.
Now when you put the pixel on the left side of the image, again in the frame that is around the PNG file, you are telling the system where it can stretch the image, this time you can pull the image up or down and so the height will change. Again image a square, you put the dot on the left side of the this determines at what point the square is allowed to stretch.
Only the lines with the dots on them will change, the rest of the square will retain the original shape and the original image. Most of the time this is done to an image that is only one color so that you are not messing with an image.
Here is the best example I can give of the DOT at the top of the 9.PNG or the left side.
Take two pieces of blank paper that you have and set one on the table and then set the second piece of paper in top of the first with about one inch of the right side of the first (bottom) piece of paper showing. The point where the top piece of paper ends and the bottom piece of paper starts is that DOT. Now slide the bottom piece of paper to the right and keep the top piece of paper still. Hope this all make sense
Content Area
Now lets look at the right side and the bottom of the PNG file. These two side determine where in the PNG file that text or other stuff can overlay or be imposed into the PNG file.
If I have an PNG that is a button and it is 50 x 50 pixels and I want the text for the button to be centered left to right, I would focus on the bottom of the 9.PNG image. I want the text to be able to use most of the pace from left to right but i do not want it to use the left 5 pixels at either end, I would create a line at the bottom of the 9.PNG that begins 6 pixels from the left and ends 6 pixels from the right. Why 6 pixels you are asking, well I have a one pixel from around the image and I needed to take that into account.
The same thing is used to center the text on the button from the top and bottom. Only this time you would use the right side of the image and fill in all pixels except for the 6 from the top and the 6 from the bottom.
Now when the button is stretched, you can use more of the space, but you will never be able to use the last 5 pixel on the top, bottom, left or right.
WOW, that was a long write up.
Enjoy,
Alperin1.
BTW, this is not unique to the Streak, it is used for the Android OS and maybe more.
alperin1 said:
Ramtix, i knew that the framework was out thre for the others to use.
I guess the guide is for the folks that want to do all the work and learn a lttile bit about how the Framework is edited.
It took me a long time to figure out how to edit the 9.png files and compile them and just wanted to help others to do the same.
Click to expand...
Click to collapse
Alperin, dont get me wrong, what you did is awesome, useful and will be appreciated for all other users in the forum especially for future bulids.You did a great effort putting it in words and composing that. thumbs up!
ramtix said:
Alperin, dont get me wrong, what you did is awesome, useful and will be appreciated for all other users in the forum especially for future bulids.You did a great effort putting it in words and composing that. thumbs up!
Click to expand...
Click to collapse
All is good. I did not intend for my response to be a flamer at you.
I think some folks just want to have some fun and try to make things work and a little help here and there can go a long way.
Thanks
Great explanation of .9.png's
Finally got the edited framework to cook
Hopefully this helps with more themes for Streak.
Thank you all around
Tried making my own framework.apk but failed big time, appreciate you uploading your work for me to use. Will keep the guide and continue to play with it, would like to say that I beat the software, not that the software beat me.
Keep hacking away at it.
Do you know where you are beating the software into submission. (where are you stuck?)
When it's time to complie is where I fail
alperin1 said:
Keep hacking away at it.
Do you know where you are beating the software into submission. (where are you stuck?)
Click to expand...
Click to collapse
alperin1, I will walk you through my Eclipse phase and maybe you can tell where all goes wrong.....
1. Make edits to .9 files like a champ if you don't mind me saying so...
2. Open Eclipse and go to File/new/android project and nothing, import LunarLander files and make sure settings are on Android 2.2
3. Create and now my copy of LunarLander is permanently updated to my edited .9 files (so assume at this point all is good to go).
4. At Export Signed Application Package is where I am having my problems, go throught the steps receive confirmation my file is G2G and when I move them to my Framework file all the edits are gone, like I did nothing to them.
5. Have preformed #4 multiple times and same result every time, everything moves but my edits are stripped out.
6. Figured maybe it is magic and edits will reappear when I cook my file, well no luck, get same exact error report as when I first tried to cook me some Icons on UOT.
Any ideas on what is causing my updated .9 files to loose the edits when I move them from LunarLander to Framework (Yes I do accept the overwrites when prompted).
Before you do the last step in Eclipse, drag one of the png files to your desktop and view it.
I am at work. I will play with this when I am home.
Sent from my Dell Streak using XDA App
vanemburghj said:
alperin1, I will walk you through my Eclipse phase and maybe you can tell where all goes wrong.....
Any ideas on what is causing my updated .9 files to loose the edits when I move them from LunarLander to Framework (Yes I do accept the overwrites when prompted).
Click to expand...
Click to collapse
This is very interesting. When I export my package from Eclipse and then pull the images they do not show the dots and the bars just like you are seeing. So, I have to say this part may not be where your are running into problems.
Is it possible for you to post the error text? Put it into a zipped file. I will see what I can do. This is kinda new to me so I will do what I can for you.
So you are in Eclipse and you have lunarlander, you then put all your edit 9.PNG files into the folder. Next your export it.
After you have created the new lunarlander.apk, you are going into it and extracting the 9.png files you need. You are then placing these file in the same location that you pulled them from in the framework-res.apk. right? Then you are uploading this to the UOT kitchen.
Will do
But will have to wait till I get home from work.
alperin1
Here is my LunarLaner.apk, none of the edits survived creation of .apk, but they are in my LunarLander sample as your guide shows them to be. So it is when I make the .apk that all fails. Have attached my Pre-export LunarLander so you can verify I made the changes to .9 files.
Window 7 Ultimate 64 bit
Norton Anti Virus
Plus other software
Any and all ideas are welcome.
vanemburghj said:
Here is my LunarLaner.apk, none of the edits survived creation of .apk, but they are in my LunarLander sample as your guide shows them to be. So it is when I make the .apk that all fails. Have attached my Pre-export LunarLander so you can verify I made the changes to .9 files.
.
Click to expand...
Click to collapse
Well, I have taken the 9.PNG files that you have provided and I put them into my Framework-res.apk file and I was able to cook up some goodness for myself at the kitchen.
As you are stating and you are correct, the frame around the 9.png is not showing after step number 4, but the information is there, i just do not yet know how to view it.
I think the problem may be that the same 9.png files are in two locations in the framework-res.apk. Can you try to cook a new set of ICONs or anything for that matter and when you get the errors, put them in a zipped text file and post it here for me.
Oh and what ROM are you using? DJ Steve 1.9? If so, you should have many more images to edit that what you have provided to me.
Cooked my own framework!!!
alperin1, Thank you, think I needed confirmation that once exported via eclipse edits would disappear, plus I took my time and made sure I did the wallpaper steps exact. Cooked my own framework, I am getting there, am sure it is one very small drop in a very big ocean of Android development that I have learned with your expert help I do appreciate it.
vanemburghj said:
alperin1, Thank you, think I needed confirmation that once exported via eclipse edits would disappear, plus I took my time and made sure I did the wallpaper steps exact. Cooked my own framework, I am getting there, am sure it is one very small drop in a very big ocean of Android development that I have learned with your expert help I do appreciate it.
Click to expand...
Click to collapse
Grasshopper.you are doing well. You have made my day.
Sent from my Dell Streak using XDA App

Sense green buttons/highlights

Tried looking for a way to change those green highlights that are everywhere in a sense based ROM. For example, when you are in a text message, the message body is highlighted in green and the send button turns green when you hit it. Is there any way to change these?
I'm running Mik Shifted-G v1.5, I have modified my task bar and notifications screen via UOT Kitchen. I'm looking for red if there's already a post somewhere, or a DIY tutorial. Thanks in advance
Some of these are application specific and others (the bulk I would say) are located in framework.res and com.htc.resources. In the two framework files, you are looking for .9 pngs in the res/drawable-hdpi folders. If you already have red png's to replace the green, you can just copy them over in 7zip. To change the existing green to red using the original files is a bit more complex and a lot more time consuming, but pm me if you need to go that route, and I can help you out.
I would suggest editing all framework files first and then look for any stray green bits that may be application specific.
Rynomite said:
Some of these are application specific and others (the bulk I would say) are located in framework.res and com.htc.resources. In the two framework files, you are looking for .9 pngs in the res/drawable-hdpi folders. If you already have red png's to replace the green, you can just copy them over in 7zip. To change the existing green to red using the original files is a bit more complex and a lot more time consuming, but pm me if you need to go that route, and I can help you out.
I would suggest editing all framework files first and then look for any stray green bits that may be application specific.
Click to expand...
Click to collapse
Thanks for the reply, I will check the framework files and go from there. Any specific program that you would recommend for editing the pngs?
It also depends on what Rosie.apk you use as well, like my rosie is Rosie 3 so the button presses for some of the dock are in fusion and some are in Rosie.apk its weird i guess its more or less finding the images you need edited for your version of sense, because now we have Sense 1-3 on the shifty
Sent from a Hybrid Supreme Shift
strapped365 said:
It also depends on what Rosie.apk you use as well, like my rosie is Rosie 3 so the button presses for some of the dock are in fusion and some are in Rosie.apk its weird i guess its more or less finding the images you need edited for your version of sense, because now we have Sense 1-3 on the shifty
Sent from a Hybrid Supreme Shift
Click to expand...
Click to collapse
This is true, I'm not sure I'm going to have fun with this
Sent from your Mom's Jitterbug
There are only a couple png's in Rosie that you need to change out. Like strapped365 was saying, there are variations among the different versions of Rosie, but you should be able to locate the files to edit fairly easily.
When editing .9 pngs, you must decompile them (not just extract and decompress). This can be done with apk manager. I use pixlr online to do the actual editing. Pixlr is free and it has a color change tool that works ok. Just be sure to use the selection tool to select only the colored area of the image you will change (I always select all but the 1px outer border). If you don't exclude the outer perimeter of the .9 in Pixlr, it won't recompile correctly.
Hope this helps. It took me a long time to learn how to this, but it's the best way I know to get purely custom colors.
Rynomite said:
There are only a couple png's in Rosie that you need to change out. Like strapped365 was saying, there are variations among the different versions of Rosie, but you should be able to locate the files to edit fairly easily.
When editing .9 pngs, you must decompile them (not just extract and decompress). This can be done with apk manager. I use pixlr online to do the actual editing. Pixlr is free and it has a color change tool that works ok. Just be sure to use the selection tool to select only the colored area of the image you will change (I always select all but the 1px outer border). If you don't exclude the outer perimeter of the .9 in Pixlr, it won't recompile correctly.
Hope this helps. It took me a long time to learn how to this, but it's the best way I know to get purely custom colors.
Click to expand...
Click to collapse
Thanks for your help. All of you, I will hit the thanks button when I get on my computer again. I want to customize my phone to my liking and this will definitely help a bunch
Sent from your Mom's Jitterbug
hey please let me know if you figured out how to do orange/red

Development Discussion: Modification of PDF Viewer

Taking notes over PDF slides with the scribe pen has really saved me a lot of hassle. I love this function of the flyer. There's really only one way it could be better: Fullscreen support, or at least "more screen" support.
Not only does the HC bar take up space, but the menu/title bar on top is even bigger. The pdf viewer has the screen real estate of a 5inch phone.
PDF editing seems like only a moderately used feature, so I don't see this getting done on it's own. I'm offering a very modest reward for a fix.
I would be willing to donate for the removal of the huge uppermost Title/menu bar in PDF viewer, so that a double-tapped fitted pdf page will fill the new space. See the attached image. You can leave the small menu button in the corner if possible, or just get rid of it if it's too difficult.
I'm hoping this is as simple as modifying a few variables in the apk. I could be very wrong.
I can live with just the HC bar at the bottom.
Note: I have tried apps like repligo and ezpdf which do offer fullscreen support. However, annotating and changing annotation options takes many more steps than the HTC pdf viewer.
Secondary goal:
Apps like honeybar and honey hide widget cause all pen written annotations to be shifted up.
I believe the solution to the first problem would also allow an easy fix of the shifting pen annotations. I would like the PDF viewer to accept pen strokes properly with a hidden HC bar.
No one's willing to give it a shot? Ah well.
This will be my only bump.
I've attached the (unmodified, I think) HTCPDFViewer.apk from /system/app from LeeDroid's 4.1.0 rom.
I was the guy who removed the obnoxiously large language bar from Sony Ericsson's keyboard back when I was still using my u20i phone... unless HTC is particularly irritating about how it structures its resources, you're right that it is a matter of decompiling the APK, adjusting numbers, and recompiling it. Merely hiding is not difficult (making the Menu button semi-transparent is probably too difficult, though, but you can pick a ROM with the hardware buttons enabled).
Unfortunately it is also incredibly tedious to decompile and recompile everything right, from my experience of the keyboard hack. I'm not really up to it at the moment. Hope you can do it.
I've poked around in the archive. I wonder if I could just delete the ti.tle bar png or layout file. There doesn't seem to be a definitive title bar png
I'm also experimenting with apk multitool.
Since it's a stock rom app, is this venture going to be a lot more complicated than editing an xml line and then recompiling?
Here's where I'm at. Everything I know about android programming I've learned tonight, so this may be confusing and stupid sounding:
The decompiled apk has several things which could refer to the title bar.
dimens.xml has lines like
<dimen name="global_title_height">35.0dip</dimen>
<dimen name="editing_panel_header_height">56.0px</dimen>
<dimen name="editing_panel_header_margin">47.0px</dimen>
<dimen name="editing_panel_no_footer_header_margin">35.0px</dimen>
However there are also thousands of header and title lines from other xmls.
Can I just use a theme line in the manifest?
It uses the ActPDFReaderTheme whose parent is the HtcActionBar.FullScreen from the com.htc.resources.apk
These link to the common_mainnav xmls and pngs in the resources.
Do I need to find an HTC theme from the com.htc.resources.apk that doesn't have a title bar? Could I edit the com.htc.resources.apk and edit the pngs or delete the referencing lines in the styles.xml?
Thanks. I'll keep digging.
And btw, the bounty's still out if anyone can do it faster. I don't have much free time.
I think I've got this. I'm real close
I figured out how to decompile, edit xmls, recompile, copy original meta-infs and androidmanifest, and adb push.
The dimens.xml in the viewer apk has no effect on the bar. It's a standard template htcactionbar.fullscreen
I could direct the apk to a new theme, but I've decided just to try deleting or shrinking the bar from the com resources apk.
Good luck! Remember the apk you push back must be a signed one, probably via hacking the modified xml files back into the original signed apk.
Now I've run into a snag.
No matter how many margin and layout dimension variables in the com resource I set to 1.0px, I still have a black bar above the pdf.
Then I tried changing the theme reference in the pdfviewer.apk. It loads the file picker without an action bar, but as soon as I click a file it crashes. It seems (I think) that the program has too many calls for the action bar. I'm not a programmer. Do you know how I can get the program to simply ignore any lines referencing the "actionbar"?
Lines such as: "invoke-virtual {v3}, Lcom/htc/pdfviewer/ActPDFReader;->getActionBarHeight()I"
I also tried <item name="android:windowNoTitle">true</item> after the theme and I have the same effect of no title bar but a forceclose after selecting a file
Could you post the entirety of the relevant xml layout file?
porcupineadvocate said:
Could you post the entirety of the relevant xml layout file?
Click to expand...
Click to collapse
Unfortunately there is no simple relevant layout file. I can't go any further with this project because I don't know programming. Here's my progress if anyone would like to give it a shot:
In the decompiled HTCPDFViewer is a \res\values\styles.xml
There is the line:
<style name="ActPDFReaderTheme" parent="@com.htc:style/HtcActionBar.FullScreen">
This tells the program to use the HTCactionbar.fullscreen template style in com.htc.resources.apk
Now there are two paths to take from here:
1) Changing the style template to @android:style/Theme.NoTitleBar.Fullscreen
or adding the requestWindowFeature(Window.FEATURE_NO_TITLE) line
Issue: This causes the file picker to load without a title fine, but as soon as a pdf loads, the program crashes.
How far I got: I simply deleted 2 lines referring to the actionbar in the PdfLoadingPage$LOADING_PAGE_Handler.smali and the pdf loads. However there is a now a black empty bar on the bottom, and any pen writing is being moved upwards.
I suspect this is because of the ActionBarMenuAdapter.smali that controls how the pen annotations are moved in relation to the actionbar. There are also 100 more lines referring the actionbar in the other smalis. You can find them all by searching the apk for "actionbar". A proper programmer could remove these lines, or more easily make every m_iActionBarHeight:I line refer to zero.
If someone can fix the programming, I suspect that this would also solve the hidden HC bar issue, allowing true fullscreen support!
2) Editing the com.htc.resources.apk
The styles.xml in this file has a NoTitleBar.Fullscreen theme that redirects to other xmls redirecting to different layout files and pngs.
I've looked through every dimens.xml and other xmls that may be even loosely linked to the actionbar. I even tried haphazardly changing every possibly connected dimension to 1.0px.
I then tried shrinking all of the related PNGs to 1x1 pixel.
The end result was just a funking looking grey and black bar at the top.
I have no idea where to find the dimensions controlling the size of the actionbar.
Thanks for any help! Warning: Recovery backup before pushing a new com.htc apk, if you don't do it correctly, things can get messy with the OS.
porcupineadvocate said:
Could you post the entirety of the relevant xml layout file?
Click to expand...
Click to collapse
Ok I may have lied. There are one or two files I wasn't sure about.
These are from the xmls in layout folders of com.htc apk.
Can you take a look and see if there are simple line(s) to change here? notepad++ is great.
I already attempted to edit all of the dimens.xml dimensions. I can't remember if I got all of the dimensions in these files too.
The bar seems to be about 56 pixels. I gathered that from reduced editing view dimensions but I could be wrong.
Not that it is a big deal for a minor issue like this in a low traffic forum like EVO View but "bounty threads" are strictly prohibited by xda.
I doubt the mods will hassle you since this isn't a heavily travelled thread but they might shut you down at any second. Good idea to get some PM's going with anyone who is helping you.
Good luck.
Sent from my PG41200 using Tapatalk
Post the decompiled HTPDFViewer, please. I particularly want to see the contents of res/layout/*.xml files.
As a tip, don't delete any elements; just resize them to zero height/width if possible. Deleting will cause crashes when the program tries to reference them.
porcupineadvocate said:
Post the decompiled HTPDFViewer, please. I particularly want to see the contents of res/layout/*.xml files.
As a tip, don't delete any elements; just resize them to zero height/width if possible. Deleting will cause crashes when the program tries to reference them.
Click to expand...
Click to collapse
Here it is.
Woops I didn't realize bounties were prohibited, especially with so many developers asking for "donations"
Delete this if you'd like. I didn't mean to break the rules.
Donations and bounties are different. Donations are thanks for work done, bounties are offer of compensation to do work. If they allowed bounty threads xda would be overrun with them.
No big deal. I doubt the mods even visit this thread. Just wanted to give you heads up to establish pm conversations in case they did
Sent from my PG41200 using Tapatalk
No progress since my last update on the programming front. However I have been playing with the lcd density changer.
Setting it to 170 from 160 and enabling the GB like bar on top has interesting results. The pdfviewer only edits properly when I use Honeyhide or Honeybar. So we know that disabling the notification bar and having a working pdfviewer is possible.
However, I found I have the best pdf editing real estate when I set the lcd density to very low, like 120. In fact, not only are the title and HC bars smaller, but the pen seems to be more accurate too!
Maybe this information will help with our goal.
EDIT: at 120 and below, the scribe color wheel pops up on the wrong side. Still works though. Other tablet functions are much slower and there's some screen corruption too. It's not a permanent solution, but works for annotating pdfs.

9.PNG Info Guide.. Crash course..

Here is a quick method well a crash course on 9.png edits.. Seen a few but some seem to be confusing for others... Figured I would snag a shot at it..
Pretty simple..
You just need to have apktool on hand.. Once you have that.. You will need to take your framework-res apk and your com.htc.resources.apk. Place a copy of them in the same folder you extracted apktool to.. Also take whatever apk you wanna decompile and throw it in..
1. Open a CMD window to apktool.. Hold shift on the folder apktool is in and right click on it say open cmd..
Easy..
2. Apktool if framework-res.apk
3. Apktool if com.htc.resources.apk
4. Apktool d rosie.apk ^just a random one for the guide.
K you always need to decompile to edit a 9.png file..
They are easy if your just changing color... You can use drawpatch9 in your SDK folder to edit or just check out to make sure nothing spilled over on the black dots while you were playing with things..
Use Gimp since it's free to do photo edits. Now look through the decompiled apk you have.. You will see alot of png files.. You can playaround and edit whatever you wish.. But the main part of decompiling is to edit the 9.png.
^Right click on the 9.png you wanna edit select edit...^
1.Zoom in on it...
2. You see the black outline or dots on the border of the png.. Top. Right and Left side.. Bottom..
3. Do not color those.. Don't spill anything over on to it.. Make your color edit but stay within the border of those black dots/ lines.. Pretty easy to see.. Pretty much never go over onto the black................. You will get some fugly looks later if you do...
4. When done save it..
Just go all the way back to apktool open a cmd window..
apktool b rosie or whateverapk you decompiled. Rosie is just being used for a exp...
Once it's done you may need to sign it probably will Going more towards yes on this or use the orignal sig.. Then you can throw it into your rom you want it in..
If you wanna keep orignal sig
Snag the res folder,class.dex,resources.arc from the apk you just built and throw em into the orignal apk. Leave the android manifest alone ...
​ Anyways if someone has a question feel free to let me know ... Have fun........
Apktool is also used for other things Like to decompile to edit xml or smali and stuff but this is a guide just for 9.png
Top and left borders mark where the image gets stretched while right and bottom show where content goes.
The draw 9 patch tool is great in identifying errors or mistakes so use it wisely.
Sent from my PG86100 using Tapatalk
thesparky007 said:
Top and left borders mark where the image gets stretched while right and bottom show where content goes.
The draw 9 patch tool is great in identifying errors or mistakes so use it wisely.
Sent from my PG86100 using Tapatalk
Click to expand...
Click to collapse
Ya I toyed with it Figured it would help some folks out.. For simple color edits..
But if you do spill over it looks like crude... Apktool is sweeeeeeeeeeeeet to

Theming LGG3 Apps - Pure Black Settings - for MM stock

I have been theming apps on my phone to give them black backgrounds. The white backgrounds bother my eyes. I'm doing pretty well but I am having a big problem with the LGSettings.apk. I have decompiled the apk and edited the colors.xml, styles.xml and parts of the manifest that i thought might change the theme. I then recompile and run the settings app but I never see any changes. I am trying to figure out what I need to edit to achieve white text on a black background. Any help would be greatly appreciated.
I don't have the apks in front of me, but you may need to theme more than that one. I think you'll need:
LGSettings (which you currently themed)
Possibly: LGSettingsAccessibility/LGSettingsProvider
These two may or may not have anything to theme in them, so you may need to decompile to take a look.
Ok. I'm getting there. The background item and textcolor item were lurking in the lge-res.apk. I am still having trouble finding a way to change the blue action bar color (1) and the color of the white section headers (2). Anybody know what these might be called and what apk I need to look in? Thanks a lot!
skyman88882002 said:
Ok. I'm getting there. The background item and textcolor item were lurking in the lge-res.apk. I am still having trouble finding a way to change the blue action bar color (1) and the color of the white section headers (2). Anybody know what these might be called and what apk I need to look in? Thanks a lot!
Click to expand...
Click to collapse
Ok. I found the action bar - I used 'Widget.Material.ActionBar.Solid' to hard code the background color. Now I just need somebody to help me find those white section headers. Anybody? Thanks so much!
Well after two hours of poking around the apks I finally figured it out. Pretty easy to make all the changes in lge-res.apk. pm me if interested in doing this kind of theming
skyman88882002 said:
Well after two hours of poking around the apks I finally figured it out. Pretty easy to make all the changes in lge-res.apk. pm me if interested in doing this kind of theming
Click to expand...
Click to collapse
Awesome, great work!
I remember doing something similar when I was doing this to my Galaxy S3, trying to find the various apk's where Sammy had changed things. It was a great feeling to find and change things.
skyman88882002 said:
Well after two hours of poking around the apks I finally figured it out. Pretty easy to make all the changes in lge-res.apk. pm me if interested in doing this kind of theming
Click to expand...
Click to collapse
HI THERE, I WAS WONDERING IF YOU CAN SHARE THOSE APS's, COUULD YOU MAKE IT POSSIBLE?
elmanolette said:
HI THERE, I WAS WONDERING IF YOU CAN SHARE THOSE APS's, COUULD YOU MAKE IT POSSIBLE?
Click to expand...
Click to collapse
Hi. Please in the future don't use all capital letters. I know you didn't mean this in this case, but it's generally considered "shouting", and for longer strings it makes it harder to read. Thanks for understanding.
roirraW "edor" ehT said:
Hi. Please in the future don't use all capital letters. I know you didn't mean this in this case, but it's generally considered "shouting", and for longer strings it makes it harder to read. Thanks for understanding.
Click to expand...
Click to collapse
sorry man, i'm understand!
I definitely intend to share my findings. However right now i am redoing the theming trying to push all the edits into LGsettings. Since I did the editing in the lge-res.apk it has a lot of unintended consequences on other parts of the system
subscribed.
i despise white backgrounds.
Brian
i cant find any color.xml in any stock apps?
skyman88882002 said:
I have been theming apps on my phone to give them black backgrounds. The white backgrounds bother my eyes. I'm doing pretty well but I am having a big problem with the LGSettings.apk. I have decompiled the apk and edited the colors.xml, styles.xml and parts of the manifest that i thought might change the theme. I then recompile and run the settings app but I never see any changes. I am trying to figure out what I need to edit to achieve white text on a black background. Any help would be greatly appreciated.
Click to expand...
Click to collapse
how do you theme? i can never find the color.xml file in any stock app?
Glitch15 said:
how do you theme? i can never find the color.xml file in any stock app?
Click to expand...
Click to collapse
You need a deodexed ROM/apk file to decompile to find those resources.
RMarkwald said:
You need a deodexed ROM/apk file to decompile to find those resources.
Click to expand...
Click to collapse
my Rom is deodex, can you pm me a step by step guide to get to the color.xml?
it would be nice if you can post a brief guide about theming it.. so people can have benefit.
knowledge is meant to share after all
minhas729 said:
it would be nice if you can post a brief guide about theming it.. so people can have benefit.
knowledge is meant to share after all
Click to expand...
Click to collapse
Hey there! Good to see you on this thread Minhas729. I'm really sorry for the delay, I have just been slammed on the home front and haven't had time to play around with this stuff.
I'm still not happy with the theming I'm doing but I plan on posting my work in process files in the next 5 or 6 days.
In the meantime, let me share my knowledge (it isn't much!)
I think I am going to change the thread title to Theming for Dummies (Like Me) (anybody know how to change a thread title?). so step one will be in the next post.....
OVERVIEW
(Ok - so here is a quick overview of the theming process as I do it. Again, I am just a novice and I just stumble around so if I get the terms incorrect forgive me.
1) The first step in theming an apk is to decompile the apk. Unzipping the apk is not going to work. This is because there are special files like styles.xml and colors.xml that are hidden in a 'values' folder in the res directory. As far as I know, you cannot access these special files by simply unzipping the apk.
2) To decompile you need an apk tool - I use 'Tickle My Android' (I'm going to call it TMA going forward) - it has a great developer with excellent instructions. The way decompiling works is you first have to create a mini-work area on your computer. You do this by decompiling and installing the framework-res and lge-res apks from your phone to your computer. TMA needs these files to decompile other apps because most apps reference a bunch of things in the framework-res and lge-res files Installing TMA is pretty easy and the instructions on the thread are excellent. The only issue I had was finding a good version of apktool.jar to use in conjunction with TMA - one that worked well with marshmallow apks. The apktool is the actual tool that does all the work - TMA (in my understanding) is simply a very well designed user interface to use the apktool. So you need an apktool that will recognize marshmallow files and be able to decompile them. I use "apktool_2.1.0-a64a03-SNAPSHOT"" as my apktool.jar file.
3) Once an apk is decompiled, all the apk components will be saved in a 'working' folder. You can then go in and edit colors and and styles using an xml editor.
4) Once you have made your edits you use TMA to recompile and sign the apk. Then you move the file back to your phone, place it in the proper device directory, fix permissions, reboot and cross your fingers.
Ok - that is the overview - go off and start trying it. One suggestion - dont try to push files from the phone to the pc with TMA - just use your usb cable.
more to come...
skyman88882002 said:
I think I am going to change the thread title to Theming for Dummies (Like Me) (anybody know how to change a thread title?). so step one will be in the next post.....
Click to expand...
Click to collapse
Edit your first post in a web browser. Choose Advanced mode and there'll be a field to edit the title.
Below are links to download the themed lge-res.apk and lgsettings.apk. MAKE A BACKUP FIRST (I'm not responsible for anything that goes wrong if you try these files). Once downloaded you will need to use a root browser to copy the files to the appropriate system directory and to change the permissions. Keep in mind, this is a work in process, if you enter settings and click on the bluetooth or wifi sections you will notice that the background is not themed yet. I'll repost when these are fixed.
lge-res.apk download link
LGSettings.apk download link
Keep in mind that you have to install both files if you want the full black background.
Ok. I think I worked out most of the bugs. The files are now set up in a flashable zip. Test it out and let me know if you see any issues. If it is working well I will start a new thread in the Themes section and work on the systemui as well. Thanks. Download link below:
download

Categories

Resources