I have been working on a work around for Compiling Theme Chooser Themes since android.git.kernel.org has been down for a while now
Here is the Original How to guide with my changes to it to make things easier for users of this and though who have not downloaded this excellent application src
I am using Windows xp 32 bit with the most recent Version of CYGWIN and everything works just fine while rewriting this guide to work for though who cant access kernel.org anymore due to the downtime.
I am not the ORIGINAL Writier of this guide I have only modified it to work due to the kernel.org being down and supplying a alternative to theme chooser development as well as adjust it to help Cygwin users on windows machines
-COMPILING THEME'S FOR CYANOGEN MOD/T-MOBILE THEME ENGINE-
Web - http://code.google.com/p/android-theme/ - https://github.com/haxzamatic - http://pastebin.com/L8CreqP7
NOTE: This guide assumes you prepared your build environment by following the Cyanogen Mod Wiki - http://goo.gl/LTy7 If you have a x32 system you need to use the CM method below. You also may want to build CM/AOSP before trying this since it's more documented. I did the best I can to put this together please put suggestions and corrections in the comments. I would follow this guide and compile templatebread before adding your additions if it's your first time! A Eclipse Template will be made available from T-Moblie eventually and should make this a lot easier. We need to to compile the apk with -x 10 package scope and is not currently possible to set custom AAPT flags in Eclipse. We need a SDK add-on! When a SDK for the themes is released I will update and make a Templatebread for Eclipse. Hope this clears things up.
Compiled Templatebread APK - http://bit.ly/hdEWsf
The apk is signed and ready to install. If your planning on waiting for the Eclipse Template and want to test or start the theme while waiting I would use apktool and decompile templatebread.apk make your changes and compile. After you compile with apktool use an untouched copy of templatebread you got here and use an archiver to copy your changes into the apk that was compiled correctly. After that sign and test on your device.
PS: I had to figure all of this out myself,if you follow this guide you will end up with a working theme and learn something in the process. Number one thing when trying something out of your comfort zone is not to stress if things go wrong, stress will cause more problems. People give up to quickly, if your patient and persistent you will be fine. Google is your best friend when you have a question. I'm always willing to help anyone and everyone, just contact me.
-Installing REPO-
Make sure you have a ~/bin directory, and setup repo.
Code:
cd ~
mkdir -p ~/bin
curl "http://php.webtutor.pl/en/wp-content/uploads/2011/09/repo" > ~/bin/repo
repo init -u https://github.com/android/tools_repo.git -b master
repo sync
chmod a+x ~/bin/repo
PATH=~/bin:$PATH
-START OF GUIDE x64-
We start by getting the source from T-Mobile. Open your terminal...
Code:
mkdir themes
cd themes
repo init -u git://github.com/tmobile/themes-platform-manifest.git -b master
Now here where things change from the Orignal Guide
we now want to go into the .repo/manifests
Code:
cd .repo/manifests
open the default.xml and search for fetch="git://android.git.kernel.org/"
we want to change
Code:
fetch="git://android.git.kernel.org/"
to
Code:
fetch="git://codeaurora.org/"
save the default.xml and then go back to the home directory
Code:
cd ..
cd ..
now we want to sync the repo to download the src
Code:
repo sync
source build/envsetup.sh
lunch themes_generic-eng hdpi
We can make now to make sure it compiles before moving on
Code:
make
After you see it works lets start our theme. tree_root means directory your /themes/ folder is in! It's different for each person!
Code:
cd tree_root
cd vendor/tmobile/themes
git clone git://github.com/haxzamatic/Templatebread-.git
The themes are all going to be located in...
/home/<USER-DIR>/themes/vendor/tmobile/themes/
In that directory we see the source for Templatebread, open it.
Now this is the source we edit.
Code:
package="com.template.theme.templatebread"
to
Code:
package="com.yourname.theme.themename"
Then edit...
Code:
<theme
pluto:themeId="Templatebread"
pluto:styleId="@style/Templatebread"
to
Code:
<theme
pluto:themeId="Themename"
pluto:styleId="@style/Themename"
Save the AndroidManifest.xml
Now open /res/values folder
Open the Strings.xml and edit the following...
Code:
<resources>
<string name="app_name">Templatebread Theme</string>
<string name="theme_name">Templatebread</string>
<string name="style_appearance_name">Templatebread</string>
<string name="author">Haxzamatic</string>
<string name="copyright">Haxzamatic</string>
</resources>
to
Code:
<resources>
<string name="app_name">Themename</string>
<string name="theme_name">Themename</string>
<string name="style_appearance_name">Themename</string>
<string name="author">yourname</string>
<string name="copyright">yourname</string>
</resources>
Save the strings.xml
Open themes.xml and edit
Code:
<resources>
<style name="Templatebread" parent="@android:style/Theme" >
to
Code:
<resources>
<style name="YourTheme" parent="@android:style/Yourtheme" >
Save themes.xml
Now open the /src/com/template/ and rename template folder to yourname
Then open /src/com/template/theme/templatebread and rename templatebread folder to yourthemename
So it should be /src/com/template/theme/templatebread.foo.java (So you know this is what the apk will com name will be... ex: com.template.theme.templatebread)
Before "make" we need to edit one more thing, navigate to
/home/<USER-DIR>/themes/vendor/tmobile/products/themes
Now open themes-base.mk and add your theme name in this case we added Templatebread
Code:
PRODUCT_PACKAGES += \
ThemeManager \
ThemeChooser \
com.tmobile.themes \
Templatebread \
Cyanbread
Now your ready to make
After steps above are done we can build our theme...
Code:
cd themes
source build/envsetup.sh
lunch themes_generic-eng
make
After it compiles navigate to the out folder and get your newly compiled apk and sign then zip align after signing!
That's it install on your device and pick the theme in the chooser, apply, and reboot...
-Credits and Honorable mentions-
Original Guide
Artur Graniszewski - For His alternative repository for Repo
Code Aurora - for their Android Alternative git resource
-Thanks and Donations-
If this Guide helps you please use the thanks button or make a donation if you want
-GUIDE FOR COMPILING WITH AN EXISTING CM BUILD x32-
NOTE: This guide assumes you prepared your build environment by following the Cyanogen Mod Wiki - http://goo.gl/LTy7
-START OF CM GUIDE-
We start by getting the source by following the CM guide.
Now we add Templatebread to build with cm...
Code:
cd android
cd vendor/tmobile/themes
git clone git://github.com/haxzamatic/Templatebread-.git
The themes are all going to be located in...
/home/<USER-DIR>/android/vendor/tmobile/themes/
In that directory we see the source for Templatebread, open it.
Now this is the source we edit.
Code:
package="com.template.theme.templatebread"
to
Code:
package="com.yourname.theme.themename"
Then edit...
Code:
<theme
pluto:themeId="Templatebread"
pluto:styleId="@style/Templatebread"
to
Code:
<theme
pluto:themeId="Themename"
pluto:styleId="@style/Themename"
Save the AndroidManifest.xml
Now open /res/values folder
Open the Strings.xml and edit the following...
Code:
<resources>
<string name="app_name">Templatebread Theme</string>
<string name="theme_name">Templatebread</string>
<string name="style_appearance_name">Templatebread</string>
<string name="author">Haxzamatic</string>
<string name="copyright">Haxzamatic</string>
</resources>
to
Code:
<resources>
<string name="app_name">Themename</string>
<string name="theme_name">Themename</string>
<string name="style_appearance_name">Themename</string>
<string name="author">yourname</string>
<string name="copyright">yourname</string>
</resources>
Save the strings.xml
Open themes.xml and edit
Code:
<resources>
<style name="Templatebread" parent="@android:style/Theme" >
to
Code:
<resources>
<style name="YourTheme" parent="@android:style/Yourtheme" >
Save themes.xml
Now open the /src/com/template/ and rename template folder to yourname
Then open /src/com/template/theme/templatebread and rename templatebread folder to yourthemename
So it should be /src/com/template/theme/templatebread.foo.java (So you know this is what the apk will com name will be... ex: com.template.theme.templatebread)
Before "make" we need to edit one more thing, navigate to
/home/<USER-DIR>/android/vendor/tmobile/products/themes
Now open themes-base.mk and add your theme name in this case we added Templatebread
Code:
PRODUCT_PACKAGES += \
ThemeManager \
ThemeChooser \
com.tmobile.themes \
Templatebread \
Cyanbread
After steps above are done we can build our theme...
Code:
make
After it compiles navigate to the out folder and get your newly compiled apk and sign then zip align after signing!
That's it install on your device and pick the theme in the chooser, apply, and reboot...
-Credits and Honorable mentions-
Original Guide
Artur Graniszewski - For His alternative repository for Repo
Code Aurora - for their Android Alternative git resource
-Thanks and Donations-
If this Guide helps you please use the thanks button or make a donation if you want
-Guide for Windows machines CYGWIN-
**NOTICE**
Currently Being revised
**NOTICE**
-Installing REPO-
Make sure you have a ~/bin directory, and setup repo.
Code:
cd ~
mkdir -p ~/bin
curl "http://php.webtutor.pl/en/wp-content/uploads/2011/09/repo" > ~/bin/repo
repo init -u https://github.com/android/tools_repo.git -b master
repo sync
chmod a+x ~/bin/repo
PATH=~/bin:$PATH
-START OF GUIDE-
We start by getting the source from T-Mobile. Open your terminal...
Code:
mkdir themes
cd themes
repo init -u git://github.com/tmobile/themes-platform-manifest.git -b master
Now here where things change from the Orignal Guide
we now want to go into the .repo/manifests
Code:
cd .repo/manifests
open the default.xml and search for fetch="git://android.git.kernel.org/"
we want to change
Code:
fetch="git://android.git.kernel.org/"
to
Code:
fetch="git://codeaurora.org/"
save the default.xml and then go back to the home directory
Code:
cd ..
cd ..
now we want to sync the repo to download the src
Code:
repo sync
source build/envsetup.sh
lunch themes_generic-eng hdpi
We can make now to make sure it compiles before moving on
Code:
make
After you see it works lets start our theme. tree_root means directory your /themes/ folder is in! It's different for each person!
Code:
cd tree_root
cd vendor/tmobile/themes
git clone git://github.com/haxzamatic/Templatebread-.git
The themes are all going to be located in...
/home/<USER-DIR>/themes/vendor/tmobile/themes/
In that directory we see the source for Templatebread, open it.
Now this is the source we edit.
Code:
package="com.template.theme.templatebread"
to
Code:
package="com.yourname.theme.themename"
Then edit...
Code:
<theme
pluto:themeId="Templatebread"
pluto:styleId="@style/Templatebread"
to
Code:
<theme
pluto:themeId="Themename"
pluto:styleId="@style/Themename"
Save the AndroidManifest.xml
Now open /res/values folder
Open the Strings.xml and edit the following...
Code:
<resources>
<string name="app_name">Templatebread Theme</string>
<string name="theme_name">Templatebread</string>
<string name="style_appearance_name">Templatebread</string>
<string name="author">Haxzamatic</string>
<string name="copyright">Haxzamatic</string>
</resources>
to
Code:
<resources>
<string name="app_name">Themename</string>
<string name="theme_name">Themename</string>
<string name="style_appearance_name">Themename</string>
<string name="author">yourname</string>
<string name="copyright">yourname</string>
</resources>
Save the strings.xml
Open themes.xml and edit
Code:
<resources>
<style name="Templatebread" parent="@android:style/Theme" >
to
Code:
<resources>
<style name="YourTheme" parent="@android:style/Yourtheme" >
Save themes.xml
Now open the /src/com/template/ and rename template folder to yourname
Then open /src/com/template/theme/templatebread and rename templatebread folder to yourthemename
So it should be /src/com/template/theme/templatebread.foo.java (So you know this is what the apk will com name will be... ex: com.template.theme.templatebread)
Before "make" we need to edit one more thing, navigate to
/home/<USER-DIR>/themes/vendor/tmobile/products/themes
Now open themes-base.mk and add your theme name in this case we added Templatebread
Code:
PRODUCT_PACKAGES += \
ThemeManager \
ThemeChooser \
com.tmobile.themes \
Templatebread \
Cyanbread
Now your ready to make
After steps above are done we can build our theme...
Code:
cd themes
source build/envsetup.sh
lunch themes_generic-eng
make
After it compiles navigate to the out folder and get your newly compiled apk and sign then zip align after signing!
That's it install on your device and pick the theme in the chooser, apply, and reboot...
-Credits and Honorable mentions-
Original Guide
Artur Graniszewski - For His alternative repository for Repo
Code Aurora - for their Android Alternative git resource
-Thanks and Donations-
If this Guide helps you please use the thanks button or make a donation if you want
Reserved for Future Guide
Nice
Sent from my IDEOS S7 Slim using XDA App
I have just gotten though adding the guide to rootzwiki.
I Broken the Guide into parts to each OS has it own break down and section with instructions and such
while the guides are identical atm but that will change as time persist as I find and Discover better methods or changes to windows version as well as adding it to the Wiki over there this allows others to contribute to the guides as well improving append what i mapped out as a base
http://wiki.rootzwiki.com/index.php/T-Mobile_Theme_Chooser_Themes
Important tools to have handy that will be used in these guides:
APKTool
Baksmali / Smali
Example Builds for Stock Odex KOT49H:
Advanced Power Menu
Statusbar Modifications
Advanced Power Menu:
First you will want to copy the entire framework folder from the build you plan to use to a working folder.
After that is done, make sure you have baksmali, smali.jar, and baksmali.jar in the same working folder.
Copy the odex file for the item you want to modify, in this case android.policy.odex into the root of the working folder.
Open up a command prompt or terminal and cd to the working directory then run:
Code:
./baksmali -a 19 -x android.policy.odex -d framework -o policy
Now open up the policy folder that was just created and open all the folders until you get to:
policy/com/android/internal/policy/impl
In this folder, you will want to open GlobalActions.smali
Search for:
Code:
invoke-direct {v1, p0, v2, v3}, Lcom/android/internal/policy/impl/GlobalActions$2;->(Lcom/android/internal/policy/impl/GlobalActions;II)V
Right below that, you will want to make sure you have:
Code:
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$99;
const v2, 0x108007c
const v3, 0x1040361
invoke-direct {v1, p0, v2, v3}, Lcom/android/internal/policy/impl/GlobalActions$99;->(Lcom/android/internal/policy/impl/GlobalActions;II)V
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
the next code after this group should now be .line 264
Close and save this file, then open GlobalActions$SinglePressAction.smali
You will see a section that reads:
Code:
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/android/internal/policy/impl/GlobalActions;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x40a
name = "SinglePressAction"
.end annotation
Below that, you will want to add:
Code:
# static fields
.field protected static rebootMode:I
.field protected static final rebootOptions:[Ljava/lang/String;
Now skip past the next section:
Code:
# instance fields
.field private final mIcon:Landroid/graphics/drawable/Drawable;
.field private final mIconResId:I
.field private final mMessage:Ljava/lang/CharSequence;
.field private final mMessageResId:I
and add the following section directly under # direct methods:
Code:
.method static constructor ()V
.registers 3
const/4 v0, 0x4
new-array v0, v0, [Ljava/lang/String;
const/4 v1, 0x0
const-string v2, "Reboot"
aput-object v2, v0, v1
const/4 v1, 0x1
const-string v2, "Restart"
aput-object v2, v0, v1
const/4 v1, 0x2
const-string v2, "Bootloader"
aput-object v2, v0, v1
const/4 v1, 0x3
const-string v2, "Recovery"
aput-object v2, v0, v1
sput-object v0, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;->rebootOptions:[Ljava/lang/String;
return-void
.end method
You can now save and close this file. There are three additional files (attached to the post as GlobalActions.zip) that should also be added to the folder you are currently working in.
You are now ready to package the modification back into a file. Make sure you are still in the working directory in your command prompt or terminal and run:
Code:
java -Xmx1024m -jar smali.jar policy -o classes.dex
Now it is time to use winrar, 7zip, or whatever archive program you have handy to add the new classes.dex to android.policy.jar
Once this has been done, move the file to the device and follow the section for how to odex a file.
Statusbar Modifications:
For this one, you will be modifying the SystemUI.apk directly with apktool. Copy that to the working directory and run:
Code:
./apktool if framework/framework-res.apk
Code:
./apktool decode SystemUI.apk
First, open up the SystemUI/smali/com folder and add the contents of percentage.zip (attached to post), so the new percentage folder is in the same directory as android already was.
Now return to the SystemUI folder and open SystemUI/res/layout/status_bar.xml and search for:
Code:
<com.android.systemui.BatteryMeterView android:id="@id/battery" android:layout_width="10.5dip" android:layout_height="16.0dip" android:layout_marginBottom="0.33000004dip" android:layout_marginStart="4.0dip" />
This is the battery icon. You can keep it or remove it. The placement from the top to the bottom of this file goes from left to right on screen. If you place a battery percentage before the icon in the file, it will be on the left of the icon on your screen. Same as placing it after would be on the right of the icon on screen.
Depending where you decide you want the percentage, paste this code:
Code:
<com.percentage.BatteryText android:textSize="14.0dip" android:gravity="center" android:layout_width="wrap_content" android:layout_height="fill_parent" />
If you want to change the size of the text, replace 14.0dip with the value you want, such as 16.0dip to match the battery height.
To center the clock, first remove the current com.android.systemui.statusbar.policy.Clock line and search for:
Code:
<com.android.systemui.statusbar.phone.IconMerger android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/notificationIcons" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_alignParentStart="true" />
Directly below the </LinearLayout> add:
Code:
<LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/clock" android:layout_width="wrap_content" android:layout_height="fill_parent">
<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="center" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
</LinearLayout>
This will create a centered layout in the middle of the statusbar that contains the clock.
Now you can close and save this file and return to the command prompt or terminal window and run:
Code:
./apktool build SystemUI
You will find your new SystemUI.apk in the SystemUI/dist directory that was just created.
Don't forget to create an odex file if you came from an odex build, which is the next guide below.
How to Odex a File:
Copy dexopt-wrapper to /system/xbin/ ( One can be found at the Original Tutorial )
Code:
chmod 755 /system/xbin/dexopt-wrapper
Code:
dexopt-wrapper MODIFIED-FILE.*** TEMPORARY-ODEX-FILE.odex /system/framework/core.jar:/system/framework/conscrypt.jar:/system/framework/okhttp.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/framework2.jar:/system/framework/telephony-common.jar:/system/framework/voip-common.jar:/system/framework/mms-common.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/apache-xml.jar:/system/framework/webviewchromium.jar
(The long string of files at the end is everything after export BOOTCLASSPATH in init.rc / init.environ.rc)
Code:
busybox dd if=ORIGINAL-ODEX-FILE.odex of=TEMPORARY-ODEX-FILE.odex bs=1 count=20 skip=52 seek=52 conv=notrunc
Code:
mv TEMPORARY-ODEX-FILE.odex ORIGINAL-ODEX-FILE(NAME).odex
Now place the modified file and new odex file in a flashable zip or directly into the target directory replacing the originals.
Toggling ART and Dalvik from ADB:
Code:
adb pull /data/property/persist.sys.dalvik.vm.lib
open the file and replace the "libart.so" with "libdvm.so" (no quotes) to switch from ART to Dalvik
open the file and replace the "libdvm.so" with "libart.so" (no quotes) to switch from Dalvik to ART
Code:
adb push persist.sys.dalvik.vm.lib /data/property/
Code:
adb shell reboot
Thanks! Works great.
This is what the android community is all about. Thanks mate.
...and I'm spent. Well, I think that covers everything but the DPI modifications. I may or may not get to those later depending if they are already available when I get back. Right now I use a 240 system-wide DPI so they are more or less pointless in my case.
twistedumbrella said:
...I noticed cargobr151 was getting a little swamped trying to maintain all the various mods and updates....
Click to expand...
Click to collapse
Who says that?
Why you asking me not for permission, before you use my files and modify them?
Why you use my pictures without asking me?
Thanks for that!!!!
cargobr151 said:
Who says that?
Why you asking me not for permission, before you use my files and modify them?
Why you use my pictures without asking me?
Thanks for that!!!!
Click to expand...
Click to collapse
In the battery mod thread you were saying you were busy. Linked directly to the images and your thread. And permission to take stock system files, follow a tutorial, and still give you credit anyway? Seriously? I know you do it for the credit, but I did it for the users.
In the battery mod thread you were saying you were busy...[/QUOTE]
And? This does not mean that I make no versions.
twistedumbrella said:
...I know you do it for the credit, but I did it for the users...
Click to expand...
Click to collapse
I did it for credits? What i get therefore? Exactly...nothing. :laugh::laugh::laugh:
You did it for the users?
But only, after someone created the files, which you can use.
cargobr151 said:
In the battery mod thread you were saying you were busy...
And? This does not mean that I make no versions.
I did it for credits? What i get therefore? Exactly...nothing. :laugh::laugh::laugh:
You did it for the users?
But only, after someone created the files, which you can use.
Click to expand...
Click to collapse
garzacorporations said:
Not working for me on 4.4.2 stock.
Sent from my Nexus 5 using xda premium
Click to expand...
Click to collapse
See below
Speaking of which... A lot of these ANCIENT modifications are still heavily used so it would be good to have them all rounded up as instructions instead of single use flash files. I think I'll gather up the guides that were used and post those here so next time an update hits people have an option to make it themselves.
It seems the original publisher of the advanced power menu rushed through the mod and released a broken version so that is proof enough that the ones hosted here are rebuilt manually and not cloned.
The builds are available under the example heading
Save the drama for your mama. I just want a working mod.
Thanks for the work, both of you.
xybur said:
Save the drama for your mama. I just want a working mod.
Thanks for the work, both of you.
Click to expand...
Click to collapse
...I really have to explain this again? Someone call an adult, these kids are making a mess all over the brand new thread.
Question... Does this work with ART enable? Specially the 4 way reboot.
Request...Is it possible to make a volume buttons "skip tracks" zip or a guide on how to do it?
Thanks
Edit: OK, I read your explanation in the other thread :thumbup:
miguepereira77 said:
Question... Does this work with ART enable? Specially the 4 way reboot.
Request...Is it possible to make a volume buttons "skip tracks" zip or a guide on how to do it?
Thanks
Edit: OK, I read your explanation in the other thread :thumbup:
Click to expand...
Click to collapse
Technically it should work if you enable ART AFTER installing the mods. I tried it, but was unable to test because I had Xposed and it locked up my phone. Speaking of, I should add the quick guide to disable ART from ADB.
Well, I found http://forum.xda-developers.com/showthread.php?t=2071970 so let's see if it works. I have a lot of respect for the people that can actually write smali code (but not those who copy it and flip out like that makes them developers). It looks a lot like when I write Java after not sleeping and functions end up wherever I am when I start writing a chunk.
I'm guessing it's not worth doing in a Windows environment?
EddyOS said:
I'm guessing it's not worth doing in a Windows environment?
Click to expand...
Click to collapse
They make some visual apktool for windows. It's probably easier. I use a Mac. It's like the outcast since everything has to be ported or modified.
I have a Ubuntu build I can jump on if needed
Did you cover changing the size of the % at all? I'm after the battery % to the left of the icon same size as the clock font and with the % the same size as the number (like cargo's original mod)
EddyOS said:
I have a Ubuntu build I can jump on if needed
Did you cover changing the size of the % at all? I'm after the battery % to the left of the icon same size as the clock font and with the % the same size as the number (like cargo's original mod)
Click to expand...
Click to collapse
Something is up with my app or the forum because half that section vanished. In the XML, you would change the font size from 14 (I think it was?) to 16, 18, whatever for the com.percentage.BatteryText
I change a few things in the bat mod.
Change the bat icon line android:layout_marginStart="4.0dip" to android:layout_marginStart="2.0dip"
and add this at the end of the percent line: android:layout_marginStart="2.0dip"
Works on percent on the left of icon only
Without
View attachment 2451249
With mod
View attachment 2451250
siefaz said:
I change a few things in the bat mod.
Change the bat icon line android:layout_marginStart="4.0dip" to android:layout_marginStart="2.0dip"
and add this at the end of the percent line: android:layout_marginStart="2.0dip"
Works on percent on the left of icon only
Without
View attachment 2451249
With mod
View attachment 2451250
Click to expand...
Click to collapse
You could add the 2 pixel buffer as marginEnd on the icon to do it with the text on the right
Hi, its my first tut on XDA Forum
I would like to share with you my knowledge.
To decompile, sign and recompile files I using Advance ApkTool
1. Theme accent color in dialog, pop up, settings, text highlight etc..
Screens:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Tutorial:
Its very easy mod!
1. Recompile your framework-res.apk
2. Go to /res/values/ and open color.xml
3. Find <color name="holo_blue_light">..</color> and replace value with @com.sonyericsson.uxp:color/semc_theme_accent_color
shoud look like this:
4. Now find:
Code:
<color name="highlighted_text_dark">
<color name="highlighted_text_light">
<color name="highlighted_text_holo_dark">
<color name="highlighted_text_holo_light">
and replace color value with @com.sonyericsson.uxp:color/semc_theme_accent_color
5. Now go to apktool.yml and add this line under isFrameworkApk: true
Code:
usesFramework:
ids:
- 2
6. Now recompile, sign and push into /system/framework !
2. Theme accent color in Progress bar
Screens:
Tutorial:
1. Recompile your framework-res
2. Download this files proggres.rar and paste to /res/drawable & /drawable-hdpi
3. Now go to styles.xml and find this line:
Code:
<item name="progressDrawable">@drawable/progress_horizontal_holo_light</item>
replace it with
Code:
<item name="progressDrawable">@drawable/semc_progress_horizontal_holo_light</item>
now find this line:
Code:
<item name="progressDrawable">@drawable/progress_horizontal_holo_dark</item>
and replace it with
Code:
<item name="progressDrawable">@drawable/semc_progress_horizontal_holo_dark</item>
4. Recompile, sign and push in /system/framework!
3. Cool list separator accorind theme color!
Screens:
Tutorial:
1. Recompile your framework-res
2. Create new list_separator_background.xml file in /res/drawable
Code:
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@com.sonyericsson.uxp:color/semc_theme_accent_color" />
<corners android:topRightRadius="8.0px" android:bottomRightRadius="8.0px" />
<padding android:left="4.0dip" android:top="2.0dip" android:right="4.0dip" android:bottom="2.0dip" />
</shape>
3. Now go to styles.xml and find this
Code:
@drawable/dark_header_dither
and replace it with this:
Code:
@drawable/list_separator_background
find this:
Code:
@drawable/light_header_dither
and replace it with this:
Code:
@drawable/list_separator_background
find this style
Code:
<style name="Widget.Holo.TextView.ListSeparator" parent="@style/Widget.TextView.ListSeparator">
under this style find this
Code:
<item name="background">
and replace it with
Code:
@drawable/list_separator_background
like this:
do the same with this style
Code:
<style name="Widget.Holo.Light.TextView.ListSeparator" parent="@style/Widget.TextView.ListSeparator">
4. Recompile, sign and push to /framework
4. Text fields according theme color and search box
Screens:
Tutorial:
1. Decompile your framework-res
2. Download this files Text fields and paste it
3. Open styles.xml and find this style:
a)
Code:
<style name="Theme.Holo.Light" parent="@style/Theme.Light">
under this style find
Code:
<item name="editTextColor
and
Code:
<item name="editTextBackground">
Replace it to look like this:
Code:
<item name="editTextColor">@color/semc_edittext_color_dark</item>
<item name="editTextBackground">@drawable/semc_edit_text_holo_light</item>
b)
Now, under this style:
Code:
<style name="Theme.Holo" parent="@style/Theme">
find this:
Code:
<item name="editTextColor
Code:
<item name="editTextBackground">
and edit to look like this:
Code:
<item name="editTextColor">@color/semc_edittext_color_dark</item>
<item name="editTextBackground">@drawable/semc_edit_text_holo_dark</item>
4. Now find this line
Code:
<item name="searchViewTextField">
and edit to look like this:
in Theme.Holo
Code:
<item name="searchViewTextField">@drawable/semc_textfield_searchview_holo_dark</item>
in Theme.Holo.Light
Code:
<item name="searchViewTextField">@drawable/semc_textfield_searchview_holo_dark</item>
5. Save, recompile, sign and push to framework!
5. How to port switchers accorind theme color
Screens:
Tutorial:
1. Decompile your framework-res
2. Download switch.rar (see attachment) and paste it
3. Now go to /res/values/strings.xml and add this string to end of the file
Code:
<string name="capital_on_blind" />
<string name="capital_off_blind" />
save & exit
4.1 Open styles.xml and find this style:
Code:
<style name="Widget.Holo.Light.CompoundButton.Switch" parent="@style/Widget.CompoundButton.Switch">
edit this style to look like this:
Code:
<style name="Widget.Holo.Light.CompoundButton.Switch" parent="@style/Widget.CompoundButton.Switch">
<item name="textOn">@string/capital_on_blind</item>
<item name="textOff">@string/capital_off_blind</item>
<item name="thumb">@drawable/switch_inner_holo_light</item>
<item name="switchTextAppearance">@style/TextAppearance.Holo.Widget.Switch</item>
<item name="track">@drawable/switch_track_holo_light</item>
<item name="switchMinWidth">70.0dip</item>
<item name="switchPadding">8.0dip</item>
<item name="thumbTextPadding">12.0dip</item>
</style>
4.2 Now find this style
Code:
<style name="Widget.Holo.CompoundButton.Switch" parent="@style/Widget.Holo.CompoundButton">
end edit to look like this:
Code:
<style name="Widget.Holo.CompoundButton.Switch" parent="@style/Widget.Holo.CompoundButton">
<item name="textOn">@string/capital_on_blind</item>
<item name="textOff">@string/capital_off_blind</item>
<item name="thumb">@drawable/switch_inner_holo_dark</item>
<item name="switchTextAppearance">@style/TextAppearance.Holo.Widget.Switch</item>
<item name="track">@drawable/switch_track_holo_light</item>
<item name="switchMinWidth">70.0dip</item>
<item name="switchPadding">8.0dip</item>
<item name="thumbTextPadding">12.0dip</item>
</style>
5. Save, recompile, sign and push to framework!
Its my first tutorial,
Hit thanks If you like it!
To do:
•How to port search box and text fields according theme color, Added
•How to port switchers accorind theme color, Added
•How to port btn_toggle, day &number picker according theme color
• and more...
one more
How to change colors of bubbles (Received and Sent) is SMS message? Thanks...
Congrats!!
Really useful and well written!!
top work bro.
so usfull
.
Nice work Bro
serajr said:
Really useful and well written!!
Click to expand...
Click to collapse
alinolaw71 said:
top work bro.
so usfull
.
Click to expand...
Click to collapse
Ambor said:
Nice work Bro
Click to expand...
Click to collapse
Thank you guys!!
/Added tutorial how to port search box and text fields according theme color!
if I add id 2
than bootloop I tried this method previous also but ends with bootloop @serajr m using ur framework
xperia l 4.2
yash989 said:
if I add id 2
than bootloop I tried this method previous also but ends with bootloop @serajr m using ur framework
xperia l 4.2
Click to expand...
Click to collapse
Your framework support colorizable function? Here is tut how to port if yes try to sign framework-res.apk
KuaQ said:
Your framework support colorizable function? Here is tut how to port if yes try to sign framework-res.apk
Click to expand...
Click to collapse
yes it supports
before it shows framework icon
but after compile it shows only robot icon
yash989 said:
if I add id 2
than bootloop I tried this method previous also but ends with bootloop @serajr m using ur framework
xperia l 4.2
Click to expand...
Click to collapse
I have no framework released!!
yash989 said:
yes it supports
before it shows framework icon
but after compile it shows only robot icon
Click to expand...
Click to collapse
maybe try to use another apktool version
serajr said:
I have no framework released!!
Click to expand...
Click to collapse
i mean cnt roms framework
You made the Portal News! http://www.xda-developers.com/android/honami-ui-guide/
Nice work! :highfive:
Good work @KuaQ ! Very good !:good:
Awesome guide
I use LG P713 (4.1.2) is it work for me?
It did not work with me
More'll try again :good:
Good !
Well Done ! @KuaQ
Tutorial is written clearly and everything is understandable.
That is AWESOME!!!!!!!!!!!!:victory: