[Q][Theming] How fix dark text on dark background Dialog on Gingerbread? - Android Q&A, Help & Troubleshooting

Hi!
I've got the following problem:
I'm on JellyBlast 3 (Gingerbread, I guess) with my Galaxy Y and I'm a little unhappy with the theme that comes with JellyBlast. I have fixed some issues but I cannot figure out how to avoid black text on dark background in Alert Dialogs. This issue makes some dialogs of the hololauncher and some other apps completely ureadable if you do not turn the screen to full brightness (what I normally don't do).
I'm not quite sure, if this is possible at all...
What I've found out so far:
In the Gingerbread source the Theme for the the Alert Dialog is hard coded:
Code:
protected AlertDialog(Context context) {
this(context, com.android.internal.R.style.Theme_Dialog_Alert);
}
I'm not yet allowed to post external links... I found the above on github in the gingerbread branch in platform_frameworks_base -> core -> java -> android -> app -> AlertDialog.java
The hololauncher uses the AlertDialog.Builder class to create the Dialogs and it uses a TextView Widget to display the text. The layout looks like this:
Code:
<?xml version="1.0" encoding="utf-8"?>
<TextView android:textAppearance="?android:textAppearanceLargeInverse" android:gravity="center_vertical" android:paddingLeft="15.0dip" android:paddingRight="15.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:minHeight="?android:listPreferredItemHeight" android:drawablePadding="14.0dip" />
Here you see, that the textAppearanceLargeInverse definition of the theme is used as text color. And the theme should always be "Theme.Dialog.Alert" since this is hardcoded.
I assume that com.android.internal.R.style.Theme_Dialog_Alert refers to the Theme.Dialog.Alert styledefinition in the ROMs framework-res.apk. So I added the following line to the styles.xml in framework-res.apk -> values/styles.xml inside Theme.Dialog.Alert:
Code:
<item name="textAppearanceLargeInverse">@style/TextAppearance.Large</item>
I hoped that this would overwrite the definition of textAppearanceLargeInverse for the AlertDialog so that I will not use the inherited definition of the dark theme. The color that's referenced by @style/TextAppearance.Large is (contrary to ...Large.Inverse) is #FFFFFFFF or at least close to it.
Unfortunately this does not work and I do not understand why. I got that far to figure all this stuff out and my phone seems little impressed by my effort. It still displays dark text on dark background.
The other changes I made took effect so I do not think that I'm doing something basically wrong. Can anyone help me with that?

Kanalpiroge said:
Hi!
I
Click to expand...
Click to collapse
try this one Guide

Related

[THEME] A Community Honeycomb Theme ** Needs your help ** 5/17/11

****************************************************************************************************
DO NOT FLASH IF YOU DON'T PLAN ON IMPROVING THIS THEME - IT'S NOT READY!
****************************************************************************************************
I think this could be a cool thing. A community built theme.
Partly for me to learn, partly because that's what we are about, right?
I need the help of the talented themers/developers on here though.
My idea:
Take this INCREDIBLE honeycomb theme done by obsessionXYZ (his thread) and port it to our phone.
I am specifically aiming for Trigger 3.2, but I can't see why it would not work for any 2.2 based ROM.
I think just letting everyone throw in their own personal flavor to make this better.
Not going to lie, I have basically done all that I know to do. Not looking for someone to do my work. Looking for someone willing to take this and make it better, but to post what they did. maybe a bit much, but it would be a very cool thing to do and I know a lot of us would learn.
NOTE, for those interested in doing this. STRONGLY suggest looking at Official_Masters thread on using APK Manager to theme.
It is Crazy simple. So much so that I am embarrased to post this thread as any sort of "work" - It was not.
SOMEONE put a lot of time into it (see above - obsessionXYZ), certainly not me.
How would this work?
Well... I'm certain there are a lot of good ways, but the only way I can think of is dropbox or just downloading what I currently have, and make it better.
****************************************************************************************************
DO NOT FLASH IF YOU DON'T PLAN ON IMPROVING THIS THEME - IT'S NOT READY!
****************************************************************************************************
UPDATES (very minor, very much beta)
5.11.11 - made some of the changes birgertime suggested. Got some white in the dropdown notification for text..
now I need to find that (make the text white) for the power menu, and when adding widgets...
DOWNLOAD THE THEME HERE >>>> BETA DOWNLOAD
Here is the wallpaper (doesnt appear the theme is setting it by default yet):
{
"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"
}
KNOWN BUGS:
I do not know how to make the text white, so it's currently black text on a black background. Awesome. Working on it. Go as I learn.
I do not know how to make the volume sliders thin (like honeycomb and the original theme)
Not all of the power menu buttons are blue
Notification dropdown transparent now, original theme has a blue halo on a solid black background
I want it to say "Rotate" not "Auto-Rotation" but I can't find that
The bluetooth toggle does not work, neither does auto rotate. Awesome.
I am sure there are more I have not found yet. Help me find and squash them.
* I am not a fan of this type battery. I plan on changing that soon.
Honeycomb Bootup:
I found a flashable Honeycomb bootup on TeamWhiskey's site (THREAD). You can download the file (CLICK HERE TO DOWNLOAD).
Simply move to internal and flash like a ROM. Bam. Awesome bootup.
Here is it on my phone:
IMAGES:
SPECIAL THANKS - SERIOUSLY, TRULY APPRECIATED
Birgertime - Not only for an AMAZING ROM for us, but the guy has been so patient with my dumb questions. DUMB questions.
Official_Master (his thread and offering help), Junk_Druggler (lots of advice), rel500, buddahlou, shreddintyres, Master&Slave™, and Annex for offering to help (and even do a theme and give me credit, haha) AND the dock in the images above.
you guys get the point. ALMOST EVERY SINGLE PERSON WHO THEMES HAS VOLUNTEERED TO HELP ME! I LOVE THIS COMMUNITY.
I'm certain I forgot people, shoot me a PM if I did. It was not intentional. I am tired.
Yeap, forgot 00.ante who did the themed market (his thread)
JaiThemes did the wallpaper and I just manipulated it in Photoshop to change it from cyan to blue. Didn't do much more than that.
most of those bugs are xml related, simple edits will fix them, I'll download and take a look, I wanna help, since it was this thread that made me want to make a theme
thanks
ld006 said:
most of those bugs are xml related, simple edits will fix them, I'll download and take a look, I wanna help, since it was this thread that made me want to make a theme
thanks
Click to expand...
Click to collapse
That is awesome. Yeah, I haven't a clue how to edit.xml. I also noticed the original that I linked to had a LOT of .jar's which I removed. I'll search more on how to edit.xml. Birgertime was pointing me in the right direction, but I was exhausted last night.
I think I've seen even a better looking one than that. I going to try and find the link.
rel500 said:
I think I've seen even a better looking one than that. I going to try and find the link.
Click to expand...
Click to collapse
Cool. I was impressed, a lot, by the original but am all for a better version.
Remember though, my pics are missing a lot of the coolness the original had. I'm hopeful we can bring that to this.
I already have the boot logo does that affect anything?
s15274n said:
I do not know how to make the text white, so it's currently black text on a black background. Awesome.
I do not know how to make the volume sliders thin (like honeycomb and the original theme)
Not all of the power menu buttons are blue
Notification dropdown is a flat black, original theme has a blue halo look at the top
I want it to say "Rotate" not "Auto-Rotation" but I can't find that
The bluetooth toggle does not work
I am sure there are more I have not found yet. Help me find and squash them.
* I am not a fan of this type battery. I plan on changing that soon.
Click to expand...
Click to collapse
Always looking for something to kill time with - If any of this still needs fixed tonight, I'll do it.
jellette said:
Always looking for something to kill time with - If any of this still needs fixed tonight, I'll do it.
Click to expand...
Click to collapse
If anyone can fix this, I know you can. I would LOVE for you to take a swing at this.
sRs DoLLaR mEnU said:
I already have the boot logo does that affect anything?
Click to expand...
Click to collapse
I only included the bootup if someone wanted it. I actually prefer the stock Trigger boot, so this is not included in the theme.
Since this is a community theme, let's all make Callip do all the work himself!
in /framework-res.apk/res/layout/status_bar_latest_even_content.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<LinearLayout android:layout_gravity="center_vertical" android:orientation="vertical" android:paddingLeft="10.0dip" android:paddingTop="7.0dip" android:paddingRight="10.0dip" android:layout_width="fill_parent" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout android:orientation="horizontal" android:paddingTop="3.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content">
<com.android.server.status.AnimatedImageView android:id="@id/icon" android:layout_width="25.0dip" android:layout_height="25.0dip" android:src="@drawable/arrow_down_float" android:scaleType="fitCenter" />
<TextView android:textSize="18.0sp" android:textStyle="bold" android:textColor="[B][COLOR="red"]#ff000000[/COLOR][/B]" android:ellipsize="marquee" android:id="@id/title" android:paddingLeft="4.0dip" android:fadingEdge="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content" android:singleLine="true" android:layout_weight="1.0" />
</LinearLayout>
<LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content">
<TextView android:textSize="14.0sp" android:textColor="[B][COLOR="Red"]#ff515151[/COLOR][/B]" android:ellipsize="marquee" android:id="@id/text" android:paddingLeft="4.0dip" android:fadingEdge="horizontal" android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" android:layout_weight="1.0" />
<android.widget.DateTimeView android:textSize="14.0sp" android:textColor="[B][COLOR="red"]#ff515151[/COLOR][/B]" android:id="@id/time" android:paddingRight="5.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="4.0dip" android:singleLine="true" />
</LinearLayout>
</LinearLayout>
Those are the three colors for the dropdown notifications. Not sure if you know this, but the hex code is as follows
# <opacity 2-bit hex> <color 6 bit hex>
Click to expand...
Click to collapse
=======================================================
Also to change the text color for the extra menu (this might also fix the power menu text):
in styles.xml
Code:
<style name="Theme.ExpandedMenu" parent="@style/Theme">
<item name="listViewStyle">@style/Widget.ListView.Menu</item>
<item name="windowAnimationStyle">@style/Animation.OptionsPanel</item>
<item name="background">@null</item>
<item name="itemTextAppearance">?textAppearanceLarge</item>
</style>
I believe you can change that ?textAppearanceLarge to ?textAppearanceLargeInverse and it will fix the issue.
==================================================
The power menu icons-> View attachment ic_locks.zip
In my farmework they are named hawk_download, hawk_recovery, hawk_reboot
birgertime said:
Since this is a community theme, let's all make Callip do all the work himself!
in /framework-res.apk/res/layout/status_bar_latest_even_content.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<LinearLayout android:layout_gravity="center_vertical" android:orientation="vertical" android:paddingLeft="10.0dip" android:paddingTop="7.0dip" android:paddingRight="10.0dip" android:layout_width="fill_parent" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout android:orientation="horizontal" android:paddingTop="3.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content">
<com.android.server.status.AnimatedImageView android:id="@id/icon" android:layout_width="25.0dip" android:layout_height="25.0dip" android:src="@drawable/arrow_down_float" android:scaleType="fitCenter" />
<TextView android:textSize="18.0sp" android:textStyle="bold" android:textColor="[B][COLOR="red"]#ff000000[/COLOR][/B]" android:ellipsize="marquee" android:id="@id/title" android:paddingLeft="4.0dip" android:fadingEdge="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content" android:singleLine="true" android:layout_weight="1.0" />
</LinearLayout>
<LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content">
<TextView android:textSize="14.0sp" android:textColor="[B][COLOR="Red"]#ff515151[/COLOR][/B]" android:ellipsize="marquee" android:id="@id/text" android:paddingLeft="4.0dip" android:fadingEdge="horizontal" android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" android:layout_weight="1.0" />
<android.widget.DateTimeView android:textSize="14.0sp" android:textColor="[B][COLOR="red"]#ff515151[/COLOR][/B]" android:id="@id/time" android:paddingRight="5.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="4.0dip" android:singleLine="true" />
</LinearLayout>
</LinearLayout>
Those are the three colors for the dropdown notifications. Not sure if you know this, but the hex code is as follows
=======================================================
Also to change the text color for the extra menu (this might also fix the power menu text):
in styles.xml
Code:
<style name="Theme.ExpandedMenu" parent="@style/Theme">
<item name="listViewStyle">@style/Widget.ListView.Menu</item>
<item name="windowAnimationStyle">@style/Animation.OptionsPanel</item>
<item name="background">@null</item>
<item name="itemTextAppearance">?textAppearanceLarge</item>
</style>
I believe you can change that ?textAppearanceLarge to ?textAppearanceLargeInverse and it will fix the issue.
==================================================
The power menu icons-> View attachment 589674
In my farmework they are named hawk_download, hawk_recovery, hawk_reboot
Click to expand...
Click to collapse
This won't directly help this theme, without the additional resources, but I have moved on to using custom xml's for these types of things, which allows greater control - I feel.
Code:
<item name="textColor">@color/edt_tw_button_text_inversible</item>
Is what the line for primary pop-up menu text looks like lately - while the secondary menus have their own xml.
Anyway, just the way I've started to do it.
jellette said:
This won't directly help this theme, without the additional resources, but I have moved on to using custom xml's for these types of things, which allows greater control - I feel.
Code:
<item name="textColor">@color/edt_tw_button_text_inversible</item>
Is what the line for primary pop-up menu text looks like lately - while the secondary menus have their own xml.
Anyway, just the way I've started to do it.
Click to expand...
Click to collapse
resource is already there, I've done this numerous times with stock frameworks
Depends on the build. JVH, for one, does not contain this in the colors folder and has to be added.
It also does not contain tw_primary_icon_text_light.xml
jellette said:
Depends on the build. JVH, for one, does not contain this in the colors folder and has to be added.
It also does not contain tw_primary_icon_text_light.xml
Click to expand...
Click to collapse
No it's all in the Android resource class
birgertime said:
No it's all in the Android resource class
Click to expand...
Click to collapse
I think you put a comma in my sentence or something, I wasn't saying your way wouldn't work, I was saying mine wouldn't without adding the xml - rather than using the "?textAppearanceLargeInverse "
lol, when I said it wouldn't work, it was a preface to the next part of my next sentence.
jellette said:
I think you put a comma in my sentence or something, I wasn't saying your way wouldn't work, I was saying mine wouldn't without adding the xml - rather than using the "?textAppearanceLargeInverse "
lol, when I said it wouldn't work, it was a preface to my next sentence.
Click to expand...
Click to collapse
Oh LOL, I just misinterpreted that whole conversation.
I'm going to slowly walk away. I should have never doubted your wisdom!
Edit:
lol, when I said it wouldn't work, it was a preface to the next part of my next sentence.
Click to expand...
Click to collapse
Yeah that's the part I misread lol
This is great. If I hadn't drank so much I'd start now. Thank you guys. Not going to lie, sounds foreign to me. Look forward to learning. Thank you both, so much
has anyone seen this thread?
http://forum.xda-developers.com/showthread.php?t=1057234
^ maybe I missed it, but that would only be helpful if you are on CM7 right?
I will try and make the changes birgertime suggested. That seems to make a lot more sense. Jellette, I am way too ignorant for you my friend.. and birgertime, he is just crazy patient with me, ha.
I don't mind publicly embarrassing myself, you guys are awesome.
What J did, Callip, was just make his own XML and define his own colors so he could just make calls to them and know exactly what they are.
Sent from my SGH-T959 using Tapatalk

[CM7 THEME] "WizAL" Theme - Hdpi Only

* * * Due to the huge response here, I've decided to close down this thread * * *
Hi there,
I've spent some time learning how to make my own CM7 theme lately and I thought that I would share my work here in a new thread.
It's still a work in progress and I will most likely update it once in a while; but please remember the 1st rule: do not ask for ETA (timeframe) [and please also do not 'full-quote' long posts unnecessarily].
I've used some different UI text colors and did it kind of the "rough way"; i.e.: the colors will also be changed in some of your installed apps. It's really not the best way to do it, but I find that it does bring something new to the phone anyway... And in some cases [see the pic about storage], I find that it is quite convenient to see which options are actually selectable or not.
Again, this is a work in progress and I'm sure that there will be a few things to improve and I count on everyone's feedback. So if you see things that look weird (some 3G/4G stats icons for example - which I cannot test at the moment) or things you would like to be changed, please let me know and give screenshots... I'll see what I can do about it.
But most of all: try it, if you like it good! if not: trash it! :good:
This is my first real shot at theming so I'm no expert and I'm even less experienced at 'photoshopping'. So from the get go, big thanks to xda members MrDSL and kevin2516 for their respective themes (and guidance) which I picked from and modded.
This theme is transparent statusbar friendly [and look best that way] but to make that happen, you will need to do a slight modification within a smali file inside the SystemUI.apk of you specific build. Details on how to do so can be found here on this post and you can skip the part about changing the png pictures sinces those are changed within the theme already.
Again: this SystemUI.apk file is one a the backbones of cm7 for user interface and changes from build to build --> so the tweak has to be redone for every new nightly installation.
Finally, since I've made this on a PC running Windows, you will get an error message when applying the theme with Theme Chooser saying that the theme is missing assets for your phone's resolution. It's a Theme Chooser's limitation: just choose "Apply anyway" and do not forget to reboot.
I hope you enjoy!
/AL
P.S.: i) XDA apk file attachments are somehow transformed to zip files once downloaded; so don't forget to rename the theme to xx.apk before trying to install; ii) some of the screenshots might be slightly outdated and not fully representative of the current state of work.
Code:
Changelog:
v2.5: [URL="http://forum.xda-developers.com/showpost.php?p=37706912&postcount=47"]Changelog on post 47[/URL]
v2.4-dark: notable visual changes update
Changelog [URL="http://forum.xda-developers.com/showpost.php?p=37249199&postcount=46"]here on post 46[/URL]
Will had newer screenshots to the OP another time...just try it... :p
v2.3 (no final 2.1 and 2.2 released)
Changelog [URL="http://forum.xda-developers.com/showpost.php?p=36211689&postcount=41"]here on post #41[/URL]
v2.0
Changelog [URL="http://forum.xda-developers.com/showpost.php?p=36211689&postcount=34"]here on post #34[/URL]
v1.9
Changelog [URL="http://forum.xda-developers.com/showpost.php?p=34299159&postcount=32"]here on post #32[/URL]
v1.8
Changelog [URL="http://forum.xda-developers.com/showpost.php?p=32832681&postcount=31"]here on post #31[/URL]
v1.7
Changelog [URL="http://forum.xda-developers.com/showpost.php?p=32376000&postcount=28"]here on post #28[/URL]
v1.6
Changelog [URL="http://forum.xda-developers.com/showpost.php?p=32033078&postcount=27"]here on post #27[/URL]
(This will replace v1.5 here)
v1.5
Changelog [URL="http://forum.xda-developers.com/showpost.php?p=31755367&postcount=24"]here on post #24[/URL]
v1.4:
Changelog [URL="http://forum.xda-developers.com/showpost.php?p=31293658&postcount=23"]here on post #23[/URL]
v1.3:
Changelog [URL="http://forum.xda-developers.com/showpost.php?p=28687299&postcount=14"]here on post #14[/URL]
v1.2:
- minor update fixing various small glitches
- retouched the dialer and made it semi-transparent
- fixed patch-9 file on keyboard
- fixed a couple icons that were barely visible
- changed the sms "sent" tag text color and made the box for new messages green
(I suggest using the option 'use black background' for nicer look
-->requires killing messaging cached process to apply or a reboot)
v1.1:
- new ADW app drawer icon;
- fixed the shade of most menu icons (black ones for white bg) and
changed a few of them: settings, edit, delete, emoticons...;
- changed most icons related to mms attachement choices + Gallery icon;
- reverted Install animation back to TouchWizzed green;
- new "Ongoing/Notifications/Carrier text color;
- new mms animation and re-tweaked the new sms one;
- fixed the dialer's call log single-entry selected background
(couldn't read the black text and uggly);
- new Dropbox icon, upload AND download animations;
- fixed dialer's button size and wrongly enable/disable states display (3 action btns)
and pressed background color (no more uggly light blue on those ones ;P -for Coco);
- changed the dialer's ('Manage applications' and others) top Tabs
to TouchWizz style: slightly less light blue and vertical and separators now showing
[and 5-6 icons for it];
- retouched most of the light blue 'pressed' color (there were >10 shades of it...)
-> might still need some patch 9's tweaking for slight light blue shade stretching;
--> still looking to solved the statusbar date display (bg) when dropdown panel is down;
--> looking into modding sms for transparent background and popup dialogs.
v1.0:
- changed many icons and tab icons;
- changed keyboard blue keys color;
- fixed transparency of popup dialogs;
- added statusbar animations for missed call;
- added simple keys (buttons-like) on the dialer;
- fixed the overscroll glow and bars;
- added statusbar animation for new sms;
- made the 'scrollbar_handle_accelerated' semi-transparent;
- fixed the keyboard shift key indicator light;
- fixed the keyboard suggested words strip and font colors;
- ... and a few other things that my old brain forgot
What's themed [can be anywhere from 1 icon only to 700+ (framework): so for you to find out...]:
ADW Launcher
aLogCat
aNotePad
AlarmClockXtreme
Avanced Task Killer
Astro file explorer (*: old one v 2.5.2)
AutoPlus
Battery circle mod
Beautyful Widgets
Browser (stock)
CalcBuddy (wip)
Calendar (TouchWiz style one - see this)
Catlog
Camera
Contacts and Dialer
CpuSpy
DaTuna
DeskClock
Dice Player
Digitally Imported (DI) Radio
Dolphin Browser HD (*: old one v 5.1)
DroidWall
Dropbox
DSP Manager
Email
extendedcontrols (can't remember what this is for??)
FM Radio
Framework
Google Translate
HanPing Pro Chinese Dictionary
Jango Radio
Keyboard (LatinIME stock and Kii keyboard [select their GB built-in theme])
Locus Pro
MIUI Compass
MIUI SoundRecorder
MMS (sms + mms)
Music
Phone
PlayerPro
PlayerPro Blue Wonder Skin
PokerKing Blue
PoliceLights Free
QuickPic
RootExplorer
Settings
Skype
Smart App Protector Free
SoundRecorder
SuperUser
SystemUI
Tapatalk 2 Pro
Terminal
Timeriffic
Torch
Vault (NQ)
Vending (PlayStore)
Widgetsoid
Wifi Analyzer
Wiki Pro
------------
(59 apps as of v2.5 - Feb 8, 2013)
* * * Due to the huge response here, I've decided to close down this thread * * *
OK, here's some use for this reserved spot...
[I mainly wrote this up for myself as a reminder only, but why not share it with you guys right!?!]
How to fix the date overlapping issue in statusbar.
Credits go to Achep
for his JB-style notification panel time/date layout – a big THANK YOU.
His index thread here
Let’s start!
MAKE A NANDROID BACKUP
MAKE A NANDROID BACKUP
MAKE A NANDROID BACKUP
…or at least make an UNDO flashable zip with the original SystemUI.apk in case that you lose the statusbar in the process and are unable to switch the memory card access from it. You could then also access it through the recovery usb sharing option, but the zip is easier…
Tools needed:
- Prior knowledge on decompiling/compiling apks.
- 7-zip
- Notepad++
- Paint.NET
- Apktool or other decompiling/compiling tool
[sorry I have no link for all those at this time – maybe later]
Notes:
- I put some extra details here and there might be errors – thanks for signaling them to me; I’ll do my best to update/correct stuff up as needed;
- I will not answer questions on how to compile/decompile if you do not do your part first and learn about all that stuff. So read about Java and Android development kits, see environment path variables for java… Signing apks or not (for system apps)…
Let’s start for real this time…:
Pull these two files from the nightly zip : framework-res.apk [in \system\framework] and SystemUI.apk [in \system\app] and place them in your apktool folder [c:\apktool in this guide].
Decompiling SystemUI.apk:
Code:
Run: cmd
Load apktool folder:
Code:
cd c:\apktool
Load the framework:
Code:
apktool if framework-res.apk
Decompile SystemUI.apk:
Code:
apktool d SystemUI.apk
You can leave this command prompt window open (or minimize it to tray) as we’ll need it to recompile in not too long…
Enabling transparent statusbar:
Go to C:\apktool\SystemUI\smali\com\android\systemui\statusbar\ folder.
Open StatusBarService.smali with Notepad++ and look for [Search/Find…]:
Code:
invoke-direct/range {v0 .. v5}, Landroid/view/WindowManager$LayoutParams;-><init>(IIIII)V
[this should be around line 2220]
And change the line just above it from:
Code:
const/4 v5, 0x2
to:
Code:
const/4 v5, -0x3
Save the file and exit.
Note:
As is, that part will allow transparent statusbar for themes made for it.
If you do not want to use a custom transparent-enabled theme, you will then have to modify these 2 files in C:\apktool\SystemUI.apk\res\drawable-hdpi\:
statusbar_background.9.png
status_bar_background.9.png
and set their layer transparency level [with Gimp, Photoshop, Paint.NET or whatever] to whatever you like. But be careful: they are .9 files so you should not make the surrounding one pixel border transparent at all. Learn more about handling .9.png files before venturing into this [might write up something about this at another time].
Optionally, you can also modify these 2 files (which are for the notification panel pulldown background and the handle at the bottom):
shade_bg.png
status_bar_close_on.9.png
More info on all this can be found here on post #2 of one of my previous thread.
Otherwise, you can use my WizAL theme from the OP and it will save you the trouble.
Removing the date (and its background) from the pulled down statusbar:
Navigate to and open up: C:\apktooll\SystemUI\res\layout\status_bar.xml
Find [~ 3rd line from the bottom]:
Code:
<com.android.systemui.statusbar.DateView android:textAppearance="@android:style/TextAppearance.StatusBar.Icon" android:gravity="left|center" android:id="@id/date" android:background="@drawable/statusbar_background" android:paddingLeft="6.0px" android:paddingRight="6.0px" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
Change it to:
Code:
<com.android.systemui.statusbar.DateView android:textAppearance="@android:style/TextAppearance.StatusBar.Icon" android:gravity="left|center" android:id="@id/date" android:textColor="@android:color/transparent" android:background="@android:color/transparent" android:paddingLeft="6.0px" android:paddingRight="6.0px" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
Save the file.
Adding AChep’s JB-style Date layout in the pulldown notification panel:
Download the attached zip and extract the 2 smali files from AChep [StatusBarJellyHeaderView.smali and StatusBarJellyHeaderView$1.smali ] and paste them into this folder:
C:\apktool_al\SystemUI\smali\com\android\systemui\statusbar\
Now go to C:\apktool\SystemUI\res\layout\status_bar_expanded.xml and look for:
Code:
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/carrier_label_layout" android:layout_width="fill_parent" android:layout_height="wrap_content">
[around or at line 6]
And paste this code just below:
Code:
<com.android.systemui.statusbar.StatusBarJellyHeaderView android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingRight="37.0dip" />
This previous step is not perfect as I just use some padding between the new date/time layout and the clear button. So that button will move left and right slightly depending on how much space the time takes. I still need to learn how to use RelativeLayouts…so if anyone knows, please share your knowledge.
Now with this mod, there is no room for the carrier label on there; so let’s remove it completely by removing the line directly below the one you’ve just added – so delete this line:
Code:
<com.android.systemui.statusbar.CarrierLabel android:textAppearance="?android:textAppearanceLarge" android:textColor="@color/carrier_label_text_color" android:layout_gravity="center_vertical" android:paddingLeft="4.0dip" android:paddingBottom="1.0dip" android:layout_width="0.0dip" android:layout_height="wrap_content" android:layout_marginLeft="5.0dip" android:layout_marginTop="1.0dip" android:layout_weight="1.0" />
Save file and exit.
We’re now ready to recompile the SystemUI.apk:
Code:
apktool b SystemUI
Go to your desktop and place an untouched copy of your SystemUI.apk file on there [you can copy the one you’ve previously placed in c:\apktool folder if needed].
Right-click on it and select: 7-zip / Open archive.
Now in your C:\apktool\SystemUI\ working folder you will see: a new “build” folder --> open it up and then also open up the “apk” sub-folder.
From it, select these three things: the complete “res” folder, the “classes.dex” file and the “resources.arsc” file and replace the originals by drag-and-dropping them onto your desktop [untouched] opened archive. [answer yes to the file copy popup]. Close the archive and and you’re basically done!!
Just remember that this file is now your modded SystemUI.apk so you can push it to \system\app folder on your phone [do not rename it] through adb or [my preferred method] through the use of CWM recovery flashable zip.
References:
- Go read THIS if you want to learn how to make a CWM recovery flashable zips.
Final Notes:
- I do not recommend to push the resulting file manually [read with RootExplorer or other file managers] because you might make the statusbar disappear or worst case, get into an error loop before you get the chance to set the file’s permissions. So you’ve been warned: use adb or an update zip to push the modded file.
- for this to tweak to display properly, you will have to make sure that you do not choose the “Compact carrier label” option in CyanogenMod settings / Interface / Status bar tweaks.
- Again, play it safe and prepare yourself an undo patch with the original SystemUI.apk.
THE ATTACHED FLASHABLE ZIP IS TO BE APPLIED TO MANIAC103'S 2012NOV07 (Defy or Defy+) BUILDS ONLY
[although maniac's OCT25th (plus/no plus) builds have he exact same SystemUI.apk also...]
AGAIN: the SystemUI.apk changes from build to build and using this zip on another build might break things up;
==> this is why this guide exists:so redo the mod/zip for future (or older) nightly builds.
Cheers
/A
Will you be doin a cm9 version or just cm7?
Sent from my MB525 using XDA
Dude move it to Android Themes!! Really!!
Sent from my MB526 using xda premium
nogoodusername said:
Dude move it to Android Themes!! Really!!
Click to expand...
Click to collapse
I take that you like it then? -thanks.
Well, like I said in the OP, it's my first real attempt at making a theme and it is far from perfect. There are many little glitches I can still see like the date on the statusbar [2nd pic] when the notification panel is down, the general font color change is really also not the best way to do it...
I also have a lot to learn and many things I want to try first.
Although I did spend quite a few hours on this already, I still feel that it is far from meeting my personal quality standards and I would not post for such a wider audience yet; by respect to other themers and users...
Afterall, this is just a personal theme that I share here...
NI55AN said:
Will you be doin a cm9 version or just cm7?
Click to expand...
Click to collapse
When the time comes maybe...
Please, let me do my learning and experimenting first...
But for now, I'm happy with cm7; especially with the level of support that Maniac103 is still bringing to it for us.
Thanks this theme is awesome!
Thanks ALL...its a great work.
Im using it on my defy but....is there any way to change the keyboard theme? Its the only thing I dont like.
And can I ask for something?...Can you make a black or dark version? I mean change all the blue stuff to a black or maybe dark blue...
It´s just and idea/opinion.
Again thanks for the hard work.
ALL for the transparent status bar, you also can enable it using OUT KITCHEN
All you have to do is enable the option "Enable transparency in status bar" in the "Status Bar" tab and upload the SystemUI.apk and the framework-res.apk from the rom you are using.
Then download the zip file and flash it from recovery.
Click to expand...
Click to collapse
Cocolopes said:
Thanks ALL...its a great work.
Im using it on my defy but....is there any way to change the keyboard theme? Its the only thing I dont like.
And can I ask for something?...Can you make a black or dark version? I mean change all the blue stuff to a black or maybe dark blue...
It´s just and idea/opinion.
Again thanks for the hard work.
Click to expand...
Click to collapse
You're welcomed and thanks - I appreciate.
As for your question:
well, as I said, I'm no expert at Photoshop and I know that I'll one day have to redo all this many times... But simple answer is yes - it can easilly be done.
By simply modding 5 picture files basically.. - believe it or not.
Check the zip, do your changes and I could switch it for you.
To replace those file in, you to be familliar patch - 9 format patching and how to compile them... [the kind of stuff I kept post #2 for eventually... Theming/forum posting overdose lately here...]. Once you know that, it would be just a matter of replacing the files in the apk with 7-zip and resigning it... [or re-compile the theme with uncompiled .9.pngs; what I would do..]
But again I could take care of that part for you np... So plz have a go at the PS part - go wild at it!! -hehehe. :good:
great theme
my phone looks better now with this theme..
ksrao_iete said:
my phone looks better now with this theme..
Click to expand...
Click to collapse
Good; I'm glad for you
- - - - -
* * * New UPDATE to v1.1 (June 28 - see changelog) * * *
Enjoy!
/AL
Yo,
I don't know if there's really any interest for it any longer; 31 downloads for over a 1,000 views... (maybe most users are on ICS)...
But anyhow, v1.2 attached on OP.
Cheers,
/A
Just installed..yippy.........what attracted me your theme are dialer and the colors u applied for sms notifiication icon with animation in status bar..that really really nice...
---------- Post added at 03:57 PM ---------- Previous post was at 03:54 PM ----------
mr AL i hope you too want to try that theme in ICS..
Yo,<br />
<br />
I don't know if there's really any interest for it any longer; 31 downloads for over a 1,000 views... (maybe most users are on ICS)...<br />
<br />
But anyhow, v1.2 attached on OP.<br />
Cheers,<br />
/A
Click to expand...
Click to collapse
I think so...Im waiting for the ICS....
Sent from my MB525 using xda premium
Nice theme :good:
Happy Friday the 13th all!!
Here's maybe what will be my last update for this theme (we'll see about that...).
My guess is that well over 100 pics were added or retouched since v1.2.
And here's a rough changelog:
Code:
- Blue themed FM radio and icon
- Colored stat icons for Skype status: oh yeah! - finally!!
- ICS-style installation progress bar
and slight changes to:
- Tapatalk pro
- AdvanceTaskKiller
- DI Radio (Digital Interactive)
- SoundRecorder (colored the 3 buttons from white)
- Wiki Pro
- Email checkmarks
- Player Pro logo and stat icons
- SU icon
- DSP icon
- 3 text selectors color
- Terminal icon
- dialers buttons again
...and many single changes here and there
So go to the OP for the apk
Cheers
/A
P.S.: And sorry for the ones waiting for the ICS version of the theme: don't hold your breathe on this.
I've had good intentions of doing it (especially after seeing full HWA finally working), but after trying CM9 again,
I just don't like it and don't think I'll ever move to it. Maybe for Jelly Bean... who knows!?!
[] AL [] said:
Happy Friday the 13th all!!
Click to expand...
Click to collapse
AL, thanks for the theme, i liked it verymuch, am still on cm7.1.RC.1.5.jordan, am uisng v1.3 and looks like i hv a bug in the dialer,
numberpad 3/6/9/# column are cutoff, i can see only D/M/W chars on these number pad.
check the attachment,
Anyways am unsing touch pal dialer, not a big issue.
request: is it possible to add antenna with 'Y', check this http://forum.xda-developers.com/showthread.php?t=1277549, forget abt the color of the bar if its too difficult, atleast Y in the signal icon ???
-thx
hanu_blr said:
AL, thanks for the theme, i liked it verymuch, am still on cm7.1.RC.1.5.jordan, am uisng v1.3 and looks like i hv a bug in the dialer,
numberpad 3/6/9/# column are cutoff, i can see only D/M/W chars on these number pad.
check the attachment,
Anyways am unsing touch pal dialer, not a big issue.
request: is it possible to add antenna with 'Y', check this http://forum.xda-developers.com/showthread.php?t=1277549, forget abt the color of the bar if its too difficult, atleast Y in the signal icon ???
-thx
Click to expand...
Click to collapse
Hi and thanks - I'm glad you like the theme.
I really don't know why the dialer doesn't display properly for you.
Did you do like I clearly stated on the OP and reboot your phone after applying the theme?
Are you using a non-standard screen dpi setting by any chance??
For the Y-shaped signal statusbar icon, I've never seen or used a theme with 5 bars, so I would not know off-hand how to do it. But I'm sure that it would take more than just different pics. So if you know of such a theme, give me a link to it and I "might" have a look into it. But I can tell you right away that I'll be extremely busy for the next 2-3 weeks and will likely not have any time for this - sorry.
But anyhow, I put something together for you (very quickly - I did not even try it to see how it looks..); so try it to see if it fits your taste.
The first state of signal reception will show the first 2 bars and the no signal state will show a very dimmed first bar. And as usual, you'll get the full colors when Google is 'connected' and ready to sync (on wifi or 3G, 4G...)
Otherwise, I suggest that you try to do it yourself; it fairly easy to do. On your destop, use 7-zip and right click on the apk and chose "Open archive" [not Extract just Open], navigate to "WizAL.apk/res/drawable-hdpi" folder and find the signal pictures. They're all named "stat_sys_signal_X.png" or "stat_sys_signal_X_fully.png" (where X is 0 to 4 --> so 10 pictures total). Do your changes and replace them in. Re-sign the apk, re-install, re-apply and rebooot: done!
If you're not familiar with apk signing, you can do it straight on your phone: just look for something like "zipsigner 2" on the Playstore.
Lastly, if you like my work (and this answer): don't be shy and hit that "Thank" button - it's the least you can do and it's free.
At least, it shows a little more appreciation.... I'm sure that you can imagine how long a 1,200+ pictures (all the picture editing and related xml entries) take to put together...
Cheers,
/AL
P.S.: I strongly suggest you to update your CM7 to Maniac103's latest build. You're really missing out on many great improvements and bug fixes by staying on CM7 RC1.5....and who knows if you're dialer display problems is not also related to this !? [it really shouldn't but still...]
[] AL [] said:
Hi and thanks - I'm glad you like the theme.
Click to expand...
Click to collapse
Thanks AL, i did as u said to reboot after applying the theme.
I still see the dail pad issue.
I did try ur quick fix theme, it looks good on non-transparent bg, but since its transparent bar, so its little hard to see the colors. attached both screen shots..
Anyways thanks for it . I hv not yet edited any themes till now and my PS skills are bad
May be ur default singnal bar color shd look good i guess.
I have seen some themes, but dint remember it now
Yes am on old 7.1 1.5RC version for a very long time. Have to update to ur suggested build.
thanks for ur time .
hanu_blr said:
Thanks AL, i did as u said to reboot after applying the theme.
I still see the dail pad issue.
I did try ur quick fix theme, it looks good on non-transparent bg, but since its transparent bar, so its little hard to see the colors. attached both screen shots..
Anyways thanks for it . I hv not yet edited any themes till now and my PS skills are bad
May be ur default singnal bar color shd look good i guess.
I have seen some themes, but dint remember it now
Yes am on old 7.1 1.5RC version for a very long time. Have to update to ur suggested build.
thanks for ur time .
Click to expand...
Click to collapse
OK, thanks for the info; I will try to investigate the dialer...eventually (really don't know when I'll find time for that..)
Maybe your 3rd party dialer interferring with it? Have you tried to uninstall it to see if my theme's dialer becomes OK?
I don't know really; here I use 1.3 since I've posted it and all is fine...
OK, regarding your icons, try this new one, I think it should be better... I did it too quickly the first time and didn't think too much about it...
Cheers,
/A
[] AL [] said:
OK, thanks for the info; I will try to investigate the dialer...eventually (really don't know when I'll find time for that..)
Maybe your 3rd party dialer interferring with it? Have you tried to uninstall it to see if my theme's dialer becomes OK?
I don't know really; here I use 1.3 since I've posted it and all is fine...
OK, regarding your icons, try this new one, I think it should be better... I did it too quickly the first time and didn't think too much about it...
Cheers,
/A
Click to expand...
Click to collapse
Simply Awesome...the changes really looks best for my baby defy ....sing CM7.2 stable, Wizal theme, launcher pro, Defy Red lens
[] AL [] said:
OK, thanks for the info; I will try to investigate the dialer...eventually (really don't know when I'll find time for that..)
/A
Click to expand...
Click to collapse
AL,
i did try uninstalling the 3rd party dialer, didnt help. No need to worry, hv alternatives 3rd party dialer
The new icons looks very good now , thanks for ur time.

Add Wimax toggle to Power Widget

I have been helping Sinistertensai with his ShenduOS port for the HTC EVO 4G. I got Wimax to work and was wanting to see if anyone knows how to add a Wimax toggle to the power widget dropdown from the status bar. The port is CM7 based. In the SystemUI.apk I see there is WimaxButton.smali. I have tried adding the ids for it in public.xml and creating pngs for the toggle. I get no errors on compile but I get reboots or force closes when I try to bring up the power widget dropdown. I have very limited experience with editing smail code. I have also tried copying over the resources, classes, and xmls to the original apk with the same results. I have researched how to edit smali but I could just be doing it wrong or leaving something out. This has been driving me to madness. If anyone could help out that would be amazing!
Is there a reason you can't rebuild from source with Wimax enabled?
Sent from my SCH-R760 using Tapatalk 2
The ShenduOS SystemUI has been changed drastically and I cannot find the source code. That would require me to completely redo what Shendu has done and is well beyond my capabilities. The functionality for the wimax is there, I just need to find a way to add the toggle button. The actual widget has a wimax toggle which works, just not the one in the status bar.
Sent from my EVO using xda premium
I have only done smali a few times. How I did it was for example get a cm build going. Remove all wimax toggle related noti widget elements. Compile. Now you have a systemui base. Now build with the wimax toggle. You have a wimax toggle systemui.
Then use a program like beyond compare and after apktooling both systemui in their own folders. Compare the smali differences. Should get you pretty close. Of course there will be some trial and error if the systemui is different then that of cm.
Sent from my Galaxy Nexus using xda premium
The code is quite different that the CM7 code. I have found what needs to be edited, it just results in reboots upon clicking on the status bar to open the powerwidget dropdown. Here are the steps I take:
Decompile SystemUI.apk
In PowerWidget.smali -> replace both instances of toggleNetworkMode with toggleWimax
In WimaxButton.smali -> write down ids from method updateState (0x7f0200ca is off, 0x7f0200cb is on)
In public.xml -> Removed bad APKTOOL_DUMMYs for above ids. Add the following lines:
<public type="drawable" name="stat_wimax_off" id="0x7f0200ca" />
<public type="drawable" name="stat_wimax_on" id="0x7f0200cb" />
In res/drawable-hdpi -> Created on/off images and placed them there
In drawables.xml -> Removed bad APKTOOL_DUMMYs for above ids that were set to false. Add the following lines:
<item type="drawable" name="stat_wimax_off">true</item>
<item type="drawable" name="stat_wimax_on">true</item>
Recompiled
Pushed to phone with adb and cleared dalvik cache
Reboot
I have also tried pushing the changes and overwriting the ones in the original using Archive Manager(Ubuntu) with the same issues. If someone could point out what I am doing wrong that would help alot! I could have broken my tools(Android Utility/apktool). Feel free to give it a shot if you want. Once I/someone gets it right I will write up a tutorial.

JAVA class ImageButton animation on click before next activity

Greetings, I hope someone can help. I know the solution is "simple" - as in, a few words or lines to change. I just cannot figure it out.
I have an app. It's on the Play Store and fully functional, and so now I am trying to improve the UI. I am having trouble with MainActivity.java for a specific goal.
OBJECTIVE: an ImageButton on click animation and then next activity launches:
(1) User clicks image button
(2) Image button is animated (according to an anim XML file)
(3) THEN next activity is launched after button shows the animation
What I can already do:
I can make next activity just launch, no animation (code below shows this lack of animation)
I can make the image animate on click, but not launch next activity.
I can make it do both at the same time (animation starts but then is quickly interrupted by next activity)
MainActivity.java
Code:
/** Help Page Activity No Animation*/
public void gotohelp(View view) {
Intent intent = new Intent(this, HelpPageActivity.class);
startActivity(intent);
}
anim_rotate.xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/linear_interpolator">
<rotate
android:fromDegrees="0"
android:toDegrees="360"
android:pivotX="50%"
android:pivotY="50%"
android:duration="500"
android:startOffset="0"
android:repeatCount="1"
android:repeatMode="reverse" />
</set>
activity_main.xml:
Code:
<ImageButton
android:autoLink="web"
android:linksClickable="true"
android:id="@id/questionButton"
android:background="#00000000"
android:src="@drawable/question"
android:adjustViewBounds="true"
android:scaleType="fitCenter"
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_weight=".25"
android:onClick="gotohelp"
android:contentDescription="@string/question" />
MainActivity.Java whole file is here: http://pastebin.com/4HztRmK3. Relevant code starts at line 196.
Thanks X 1000 for any help. If I pull out any more hair I will need to join a club.
I know I might have to go to StackOverflow with this but I love my XDA peeps. I'm bumping this just one time, because it has almost no views...
Anybody happen to know what I'm missing here?

How to change battery percentage text color?

Hello everyone,
I got Galaxy S5 running Lollipop. So far I have extracted SystemUI.apk and I have made some changes to Wifi/ Signal icons in my GS5 like making these look like Nexus 6. And Now I want to make my battery percentage text from white to black. I know to do it, we have to change some text in some XML file. But I can't find that file. So would anyone help me with this?
thanks
galaxyuser15 said:
Hello everyone,
I got Galaxy S5 running Lollipop. So far I have extracted SystemUI.apk and I have made some changes to Wifi/ Signal icons in my GS5 like making these look like Nexus 6. And Now I want to make my battery percentage text from white to black. I know to do it, we have to change some text in some XML file. But I can't find that file. So would anyone help me with this?
thanks
Click to expand...
Click to collapse
I haven't personally looked at it because I use 3minit battery. A good guess would be colors.xml in values folder or systemui? Not for sure though. There are a lot of color changes in there. Good luck!
If it is like JB...
You should go to res/layout/status_bar.xml (maybe its called "tw_staus_bar.xml") and find this line:
Code:
<TextView android:textSize="16.0sp" android:textColor="#ffffffff" android:id="@id/percentage" android:paddingLeft="4.0dip" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" />
You should change "android:textColor="#anycolour"" to the colour you want.
I hope this helps :good:
XDA Rule
galaxyuser15 said:
Hello everyone,
I got Galaxy S5 running Lollipop. So far I have extracted SystemUI.apk and I have made some changes to Wifi/ Signal icons in my GS5 like making these look like Nexus 6. And Now I want to make my battery percentage text from white to black. I know to do it, we have to change some text in some XML file. But I can't find that file. So would anyone help me with this?
thanks
Click to expand...
Click to collapse
Please post on the right forum.
Any questions you may have should be posted in this forum:
http://forum.xda-developers.com/galaxy-s5/help
#XDA Rule No. 15

Categories

Resources