mapaglaruan nga to mamaya pag gumana na apktools ko :D A - TopicsExpress



          

mapaglaruan nga to mamaya pag gumana na apktools ko :D A Beginners guide to theming your MMS app written by killabyte Please dont post this on other forums. Ive put a lot of time into this and I like rootz and want to support it. If you want to link back to it thats great but please dont copy and paste my work. This guide assumes you understand the why and how of decompiling your apk. If you do not, then skip to page 4 and theres a quick and dirty how-to that should be sufficient to get you ready for this. A few months ago I decided I wanted to look into theming my MMS app. There were already some out there but I wanted to learn how to do it. I made as many notes as I could and now I have cobbled them all together into a hopefully readable enough form to help others who want to help themselves. I feel like for someone wanting to get their feet wet this is a good place to start and can help a beginner to get a better understanding of how some of the code in these xml files work. Ive noticed a trend on most forums where the question will be how to do something and there will normally be a bunch of irrelevant posts to use this app, try this tool, run this rom or google it. Google doesnt always have the answer and sometimes you might want to know how to do something instead of relying on someone or something else to do it for you. Before we start I would like to point out that I was learning as I went along doing this. Most of this I did by editing each xml a few lines at a time, building, and then running the apk to see what had changed, making a note of what I did, and then moving on to the next interesting part. Not all of the information in this will be 100% accurate but I have tried to educate myself as much as I could before posting this info. In some parts there will be multiple and maybe even better ways to do some things. For instance there are multiple ways to color your conversation time stamps. It mostly depends on what you want to do. I dont think theres really a right or wrong way. Tools/resources Photoshop - my preference for editing images adobe...oduct=photoshop Gimp - free and comparable to photoshop gimp.org/downloads/ notepad++ - also free and a must have for xml editing notepad-plus-plus.org/ adb or whatever file manager you prefer to get the file on and off your phone. Youll be editing your colors using hex code. I could explain it but id rather provide this link. Read it, its not that long: htmlgoodi...Explanation.htm Well be working with 8 characters in our color codes. The first 2 represent the alpha channel which means they control transparency with 00 being transparent and ff being opaque. You can play around with those for more control over your color but make sure you read the link above and understand how to count in hex. For editing text color I used this instead of flipping back and forth with Photoshop: colorcomb...ombotester.html Just pop up the palette and select a color and the code for it is right before your eyes in a simple web interface. These links will also be helpful - Bucky over at thenewboston.org has a wealth of information; of particular use is this video: thenewboston....?cat=6&number=6 I would advise watching at least the next 3 after that as it will greatly help you with xml editing. These links will also help you better understand what were doing. Theyre not 100% beginner friendly but they are readable and you should be able to at least glean some useful info from them: developer.and.../ui/themes.html developer.and...t-resource.html developer.and...rces.html#Color A good explanation on Styles/themes brainflush.wo...mes-and-styles/ BEGIN GUIDE - /res/drawable/listitem_background Lets start out by editing our background. Open up listitem_background.xml in your /drawable dir. Look at the end of line 6 and youll see android:drawable=@android:color/white If you just want black, then change white to black. If you want more variety, read on. TMI Warning - if you just want black and dont care for how this works then skip over this to the next part. Setting your color here will change the background color for both sender and recipient on your messages. It can also be controlled individually using the message_list_item_recv and message_list_item_send files in your /layout dir. Its useful to change it there if you wanted each to have a seperate shade of color but I dont recommend changing it there. Ill explain why later when we get to that part. So what if you dont want white or black? Not a problem - well just declare (fancy java term for make) our own colors. Heres how: Take a look in your colors.xml in your /values dir. First thing of interest you see is text_hairline and a hex color code beside it. Whats happening here is that text_hairline is being declared as a color and that color is made up by that hex code - its a grayish color. text_hairline is your time stamp on your messages. Now I dont know where in the code its written that text_hairline = time stamp but I do know this where we change the color of it. The point here is that text_hairline is declared as a color. So for an example if you wanted to change your white background to the same color as your time stamp (text_hairline) you would change: android:drawable=@android:color/white to android:drawable=@color/text_hairline and change it from Indexed to RGB. I dont know why but I have to change this mode and save with Gimp before I can edit in Photoshop. If I open with Photoshop and change the mode it just looks like garbage. I dont know the proper way to fix this yet - so if youre a Photoshop user this information may be useful to you. The image were working with in this example is not transparent and does not need to have the mode changed since it is already RGB. The next thing we want is to click colors and then hue-saturation and adjust the sliders. This is a pretty simple way of adjusting the color but it doesnt allow you to set specific colors using hex code. Im sure its possible but as I mentioned Im not really a Gimp user so thats as far as I can take you. Now well switch over to Photoshop and ill explain briefly how to change it there. Photoshop In Photoshop lets open that same image and click Image --> Adjustments --> Replace Color. Basically you can play around however you like here but if you wanted to cut to the chase and change it to ICS Blue we would take the dropper tool that is automatically selected and click somewhere around the middle of the image. Youre selecting the color you want this tool to change, so click where its bright green up around what would be the forehead. Now at the bottom part of this window where you have the result color swatch, click it to bring up the palette. At the bottom here youll have our good friend mr hex code so we can specify the color we want - ICS Blue is 33b5e5. Click on OK and youll see we have some left over green hue which looks awful. Slide the fuzziness slider over to the right and it should take care of most of it. If you think you still see some more areas with green then click the + eye dropper tool near the top of the window. This will add that color to the replacement palette so it will be switched over as well - and thats how I switch my colors. Thanks to alatedseraph for putting me on the right track to that. As for coloring the transparent icons I pretty much do it the same way with one rather pathetic exception. Ive not taken the time to learn how to do it properly in Photoshop or Gimp so what I did was go to fotoflexer and colored them there. Sad, I know - its probably an easy fix but I have spent way too much time on this so I cut a few corners. The quick and dirty of it is this - you upload your image, click the geek tab then the smart recolor button. Theres a nifty demo video that explains the whole thing for you from there. For these transparent pngs you will have to select solid color under the type to get the color to change and from there you can go back to Gimp or Photoshop and dial in a better color or work on some gradient effects if thats your thing. A few things I want to point out - I have read to not sign system apks and to sign system apks. I cant seem to figure out whos right. I can tell you from experience that my recompiled mms.apk would not work (didnt show up in app drawer) until I signed it. Same for when I made changes to my SystemUI. I think maybe some people confuse decompiling it with simple image replacement using 7zip. When you edit certain layouts, the style/theme that is applied to it is overridden by the edits. I think I mentioned this earlier but just in case. Some people like for their conversations to line up on either the right or left side of the screen. I prefer the criss cross method so I didnt look into changing it. Pretty sure some of the padding values in the message_list_item_send and_recv control that. It would be easy enough to find a themed mms that does that and take a look at its layout to see how its done. If theres any interest I have some more info I didnt type out, like changing the color of the text on the delete dialog box and some other things I figured out but felt werent that relevant or was redundant.
Posted on: Thu, 07 Nov 2013 10:21:54 +0000

Trending Topics



Recently Viewed Topics




© 2015