Related
I am trying to make my own ADW theme. Everything is set up correctly and I'm using Eclipse.
The problem I have is that I don't know how I should edit the xmls in /res/drawable without getting force close in Emulator when trying it out.
i.e. I edit home_arrows_left.xml from:
Code:
<?xml version="1.0" encoding="utf-8"?><level-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:maxLevel="0" android:drawable="@drawable/dot_big" />
<item android:maxLevel="1" android:drawable="@drawable/dot_big" />
<item android:maxLevel="2" android:drawable="@drawable/dot_big" />
<item android:maxLevel="3" android:drawable="@drawable/dot_big" />
<item android:maxLevel="4" android:drawable="@drawable/dot_big" />
<item android:maxLevel="5" android:drawable="@drawable/dot_big" />
<item android:maxLevel="6" android:drawable="@drawable/dot_big" />
</level-list>
to:
Code:
<?xml version="1.0" encoding="utf-8"?>
<level-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:maxLevel="0">dot</item>
<item android:maxLevel="1">dot</item>
<item android:maxLevel="2">dot</item>
<item android:maxLevel="3">dot</item>
<item android:maxLevel="4">dot</item>
<item android:maxLevel="5">dot</item>
<item android:maxLevel="6">dot</item>
</level-list>
And I create a file in drawable called dot.png
If I export+install with adb and select as ADW theme in emulator I get ADW force close when pressing home button.
I'm not a pro with XML but I could spend some time to learn more if someone just tells me what I need to know to create ADW themes.
Maybe I could use some tool to validate the XML?
The only problem I have is to edit the XML in the right way.
Zalastax said:
I am trying to make my own ADW theme. Everything is set up correctly and I'm using Eclipse.
The problem I have is that I don't know how I should edit the xmls in /res/drawable without getting force close in Emulator when trying it out.
i.e. I edit home_arrows_left.xml from:
Code:
<?xml version="1.0" encoding="utf-8"?><level-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:maxLevel="0" android:drawable="@drawable/dot_big" />
<item android:maxLevel="1" android:drawable="@drawable/dot_big" />
<item android:maxLevel="2" android:drawable="@drawable/dot_big" />
<item android:maxLevel="3" android:drawable="@drawable/dot_big" />
<item android:maxLevel="4" android:drawable="@drawable/dot_big" />
<item android:maxLevel="5" android:drawable="@drawable/dot_big" />
<item android:maxLevel="6" android:drawable="@drawable/dot_big" />
</level-list>
to:
Code:
<?xml version="1.0" encoding="utf-8"?>
<level-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:maxLevel="0">dot</item>
<item android:maxLevel="1">dot</item>
<item android:maxLevel="2">dot</item>
<item android:maxLevel="3">dot</item>
<item android:maxLevel="4">dot</item>
<item android:maxLevel="5">dot</item>
<item android:maxLevel="6">dot</item>
</level-list>
And I create a file in drawable called dot.png
If I export+install with adb and select as ADW theme in emulator I get ADW force close when pressing home button.
I'm not a pro with XML but I could spend some time to learn more if someone just tells me what I need to know to create ADW themes.
Maybe I could use some tool to validate the XML?
The only problem I have is to edit the XML in the right way.
Click to expand...
Click to collapse
Just change all of the
Code:
android:drawable="@drawable/dot_big"
to
Code:
android:drawable="@drawable/dot"
And create a dot.png
Thank you for the help!
I have one more question.
How do I refer to images in drawable-hdpi/drawable-mdpi/drawable-ldpi depending on if they are hdpi/mdpi/ldpi?
I have tried to open some APK's but you can't see what's written in the XML files. Maybe someone could contribute with the source of an ADWTheme that have different images based on dpi?
You have to decompile an APK in order to view XML files as plain text. I suggest apkmanager 4.8 (I tried 4.9 and it wasn't compiling apks right for me.)
Once extracted, the tool will allow you to extract the contents of .apk's, and decompile them so you can edit the xml files. You will have to recompile and sign the .apk file once you decompile and edit it.
I extracted an apk from my device and turned it into a zip. I have viewed some XML's via AXMLPrinter2.jar but If I look what's written in android:drawable it says android:drawable="@7F020007". Thats not a path or a file so when it compiles the path changes. I shall see if the same thing happens with the program you told me about tomorrow.
Do you need to make different images for different dpi levels?
This is a mod I put together to animate the dock background in Launcher Pro.
I am not responsible for any damage you may do to your device/important data by following the instructions in this thread. Always back up all your important data before modding/flashing anything on your device.
If you like my work, please press the "Thanks" button and/or consider donating to me.
A few notes:
-(UPDATE) I changed the instructions to include implementing the mod in landscape mode.
-I didn't put a whole lot of effort into the actual animation seen below. I put it together just as an example for the mod. If you like it, sweet, but I figured people are gonna want to make their own to fit their needs. I'll also be making some more polished animations and posting them here as they are completed.
- If you make your own animation and would like to share it, PM me or post it in this thread and I will add it to the O.P with credit to the creator.
-To enable the animation, switch to Launcher Pro after installation and go to: menu-> preferences-> appearance settings-> dock background-> select "Froyo", or whatever name you changed it to during the mod.
-The animation will not play the first time it loads! From the Laucher Pro home screen: press the "Home" soft key to bring up the screen preview window, then press "Back" and the animation should start playing.
-Right now, this is only for Launcher Pro. I am trying to get this working on Go Launcher Ex and ADW Launcher as well. I will update the O.P as progress is made.
-"Adb install" will not work. Flash the modded apk through CWR to install it.
-This is compatible with Launcher Pro Plus. However, this will not unlock Launcher Pro Plus widgets. You gotta pay to get those.
-I tested this on my Captivate without any performance issues, but it runs even better on dual core devices. The lag/choppiness in the video preview is from the low framerate of Shootme's screen caster function.
Start with a clean, unmodded copy of Launcher Pro. Download it from the market if you don't have it already, and use "adb pull" to extract it. The LP apk attached below is a heavily themed version from my Dark Fire Blue theme- feel free to use it if you don't mind the additional themeing and the demo animation, or to use it as a template when applying the mod to the stock apk.
1. Decompile the apk using Apk Manager (or your preffered method.)
Go to: projects\com.fede.launcher-1.apk\res\drawable-port-hdpi
Add all of your dock animation images to this folder. Name the images "dock_animationX" with X being the image number- 0,1,2,3 ect. Save them as .png files.
So far, I've gone up to 20 images (0-19) and have not noticed any additional lag, so you can probably use more than that if you want. I would suggest optimizing the images to reduce the file size.
2. Go to: projects\com.fede.launcher-1.apk\res\drawable-port\dock_background_froyo.xml
Change the code to this:
Code:
<?xml version="1.0" encoding="utf-8"?>
<animation-list android:oneshot="false" android:visible="false"
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:duration="75" android:drawable="@drawable/dock_animation0" />
<item android:duration="75" android:drawable="@drawable/dock_animation1" />
<item android:duration="75" android:drawable="@drawable/dock_animation2" />
<item android:duration="75" android:drawable="@drawable/dock_animation3" />
<item android:duration="75" android:drawable="@drawable/dock_animation4" />
<item android:duration="75" android:drawable="@drawable/dock_animation5" />
<item android:duration="75" android:drawable="@drawable/dock_animation6" />
<item android:duration="75" android:drawable="@drawable/dock_animation7" />
<item android:duration="75" android:drawable="@drawable/dock_animation8" />
<item android:duration="75" android:drawable="@drawable/dock_animation9" />
<item android:duration="75" android:drawable="@drawable/dock_animation10" />
<item android:duration="75" android:drawable="@drawable/dock_animation11" />
<item android:duration="75" android:drawable="@drawable/dock_animation12" />
<item android:duration="75" android:drawable="@drawable/dock_animation13" />
<item android:duration="75" android:drawable="@drawable/dock_animation14" />
<item android:duration="75" android:drawable="@drawable/dock_animation15" />
<item android:duration="75" android:drawable="@drawable/dock_animation16" />
<item android:duration="75" android:drawable="@drawable/dock_animation17" />
<item android:duration="75" android:drawable="@drawable/dock_animation18" />
<item android:duration="75" android:drawable="@drawable/dock_animation19" />
</animation-list>
Adjust the android:duration="XX" value to change the speed of the animation. If you have more than 20 images, keep adding lines in sequential order to accommodate all of your animation images. If you have fewer than 20, delete the excess lines. Close and save the file.
3. (Optional) The next two steps are for applying the dock animation mod in landscape mode. If you don't care about that, skip to step 5.
Copy all of your dock animation images to a new folder on your desktop. Open them in photoshop, gimp, ect. and rotate each image 90 degrees counter clockwise. Save and close.
Rename all of the new vertical images to: vdock_animationXX (again, XX being your image number).
Go to: projects\com.fede.launcher-1.apk\res\drawable-land-hdpi
Add all of your vertical dock animation images to this folder.
4. Go to: projects\com.fede.launcher-1.apk\res\drawable-land\dock_background_froyo.xml
Change the code to this:
Code:
<?xml version="1.0" encoding="utf-8"?>
<animation-list android:gravity="fill_vertical|right|center" android:oneshot="false" android:visible="false"
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:duration="75" android:drawable="@drawable/vdock_animation0" />
<item android:duration="75" android:drawable="@drawable/vdock_animation1" />
<item android:duration="75" android:drawable="@drawable/vdock_animation2" />
<item android:duration="75" android:drawable="@drawable/vdock_animation3" />
<item android:duration="75" android:drawable="@drawable/vdock_animation4" />
<item android:duration="75" android:drawable="@drawable/vdock_animation5" />
<item android:duration="75" android:drawable="@drawable/vdock_animation6" />
<item android:duration="75" android:drawable="@drawable/vdock_animation7" />
<item android:duration="75" android:drawable="@drawable/vdock_animation8" />
<item android:duration="75" android:drawable="@drawable/vdock_animation9" />
<item android:duration="75" android:drawable="@drawable/vdock_animation10" />
<item android:duration="75" android:drawable="@drawable/vdock_animation11" />
<item android:duration="75" android:drawable="@drawable/vdock_animation12" />
<item android:duration="75" android:drawable="@drawable/vdock_animation13" />
<item android:duration="75" android:drawable="@drawable/vdock_animation14" />
<item android:duration="75" android:drawable="@drawable/vdock_animation15" />
<item android:duration="75" android:drawable="@drawable/vdock_animation16" />
<item android:duration="75" android:drawable="@drawable/vdock_animation17" />
<item android:duration="75" android:drawable="@drawable/vdock_animation18" />
<item android:duration="75" android:drawable="@drawable/vdock_animation19" />
</animation-list>
This xml should be exactly the same as the drawable-port\dock_background_froyo.xml, just with the addition of the android:gravity="fill_vertical|right|center" code in line #2, and the vdock file names. Save and close.
5. (Optional) This will change the text string in the settings menu to a different name for your new animated dock background. It is totally unnecessary for the mod to work, but it does make it look more official.
Go to: projects\com.fede.launcher-1.apk\res\values\arrays.xml
Look for this code:
Code:
<string-array name="dock_background_entries">
<item>None</item>
<item>Custom</item>
<item>Glass</item>
[COLOR="Red"]<item>Froyo</item>[/COLOR]
<item>Froyo wide</item>
</string-array>
Change "Froyo" to whatever name you want- in the video above I changed the name to Blue Orbs. Save the changes and close this file. The mods are now finished.
6. Recompile the apk.
When you get prompted with: "Is this a system apk?" choose Yes. "Keep unmodified files?" choose Yes. When prompted, navigate to the keep folder and delete: the ENTIRE "res" folder and the "resources.arsc" file. Return to the Apk Manager script and finish compiling the apk. If you get an error, double check all of your file names for the images and xmls and make sure they are consistent.
7. Rename the modded, reccompiled apk to: com.fede.launcher-1.apk.
DO NOT RESIGN THE APK!! Resigning it will break compatibility with Frederico's keys and the LPP Unlocker app from the market will not work.
8. Add the apk to a CWM flashable file, flash it, and enjoy.
If you like my work, please press the "Thanks" button and/or consider donating to me.
Downloads:
Themed Launcher Pro Apk w/ Blue Orb Dock Animation
CWM Flashable Animated Dock Launcher Pro (Install script may not work for all devices/recoveries.)
Reserved for Future Use.
One more just in case.
Interesting....
Getting ready to try out the latest Mosaic so I just downloaded this. Thanks 10ton!
I love this idea, can't wait to see if it'll work with Go launcher, you rock 10ton!
Sent from my smooth awesome MOSAIC powered Captivate on the XDA app.
Hmmm. Looks quite interesting.
Sent from my BlackICE(d out) Inspire!!!
awesome idea! my first animated dock came out great, except when i turn my tab to landscape it gets replaced by the froyo dock... deleted the froyo dock we replaced and my animated dock was visible in landscape for a second longer before changing again to the froyo dock...
i'm sure it'll get squared away.
thanx 4 ur work.
Awsome find will be trying this soon thanks!
tazman171 said:
Getting ready to try out the latest Mosaic so I just downloaded this. Thanks 10ton!
Click to expand...
Click to collapse
No problem. Good to hear from you again!
10tonhammr said:
No problem. Good to hear from you again!
Click to expand...
Click to collapse
Always follow your work even if I keep mum!
Actually, been really busy with college so I haven't had much time for the fun stuff.
Great work all around BTW!
towenk3 said:
awesome idea! my first animated dock came out great, except when i turn my tab to landscape it gets replaced by the froyo dock... deleted the froyo dock we replaced and my animated dock was visible in landscape for a second longer before changing again to the froyo dock...
i'm sure it'll get squared away.
thanx 4 ur work.
Click to expand...
Click to collapse
The O.P instructions have been updated to include landscape mode implementation.
Damn im gonna have to go back to lp lol awesome mod bro
Sent from my DROID X2 using xda premium
Ok just had a good idea for a dock, the bar animation from the miui music app unfortunately I don't have a pc at the moment so I can't make it
Sent from my DROID X2 using xda premium
Great Job!!!
Thanks for getting this done! I knew if I asked the right person they would be able to do it! You are awesome! I'm gonna play around with it now for a while and will post some of my creations later... Thanks again!
You are a god
help
I keep getting an error message when I try to open the dock_background_froyo xml file to edit it.... am I missing something? I can't open it in anything.
stevebic83 said:
I keep getting an error message when I try to open the dock_background_froyo xml file to edit it.... am I missing something? I can't open it in anything.
Click to expand...
Click to collapse
You've decompiled the apk, and trying to open that xml isn't working? That's weird. Try deleting the decompiled apk from the projects folder, and decompile it again.
ok I got it working. so I'm pretty much done... just need to know how I slip this into a CWM flashable file..
stevebic83 said:
ok I got it working. so I'm pretty much done... just need to know how I slip this into a CWM flashable file..
Click to expand...
Click to collapse
Go to my O.P in this thread. Download the CWM file at the bottom. Open the archive, open the system folder. Open the app folder. Add your "com.fede.launcher-1.apk" to the archive. It will overwrite mine. Then flash!
Hi.. i wanna change my Volume Progress Bar. and i figure out that the "progress_horizontal.xml" is the file needed to be edit, but i don't know how. i wanna make mine look like the ICS just a thin Line. but i want a different color a white one. but i don't know how to change the color and how to make the thick yellow progres bar to a thin white line............
by the way im using GinggerYoshi...
any help? Thanks in Advance!
Have a look a t the sources / resources of ICS (framework/base), there you can find what you need to modify the progress / seek layout.
If you have the sources of GingerYoshi (which I do not expect ) then you can edit the xml files with an editor, change the required images and rebuild.
If you don't have the sources you will need first to decompile framework_res.apk (for example by using apktool), before you can edit the xml. After that you need to re-compile everything. *But* it's not guaranteed, that this will always work ...
For changing the color of the progress bar images, you need to use draw9patch tool, because they are .9.png.
B.t.w. I suggest you to have a look at G1 Themes and Wallpapers or Arrow
[GUIDE] Want to learn how to theme?
AndDiSa said:
Have a look a t the sources / resources of ICS (framework/base), there you can find what you need to modify the progress / seek layout.
If you have the sources of GingerYoshi (which I do not expect ) then you can edit the xml files with an editor, change the required images and rebuild.
If you don't have the sources you will need first to decompile framework_res.apk (for example by using apktool), before you can edit the xml. After that you need to re-compile everything. *But* it's not guaranteed, that this will always work ...
For changing the color of the progress bar images, you need to use draw9patch tool, because they are .9.png.
B.t.w. I suggest you to have a look at G1 Themes and Wallpapers or Arrow
[GUIDE] Want to learn how to theme?
Click to expand...
Click to collapse
thanks for the help!, yeah i don't have the ginger yoshi sources
but i will try your advice... and that forum that you linked, thanks again!
You need to modify this areas if you wanna make it thinner "Widget.ProgressBar.Horizontal" and "Widget.SeekBar" in framework-res.apk\res\values something like this:
Code:
<style name="Widget.ProgressBar.Horizontal" parent="@style/Widget.ProgressBar">
<item name="maxHeight">5.0dip</item>
<item name="indeterminateOnly">false</item>
<item name="indeterminateDrawable">@drawable/progress_indeterminate_horizontal</item>
<item name="progressDrawable">@drawable/progress_horizontal</item>
<item name="minHeight">5.0dip</item>
</style>
<style name="Widget.SeekBar" parent="@style/Widget">
<item name="focusable">true</item>
<item name="maxHeight">5.0dip</item>
<item name="indeterminateOnly">false</item>
<item name="indeterminateDrawable">@drawable/progress_horizontal</item>
<item name="progressDrawable">@drawable/progress_horizontal</item>
<item name="minHeight">5.0dip</item>
<item name="thumb">@drawable/seek_thumb</item>
<item name="thumbOffset">8.0dip</item>
DorianX said:
You need to modify this areas if you wanna make it thinner "Widget.ProgressBar.Horizontal" and "Widget.SeekBar" in framework-res.apk\res\values something like this:
Code:
<style name="Widget.ProgressBar.Horizontal" parent="@style/Widget.ProgressBar">
<item name="maxHeight">5.0dip</item>
<item name="indeterminateOnly">false</item>
<item name="indeterminateDrawable">@drawable/progress_indeterminate_horizontal</item>
<item name="progressDrawable">@drawable/progress_horizontal</item>
<item name="minHeight">5.0dip</item>
</style>
<style name="Widget.SeekBar" parent="@style/Widget">
<item name="focusable">true</item>
<item name="maxHeight">5.0dip</item>
<item name="indeterminateOnly">false</item>
<item name="indeterminateDrawable">@drawable/progress_horizontal</item>
<item name="progressDrawable">@drawable/progress_horizontal</item>
<item name="minHeight">5.0dip</item>
<item name="thumb">@drawable/seek_thumb</item>
<item name="thumbOffset">8.0dip</item>
Click to expand...
Click to collapse
Thanks a lot.. by the way. I tried your Froyo Cream Sandwich and i'ts great.
junio07 said:
Thanks a lot.. by the way. I tried your Froyo Cream Sandwich and i'ts great.
Click to expand...
Click to collapse
and change color for have pannel white type here-> http://s15.postimg.org/ooqhsxltn/Screenshot_2014_12_27_13_55_01.png
hi, i just play around bit with apktool and try to edit some SEMC apks's-
at the moment im editing SemcAlbum.
So far its quiet clear, and with google i can search me many informations. i hav eno problem with editing Gridsize etc.
but i have some problem now. maybe someone can give me a hint.
as you can see on the pics, i was able to modify the background of the top bars and also of the main window.
one o fmy problems is, i have no idea why the darker grey part isnt same color like upper part. i try to get one color. i edited the pngs all same color, and i also edited some lines in /res/values/colors.xml and styles.xml
but im not sure, it looks like there is some shadow over the darker grey part. maybe someone has an idea what line i have to modify?
thats my colors.xml:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="online_services_background_color">#ffc1c2c1</color>
<color name="default_background_color">#ff000000</color>
<color name="background_image_color">#ffc1c2c1</color>
<color name="default_highlight_color">#ff09afed</color>
<color name="default_selected_color">#ff00ccff</color>
<color name="fullscreen_actionlayer_color">#d9000000</color>
<color name="marker_badge_text_color">#aa000000</color>
<color name="album_color_band">#fffa5f1b</color>
<color name="dashboard_info_background_color">#aa000000</color>
</resources>
the styles.xml:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme.Album" parent="@*android:style/Theme.DeviceDefault">
<item name="android:colorBackground">@color/default_background_color</item>
<item name="android:windowBackground">@color/default_background_color</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowFullscreen">true</item>
<item name="android:colorBackgroundCacheHint">@color/default_background_color</item>
<item name="android:actionBarStyle">@style/Album.ActionBar</item>
<item name="android:displayOptions"></item>
<item name="android:windowActionBarOverlay">true</item>
<item name="android:actionBarTabStyle">@style/Album.ActionBarTabStyle</item>
<item name="android:actionBarTabTextStyle">@style/Album.ActionBarTabTextStyle</item>
<item name="com.sonyericsson.uxp:directionality">leftToRight</item>
</style>
<style name="Album.ActionBar" parent="@*android:style/Widget.DeviceDefault.ActionBar.Solid">
<item name="android:background">@drawable/semc_ab_solid_dark_holo</item>
<item name="android:displayOptions">showHome</item>
<item name="android:backgroundStacked">@drawable/semc_ab_stacked_solid_dark_holo</item>
</style>
<style name="Album.TextAppearance.Small.Primary" parent="@*android:style/TextAppearance.DeviceDefault.Small">
<item name="android:textColor">#ff292929</item>
</style>
<style name="Album.TextAppearance.Small.Secondary" parent="@*android:style/TextAppearance.DeviceDefault.Small">
<item name="android:textColor">#ff292929</item>
</style>
<style name="Album.TextAppearance.ListInfo.Small" parent="@*android:style/TextAppearance.DeviceDefault.Small">
<item name="android:textColor">#ff292929</item>
</style>
<style name="Album.TextAppearance.Micro" parent="@*android:style/TextAppearance.DeviceDefault.Small">
<item name="android:textSize">12.0sp</item>
</style>
<style name="Album.TextAppearance.Micro.Secondary" parent="@style/Album.TextAppearance.Micro">
<item name="android:textColor">#ff292929</item>
</style>
<style name="Album.ActionBarTabTextStyle" parent="@*android:style/Widget.DeviceDefault.ActionBar.TabText">
<item name="android:textStyle">normal</item>
<item name="android:textColor">#ff292929</item>
<item name="android:textAllCaps">false</item>
</style>
<style name="Album.ActionBarTabStyle" parent="@*android:style/Widget.DeviceDefault.ActionBar.TabView">
<item name="android:background">@drawable/actionbar_tabselector</item>
</style>
<style name="Album.ButtonBar" parent="@*android:style/ButtonBar" />
<style name="Album.TextAppearance.DividerLabelTitleStyle" parent="@*android:style/TextAppearance.DeviceDefault.Small">
<item name="android:textSize">16.0sp</item>
<item name="android:textColor">?android:textColorPrimary</item>
</style>
<style name="Album.TextAppearance.DividerLabelItemCountStyle" parent="@*android:style/TextAppearance.DeviceDefault.Small">
<item name="android:textSize">16.0sp</item>
<item name="android:textColor">?android:textColorSecondary</item>
</style>
<style name="Album.TextAppearance.CommentsLikesCountStyle" parent="@*android:style/TextAppearance.DeviceDefault.Medium" />
</resources>
my second problem:
on the left picture you see the red marked Text, i was able to edit it, before it was a light text.
and my question about textcolor is, is it possible to edit the still white text?
i looked in the .xml files, but yet have no idea how i can fix. maybe its not possible to fix it inside SemcAlbum.apk?
Summary:
id like to modify all lighttext to darktext
id like to have all Background in one grey color (lightgrey)
maybe someone has an idea?
You'll need to find and modify the xml that calls for "ab_solid_light_holo.9" which is in framework-res.apk. That's if there is an xml calling for the image.
The colors will be controlled most likely through res/colors/ or res/styles.xml you just need to find the right value. They are probably being pulled from framework-res also.
They are probably quite easy to trace back.
Start by opening all xmls in SemcAlbum with notepad++ and search for "ab_solid_light_holo" in all opened xmls. if you dont get a hit it's probably being called through styles.
Go to styles.xml in SemcAlbum and have a read though the names and values, theyre normally self explanatory.
I'd help you more but i'm a bit busy.:good:
thanks, but i not have such lines in .xml files
lets see my steps, i edited every png/9.png same color (light grey, code c1c2c1)
i found out i have pngs with filename semc_ab_solid_dark_holo.9 > edited to c1c2c1 colorcode
thats what i see in colors.xml
Code:
<color name="online_services_background_color">#ffc1c2c1</color>
[U]<color name="default_background_color">#ffc1c2c1</color>
<color name="background_image_color">#ffc1c2c1</color>[/U]
<color name="default_highlight_color">#ff09afed</color>
<color name="default_selected_color">#ff00ccff</color>
<color name="fullscreen_actionlayer_color">#d9000000</color>
<color name="marker_badge_text_color">#aa000000</color>
<color name="album_color_band">#fffa5f1b</color>
<color name="dashboard_info_background_color">#aa000000</color>
i edited <color name="default_background_color">#ffc1c2c1</color>
<color name="background_image_color">#ffc1c2c1</color>
in my styles.xml i have this
Code:
<resources>
<style name="Theme.Album" parent="@*android:style/Theme.DeviceDefault">
[U]<item name="android:colorBackground">@color/default_background_color</item>
<item name="android:windowBackground">@color/default_background_color</item>[/U]
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowFullscreen">true</item>
<item name="android:colorBackgroundCacheHint">@color/default_background_color</item>
<item name="android:actionBarStyle">@style/Album.ActionBar</item>
<item name="android:displayOptions"></item>
<item name="android:windowActionBarOverlay">true</item>
<item name="android:actionBarTabStyle">@style/Album.ActionBarTabStyle</item>
<item name="android:actionBarTabTextStyle">@style/Album.ActionBarTabTextStyle</item>
<item name="com.sonyericsson.uxp:directionality">leftToRight</item>
</style>
<style name="Album.ActionBar" parent="@*android:style/Widget.DeviceDefault.ActionBar.Solid">
[U] <item name="android:background">@drawable/semc_ab_solid_dark_holo</item>[/U]
<item name="android:displayOptions">showHome</item>
[U]<item name="android:backgroundStacked">@drawable/semc_ab_stacked_solid_dark_holo</item>[/U]
you see, the AlbumActionBar has background defined with drawable/semc_ab_solid_dark_holo and it works, i edited the pngs, and the action is lightgrey c1c2c1
but the ThemeAlbum has background defined with color/default_background_color
color/default_background_color is defined in the colors.xml, right? in the colors.xml i have <color name="default_background_color">#ffc1c2c1</color>
but still, its a darker grey, like on the pictures
hm whats with this line in the styles.xml?
<color name="default_background_color">#ffc1c2c1</color>
<color name="background_image_color">#ffc1c2c1</color>
whats the difference between these two? :silly:
My apologies mate i read it wrong last night. I thought you wanted the top the same color as the bottom.
Are the backgrounds not normally controlled by the Semc theme?
SemcAlbum- styles.xml
Code:
<style name="Theme.Album" parent="@*android:style/Theme.DeviceDefault">
framework-res- styles.xml
Code:
<style name="Theme.DeviceDefault"
<item name="windowBackground">@com.sonyericsson.uxp:drawable/semc_bg</item>
SemcGenericUxpRes- semc_bg.xml
Code:
<bitmap android:src="@drawable/[COLOR="Red"]semc_bg_tile[/COLOR]" android:tileMode="repeat"
semc_bg_tile usually changes with the Sony themes. Have you tried changing the theme to see if the album background changes?
I dont use Sony apps so i cant try myself.
Hi all.. i'm back again for share guide about add preference into stock Settings.apk
This guide is work for JB 4.1+
Feature:
PreferenceScreen
SeekBarPreference
ColorPickerPreference
MyListPreference
SwitchPreference
CheckBoxPreference
MyEditTextPreference
FilePreference
and many more..
Requirement:
- Understanding about APK compile/decompile
- APKTool
- Notepad++ (PC)
How:
1. Decompile Settings.apk
2. Copy smali and res folder from guide
3. Open AndroidManifest.xml
Find:
Code:
<uses-permission android:name="android.permission.REBOOT"/>
Add below:
Code:
<uses-permission android:name="android.permission.FORCE_STOP_PACKAGES" />
Scroll to end of line, add this above </application>
Code:
<activity android:label="@string/zen_control_title" android:name="com.android.settings.bamzzz.ZenControl" />
4. Open res/xml/dashboard_categories.xml (Lollipop) or res/xml/settings_headers.xml (JB)
Add this below "<dashboard-category android:id="@id/system_section" ..." or what do you want
Lollipop:
Code:
<dashboard-tile android:icon="@drawable/ic_settings_zencontrol" android:id="@id/zen_control" android:title="@string/zen_control_title" android:fragment="com.android.settings.bamzzz.ZenControl" />
JB:
Code:
<header android:icon="@drawable/ic_settings_zencontrol" android:id="@id/zen_control" android:title="@string/zen_control_title" android:fragment="com.android.settings.bamzzz.ZenControl" />
5. Open res/values/attrs.xml and add this:
Code:
<attr name="colorPrimary" format="color" />
<attr name="colorPrimaryDark" format="color" />
<attr name="colorAccent" format="color" />
<declare-styleable name="ThumbnailListPreference">
<attr name="drawableArray" format="reference" />
<attr name="entryList" format="reference" />
<attr name="entryValuesList" format="reference" />
<attr name="entryDefault" format="string" />
</declare-styleable>
6. Open res/values/colors.xml and add this:
Code:
<color name="colorAccent">#ffff4081</color>
<color name="colorPrimary">#ff3f51b5</color>
<color name="colorPrimaryDark">#ff303f9f</color>
7. Open res/values/dimens.xml and add this:
Code:
<dimen name="button_size">30.0dip</dimen>
8. Open res/values/ids.xml and add this:
Code:
<item type="id" name="zen_control">false</item>
<item type="id" name="appIcon">false</item>
<item type="id" name="linearLayout">false</item>
<item type="id" name="appName">false</item>
<item type="id" name="appPackage">false</item>
<item type="id" name="imageView">false</item>
<item type="id" name="color_picker_view">false</item>
<item type="id" name="text_hex_wrapper">false</item>
<item type="id" name="hex_val">false</item>
<item type="id" name="old_color_panel">false</item>
<item type="id" name="new_color_panel">false</item>
<item type="id" name="fileSwitch">false</item>
<item type="id" name="searchApp">false</item>
<item type="id" name="appsList">false</item>
<item type="id" name="progressBar">false</item>
<item type="id" name="iconForApp">false</item>
<item type="id" name="seekBarPrefUnitsRight">false</item>
<item type="id" name="seekBarPrefValue">false</item>
<item type="id" name="seekBarPrefUnitsLeft">false</item>
<item type="id" name="seekBarPrefBarContainer">false</item>
<item type="id" name="seekBarPrefSeekBar">false</item>
<item type="id" name="thumbnailRadioButton">false</item>
<item type="id" name="thumbnailImage">false</item>
<item type="id" name="thumbnailText">false</item>
<item type="id" name="thumbnailListView">false</item>
<item type="id" name="thumbnailIcon">false</item>
9. Open res/values/strings.xml and add this:
Code:
<string name="zen_control_title">Zen Control™</string> <!-- Rename if do you want -->
<string name="ok">OK</string>
<string name="app_reboot_required_title">App Reboot Required</string>
<string name="app_reboot_required_message">%1$s reboot is required for the changes to take effect.\n\nReboot now?</string>
<string name="dialog_color_picker">Color Picker</string>
<string name="press_color_to_apply">Press on Color to apply</string>
10. Open smali/com/android/settings/bamzzz/prefs/ColorPickerPreference.smali
Find "0x1020018" and replace with public id from framework-res type="id" name="widget_frame"
11. Open smali/com/android/settings/bamzzz/prefs/ColorPickerPreference.smali
Find "0x1020010" and replace with public id from framework-res type="id" name="summary"
12. Open res/xml/zen_prefs.xml, add/edit your preference here...
13. Done
Attention: Don't rename smali and/or folder structure without my permission..!!!
Keep oprek. Salam bootloop.
Thanks to:
[email protected]
[email protected]
Guide by [email protected]
fb.me/bamz4ever
Reserved
Ask um,
java.lang.RuntimeException: Unable to resume activity {com.android.settings/com.android.settings.SubSettings}: java.lang.NullPointerException: Attempt to read from null array
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3019)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3050)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2425)
at android.app.ActivityThread.access$900(ActivityThread.java:154)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1321)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5294)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699)
Check arrays.xml.. array null
missing 0x1020010 tutor no.11
bamzzz said:
11. Open smali/com/android/settings/bamzzz/prefs/ColorPickerPreference.smali
Find "0x1020010" and replace with public id from framework-res type="id" name="summary"
Click to expand...
Click to collapse
i cant find that tutor sir
please help
No undefined array sir ?
shining.surya said:
i cant find that tutor sir
please help
Click to expand...
Click to collapse
i am also not able to find
@bamzzz @venkat kamesh
added missed
Code:
<public type="id" name="widget_frame" id="0x7f0f02e1" />
to public.xml
and missed
Code:
<item type="id" name="widget_frame">false</item>
to ids.xml
recompiled settings.apk to get public id´s
decompiled again and wanted to change id´s in smali.
But there is no value 0x1020010 in smali/com/android/settings/bamzzz/prefs/ColorPickerPreference.smali
moonryder said:
@bamzzz @venkat kamesh
added missed
Code:
<public type="id" name="widget_frame" id="0x7f0f02e1" />
to public.xml
and missed
Code:
<item type="id" name="widget_frame">false</item>
to ids.xml
recompiled settings.apk to get public id´s
decompiled again and wanted to change id´s in smali.
But there is no value 0x1020010 in smali/com/android/settings/bamzzz/prefs/ColorPickerPreference.smali
Click to expand...
Click to collapse
Bro adding id was not a matter
In layout xml or any xml. Where id is defined
Just change @iD to @+id this will add the required id to ids.xml also creates public id
Coming to 0x10xxxxx these public ids will be with framework-res.apk.
Good luck bro
venkat kamesh said:
Bro adding id was not a matter
In layout xml or any xml. Where id is defined
Just change @iD to @+id this will add the required id to ids.xml also creates public id
Coming to 0x10xxxxx these public ids will be with framework-res.apk.
Good luck bro
Click to expand...
Click to collapse
hi bro,
thx for the tipp with the +id
I looked in the framework-res and saw that there has nothing to be changed in the smali cuz the id´s are the same.
But there is no value 0x1020010 in smali/com/android/settings/bamzzz/prefs/ColorPickerPreference.smali - so i can´t check/change the id!
And without that value this mod did not work! (also the one from @venkat kamesh) - pity
moonryder said:
hi bro,
thx for the tipp with the +id
I looked in the framework-res and saw that there has nothing to be changed in the smali cuz the id´s are the same.
But there is no value 0x1020010 in smali/com/android/settings/bamzzz/prefs/ColorPickerPreference.smali - so i can´t check/change the id!
And without that value this mod did not work! (also the one from @venkat kamesh) - pity
Click to expand...
Click to collapse
Haha this guide was not from me
I haven't tested it either bro
See @Bloodlvst solved this
Hope he may help you bro
venkat kamesh said:
Haha this guide was not from me
I haven't tested it either bro
See @Bloodlvst solved this
Hope he may help you bro
Click to expand...
Click to collapse
@moonryder - the ID shouldn't need changing. What's the error you get and what android version?
Bloodlvst said:
@moonryder - the ID shouldn't need changing. What's the error you get and what android version?
Click to expand...
Click to collapse
hi,
i will try to explain it the third time:
i followed the tut by bamzzz. All went fine until i wanted to change the values in "smali/com/android/settings/bamzzz/prefs/ColorPickerPreference.smali" (look at step 11 of bamzzz´s tutorial).
--> there is NO value 0x1020010 so i could not change it (public id)
so i tried it without step 11, followed the tut of venkat kamesh to hide battery in statusbar (tutorial from here).
Compiling and flashing went fine, but it didn´t work.
pushing the button, the battery icon won´t disapper.
So i think the issue must be in the smali mentioned above.
i am on LP 5.1.1
moonryder said:
hi,
i will try to explain it the third time:
i followed the tut by bamzzz. All went fine until i wanted to change the values in "smali/com/android/settings/bamzzz/prefs/ColorPickerPreference.smali" (look at step 11 of bamzzz´s tutorial).
--> there is NO value 0x1020010 so i could not change it (public id)
so i tried it without step 11, followed the tut of venkat kamesh to hide battery in statusbar (tutorial from here).
Compiling and flashing went fine, but it didn´t work.
pushing the button, the battery icon won´t disapper.
So i think the issue must be in the smali mentioned above.
Click to expand...
Click to collapse
Step 11 just had a typo for the filename. If you look at the Guide.txt in the zip file, it will give you the right file name. But in either case those values wouldn't affect if the battery will hide or not
moonryder said:
hi,
i will try to explain it the third time:
i followed the tut by bamzzz. All went fine until i wanted to change the values in "smali/com/android/settings/bamzzz/prefs/ColorPickerPreference.smali" (look at step 11 of bamzzz´s tutorial).
--> there is NO value 0x1020010 so i could not change it (public id)
so i tried it without step 11, followed the tut of venkat kamesh to hide battery in statusbar (tutorial from here).
Compiling and flashing went fine, but it didn´t work.
pushing the button, the battery icon won´t disapper.
So i think the issue must be in the smali mentioned above.
i am on LP 5.1.1
Click to expand...
Click to collapse
why not a logcat
that show the problem
get a logcat bro
venkat kamesh said:
why not a logcat
that show the problem
get a logcat bro
Click to expand...
Click to collapse
there is no logcat to post cuz recompiling works without any error.
But the mod does not work
moonryder said:
there is no logcat to post cuz recompiling works without any error.
But the mod does not work
Click to expand...
Click to collapse
hmmm
i am not supposed you about build logcat
you should know more about logcat bro
look at this
http://forum.xda-developers.com/showthread.php?t=1726238
go on
get a logcat
that probably show the problem and then its easy to fix
venkat kamesh said:
hmmm
i am not supposed you about build logcat
you should know more about logcat bro
look at this
http://forum.xda-developers.com/showthread.php?t=1726238
go on
get a logcat
that probably show the problem and then its easy to fix
Click to expand...
Click to collapse
sorry bro,
i missunderstood.
log is attached
moonryder said:
sorry bro,
i missunderstood.
log is attached
Click to expand...
Click to collapse
Bro this is not exact log
When you create logcat
You should click on fc part
Example
Go to settings which you get fc
Start logcat. Open part of settings you get fc and after that fc. Stop log by unplug and send me bro
That shows what was wrong
venkat kamesh said:
Bro this is not exact log
When you create logcat
You should click on fc part
Example
Go to settings which you get fc
Start logcat. Open part of settings you get fc and after that fc. Stop log by unplug and send me bro
That shows what was wrong
Click to expand...
Click to collapse
i did it like you said