Help with menu popup. - Android Themes

I own a Orange San Francisco (ZTE Blade) and i have been trying to get black menu popups to work properly. They are sorted for main screen and most apps like gmail etc. However certain apps like Root Explorer still had white menus and it was impossible to read them with white text too (from the black parts!).
I got these instructions from someone...
Mike_P said:
Can't comment on other apps that have white menus but I followed what was in 2.1 theme and it seemed to work in 2.2 (well in RootExplorer at least).
You need to edit the res\values\styles.xml and the res\drawable\menu_selector.xml.
In styles.xml add the 5th 'item name' line like below...
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>
<item name="itemBackground">@drawable/menu_selector</item>
</style>
In menu_selector.xml add the 'item android drawable' line at the end like below...
Code:
<?xml version="1.0" encoding="UTF-8"?>
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="true" android:state_pressed="true" android:drawable="@drawable/highlight_pressed" />
<item android:state_enabled="false" android:state_selected="true" android:drawable="@drawable/highlight_disabled" />
<item android:state_enabled="true" android:state_selected="true" android:drawable="@drawable/highlight_selected" />
<item android:state_focused="true" android:state_enabled="false" android:drawable="@drawable/highlight_disabled" />
<item android:state_focused="true" android:state_enabled="true" android:drawable="@drawable/highlight_selected" />
<item android:drawable="@drawable/screen_background_dark" />
</selector>
Click to expand...
Click to collapse
This all seemed to go ok but i have a few white lines plaguing an otherwise perfect look.
In this first image everything is fine other than the line that seperates top and bottom icons...It's really bright obvious white. What can i do to fix this?
{
"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"
}
Then this menu has an obvious white line around the edges. But separators are fine. Any ideas on this part too?
Thanks for any help in advance.
EDIT:
Oh it should be noted i have tried images from a gingerbread theme that has these menu parts coloured correctly so it's not a .png anywhere. It's somethign in styles.xml or somethign else

http://forum.xda-developers.com/showthread.php?t=865753
this theme is what you want

Related

[TUTORIAL]Theme for Helicopter Game with images

Here is an official tutorial for how to design a theme for "Helicopter Game" which is available in the market.
{
"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"
}
Step 1 - create a new android project using the following settings:
build target 2.2
create activity: main
min sdk version 4
Step 2 - create a new android xml in res/values called theme_config.xml
Fill in these details
Code:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<integer name="red">0</integer>
<integer name="green">186</integer>
<integer name="blue">255</integer>
<integer name="fred">0</integer>
<integer name="fgreen">0</integer>
<integer name="fblue">0</integer>
<bool name="randomSmoke">false</bool>
</resources>
red, blue, and green are for the background color
fred, fgreen, and fblue are for the font color
randomSmoke is a boolean (if true it will rotate the smoke particles randomly - set to true by default)
Step 3 - Edit res/values/strings.xml and add your app name, so it should look something like this:
Code:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="hello">Hello World, main!</string>
<string name="app_name">HGTheme: Shark</string>
</resources>
Step 5 - Edit your AndroidManifest.xml file, add in the following intent filters
Code:
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".main"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="com.fkarim.helicopter.THEMES" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<intent-filter>
<action android:name="com.fkarim.helicopter.ACTION_PICK_ICON" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
Step 6 - make your images and put them in res/drawable
you need the following images:
cavewalls.png (240 x 240)
roof.png(240 x 240) - optional if you want a different colored cave ceiling
copter.png (around 120 x 50)
obstacles.png (50 x 100)
smoke.png (32 x 32)
Step 7 - publish your app
If you need some help for how to publish an app check out this article:
http://www.devx.com/wireless/Article/39972/1954
make sure the name starts with "HGTheme :" (and should have "helicopter game theme" in the description for now) so its easy for people to search for it in the market.
Thanks for reading the tutorial. I will be posting an example theme soon with the source code also.
I've released two themes in the market. Here is the packaged source of the shark theme if anyone would like to take a look.
I have added two other features, the ability to prevent the smoke from being rotated and having a different image for the roof and floor of the cave. If anyone is interested in designing a theme, please let me know if you need help.

[Q] Theme Stock MMS.apk

Made a few of these before, gotten some help from some wonderful people... here we go again:
How do you change the text color of these two items:
{
"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"
}
I also (and this is the one I need more help on) want to make it so the text aligns to the right, instead of to the left.
Found in /res/value/colors.xml:
Code:
<color name="timestamp_color">#bf000000</color>
Which can change the timestamp color.

			
				
Text Color
res\layout\message_list_item.xml:
Code:
<TextView android:textAppearance="?android:textAppearanceSmall" android:textSize="18.669983sp" android:textColor="[COLOR="Red"]#ff91ce00[/COLOR]" android:autoLink="all" android:linksClickable="false" android:id="@id/text_view" android:layout_width="fill_parent" android:layout_height="wrap_content" />
Also if you add this " android:gravity="right" " inside the <textview> that should do the trick.
Sent from a Senendipity Captivate.
Dang Chance, you know lots of stuff.
Any way to change the color of the mms bubbles?
The Mms bubbles are easy... they are just images.
Thanks Chance, I figured one of you fine folks would know.
Sent from my SAMSUNG-SGH-I897 using XDA App
Finished the thread menu:
Looking awesome! Are we going for pure stock look or can we add some ginger green?
Sent from a Senendipity Captivate.
Whatever looks nice.
The only thing left really is the bubbles:
I say we change the alpha value on the time in the list view and make it green.
Sent from a Senendipity Captivate.
It's kind of an ugly gray, so it needs to be changed.
So, any idea where the color for the time is?
Time Color
MikeyMike01 said:
So, any idea where the color for the time is?
Click to expand...
Click to collapse
Short answer: Yes I think I do.
It is making a call to the twframework-res.apk for the text appearance but, when I try to change it, the resulting apk will just FC.
I think this is the line we need to modify...
\res\layout\conversation_list_item.xml
Code:
<TextView android:textAppearance="@touchwiz:style/TwTextAppearanceListTwoLineSecondaryGrey" android:id="@id/date" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="3.0dip" android:layout_marginTop="2.0dip" android:layout_marginRight="5.0dip" android:layout_marginBottom="7.0dip" android:singleLine="true" android:layout_alignParentRight="true" android:layout_alignParentBottom="true" />
Here is the styling from the twframework-res.apk
\es\values\styles.xml
Code:
<style name="TwTextAppearanceListTwoLineSecondaryGrey">
<item name="android:textSize">14.0sp</item>
<item name="android:textStyle">normal</item>
<item name="android:textColor">@color/tw_textappearance_listtwolinesecondarygrey</item>
</style>
Okay the @color is referencing the
\res\color\tw_textappearance_listtwolinesecondarygrey.xml
Code:
<item android:state_enabled="false" android:state_pressed="true" android:color="#80ffffff" />
<item android:state_pressed="true" android:color="@color/tw_color002" />
<item android:state_selected="true" android:color="@color/tw_color001" />
<item android:state_focused="true" android:color="@color/tw_color001" />
<item android:state_enabled="false" android:color="[COLOR="Red"]#80ffffff[/COLOR]" />
<item android:color="@color/tw_color005" />
That is the value that is giving us the grey color we see.
tw_color001 = white (#ffffffff)
tw_color002 = black (#ff000000)
if you want to make it just plain white change the 80 to ff. Don't know if you know the color code make up but the frist two are the alpha or "transparency" value, the other six are the color code.
I have a meeting to go to tonight and then the GF wants to see me so I won't be back to play with this until late tonight.
Thanks,
ChanceM
Should be able to change:
Code:
<item name="android:textColor">@color/tw_textappearance_listtwolinesecondarygrey</item>
To something like:
Code:
<item name="android:textColor">#ffffffff</item>
Meanwhile I started working on the buttons:
I think it looks nice.
MikeyMike01 said:
Should be able to change:
Code:
<item name="android:textColor">@color/tw_textappearance_listtwolinesecondarygrey</item>
To something like:
Code:
<item name="android:textColor">#ffffffff</item>
Click to expand...
Click to collapse
yeah you could but if your going to go ahead and recompile the twframework-res.apk you might as well change it at the last level...Idk just a personal pref thing. (Although since we are making changes to the twf that might affect the calendar and calc as those probably make calls here too.)
Yeah the balloons are looking nice there.
Are you going to change the textfield image to something green as well?
Looks awesome. Impatiently waiting for release
ChanceM said:
Yeah the balloons are looking nice there.
Are you going to change the textfield image to something green as well?
Click to expand...
Click to collapse
The stuff at the bottom? It's system-wide.
Did the other side bubbles:

[REQ] help to finish a battery charge animation

I am trying to finish off a new status bar battery/charge animation on my Htc Desire Froyo.
I have all the png's I think I need but they do not display how I would like.
The problem is that when the battery is fully charged but still connected to a power supply, the stat_sys_battery_charge_anim100.png is not displayed and is replaced by stat_sys_battery_100.png.
It obviously knows it is fully charged and still connected because the LED switches from orange (charging) to green (charged) and off (disconnected).
{
"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"
}
stat_sys_battery_100.png
stat_sys_battery_charge_anim100.png
I assume it has nothing to do with the stat_sys_battery_charge.xml or stat_sys_battery.xml and I need to edit something elsewhere, but what/where?
Also, ic_lock_idle_charging.png works fine on the lockscreen but how could I get that to change to another image when fully charged and still connected to a power supply?
As side notes:
stat_sys_battery_100.png down to stat_sys_battery_0.png display ok when not charging.
stat_sys_battery_charge_anim0.png to stat_sys_battery_charge_anim99.png display ok when charging.
I also renamed a copy of stat_sys_battery_charge_anim100.png to stat_sys_battery_charge_animfull.png but I have never seen that entered in any stat_sys_battery_charge.xml, so I do not know what might call up that image anyway.
Any help would be greatly appriciated.
Sorry if this thread is in wrong section or answered previously, I did search for quite some time and in various ways but perhaps wrong search terms.
post your charge xml
Sorry about that. I had forgot I broke the links in the OP when I changed file hosting sites.
Should be fixed now.
Change
<item android:drawable="@drawable/stat_sys_battery_charge_anim100" android:maxLevel="101" />
to
<item android:maxLevel="101">
<animation-list androidoneshot="false"
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:duration="2000" android:drawable="@drawable/stat_sys_battery_charge_anim100" />
<item android:duration="80" android:drawable="@drawable/stat_sys_battery_charge_anim100" />
</animation-list>
</item>
Did you add the new values in the android.xml file?
Sent from my Nexus S using XDA App
Thank you for your responces. I will take a look later (if I get time).
@santiemanuel
Last night I editted stat_sys_battery_charge.xml but it hasd the same result.
When charging the icons shown were:
stat_sys_battery_charge_anim98.png (orange LED on)
stat_sys_battery_charge_anim99.png (orange LED on)
stat_sys_battery_100.png (green LED on)
Removed charger lead:
stat_sys_battery_100.png (LED off)
stat_sys_battery_charge.xml Please check I have editted this correctly?
nbeebe24 said:
Did you add the new values in the android.xml file?
Sent from my Nexus S using XDA App
Click to expand...
Click to collapse
No and I have not seen android.xml, did you mean AndroidManifest.xml in framework-res.apk?
I have looked in framework-res.apk\res\values\public.xml and all the values (eg. stat_sys_battery_charge_anim100, stat_sys_battery_charge_animfull, ect) that are in stat_sys_battery_charge.xml are in public.xml.
I am not sure that information ^ has any relevance to this conversation or not. Sorry if I am plucking at straws.
@nbeebe24
&
@santiemanuel
Do you think the problem is not the stat_sys_battery_charge.xml but deeper issue in the rom?
I also tried this but same result again stat_sys_battery_charge.xml
I don't quite understand what your trying to achieve. You want that battery animation to be the same as the others? Why don't you try the uot kitchen?
Sent from my Nexus S using XDA App
At the moment my "counting" charge animation runs from 00 to the current charge percentage, stays on that percentage for a short time, then starts again. Like the animation in my signature strip.
But the problem is that when the battery is charged to 100% it counts from 00 to 99 but fails to use stat_sys_battery_charge_anim100.png or stat_sys_battery_charge_animfull.png, instead it shows stat_sys_battery_100.png.
So, even with the charge lead still connected, the end of the "counting" charge animation looks like this.
stat_sys_battery_charge_anim97.png
stat_sys_battery_charge_anim98.png
stat_sys_battery_charge_anim99.png
stat_sys_battery_100.png
What I am trying to achieve is when the charge lead is still connected and at 100%, I want it to use either stat_sys_battery_charge_anim100.png or stat_sys_battery_charge_animfull.png (or both) so I can get it to look like this.
stat_sys_battery_charge_anim97.png
stat_sys_battery_charge_anim98.png
stat_sys_battery_charge_anim99.png
stat_sys_battery_charge_anim100.png or stat_sys_battery_charge_animfull.png
Then when I unplug the charge lead, it shows
stat_sys_battery_100.png
LfcFan1977 said:
At the moment my "counting" charge animation runs from 00 to the current charge percentage, stays on that percentage for a short time, then starts again. Like the animation in my signature strip.
But the problem is that when the battery is charged to 100% it counts from 00 to 99 but fails to use stat_sys_battery_charge_anim100.png or stat_sys_battery_charge_animfull.png, instead it shows stat_sys_battery_100.png.
So, even with the charge lead still connected, the end of the "counting" charge animation looks like this.
stat_sys_battery_charge_anim97.png
stat_sys_battery_charge_anim98.png
stat_sys_battery_charge_anim99.png
stat_sys_battery_100.png
What I am trying to achieve is when the charge lead is still connected and at 100%, I want it to use either stat_sys_battery_charge_anim100.png or stat_sys_battery_charge_animfull.png (or both) so I can get it to look like this.
stat_sys_battery_charge_anim97.png
stat_sys_battery_charge_anim98.png
stat_sys_battery_charge_anim99.png
stat_sys_battery_charge_anim100.png or stat_sys_battery_charge_animfull.png
Then when I unplug the charge lead, it shows
stat_sys_battery_100.png
Click to expand...
Click to collapse
Is the full battery animation added to the battery charge XML?
Sent from my Nexus S using XDA App
Sorry, I am not quite sure if this answers your question. If not, please re-phrase.
This is what the final part of stat_sys_battery_charge.xml looks like.
Code:
<item android:duration="80" android:drawable="@drawable/stat_sys_battery_charge_anim93" />
<item android:duration="80" android:drawable="@drawable/stat_sys_battery_charge_anim94" />
<item android:duration="80" android:drawable="@drawable/stat_sys_battery_charge_anim95" />
<item android:duration="80" android:drawable="@drawable/stat_sys_battery_charge_anim96" />
<item android:duration="80" android:drawable="@drawable/stat_sys_battery_charge_anim97" />
<item android:duration="80" android:drawable="@drawable/stat_sys_battery_charge_anim98" />
<item android:duration="80" android:drawable="@drawable/stat_sys_battery_charge_anim99" />
<item android:duration="2000" android:drawable="@drawable/stat_sys_battery_charge_anim100" />
</animation-list>
</item>
<item android:drawable="@drawable/stat_sys_battery_charge_anim100" android:maxLevel="101" />
</level-list>
Even with the changes that santiemanuel suggested, it still finishes as described in post #11.
And it is the same if I replace stat_sys_battery_charge_anim100 with stat_sys_battery_charge_animfull.
If I were you I would just rename the full animation to the 100 percent, and the unplug to the full
Sent from my Xoom using XDA App
I don't think that the image names or the contents of the two xml's sre the problem.
I have tried numerous edits to the stat_sys_battery_charge.xml but
stat_sys_battery_charge_animfull.png
and
stat_sys_battery_charge_anim100.png
are not getting displayed at any point.
Only
stat_sys_battery_100.png
is being displayed after
stat_sys_battery_charge_anim99.png
I want and would expect the images listed in stat_sys_battery_charge.xml to be displayed when the charge lead is still connected.
And the images listed in stat_sys_battery.xml to only be displayed when the charge lead is disconnected.
When connected to the charge lead, at 0% to 99% something tells the notification LED to light up orange and at 100% it is told to turn green, what could that be?
I think (what ever it is) it should be telling the stat_sys_battery_charge.xml to stay active when the charge lead is connected and only swap to using stat_sys_battery.xml when the charge lead is disconnected. Not swap when the battery charge percentage reaches 100%.
Does that sound right?

[4.2] [QuickSettings] How to add new toggles to 4.2 Android

Original Post By Lithid-cm . Quoted Here so some can Learn​
lithid-cm said:
This is just going to be a quick rundown on what do to add new toggles to android new QuickSettings system. This will take place in SystemUI.
Custom QuickSettings Toggles
{
"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"
}
Path: frameworks/base/packages/SystemUI
Files:
src/com/android/systemui/statusbar/phone/QuickSettings.java
There are two options when creating a toggle.
addSystemTiles:380 - Static tiles with useful information.
addTemporaryTiles:571 - This type of tile will get removed without activity, for example, the alarm quick setting is a temp tile.
I used SystemTiles
Code:
// CpuInfo tile
QuickSettingsTileView cpuInfoTile = (QuickSettingsTileView)
inflater.inflate(R.layout.quick_settings_tile, parent, false);
cpuInfoTile.setContent(R.layout.quick_settings_tile_cpuinfo, inflater);
cpuInfoTile.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
startSettingsActivity(Intent.ACTION_POWER_USAGE_SUMMARY);
}
});
mModel.addCpuInfoTile(cpuInfoTile, new QuickSettingsModel.RefreshCallback() {
@Override
public void refreshView(QuickSettingsTileView view, State state) {
ImageView iv = (ImageView) view.findViewById(R.id.cpuinfo_image);
TextView tva = (TextView) view.findViewById(R.id.cpuinfoa_textview);
TextView tvb = (TextView) view.findViewById(R.id.cpuinfob_textview);
Drawable d = mContext.getResources().getDrawable(R.drawable.ic_settings_performance);
String GOV = fileReadOneLine(GOV_FILE);
String FREQ = fileReadOneLine(SCALE_CUR_FILE);
iv.setImageDrawable(d);
tva.setText(GOV);
tvb.setText(FREQ);
view.setContentDescription(
mContext.getString(R.string.accessibility_quick_settings_cpuinfo, GOV));
}
});
parent.addView(cpuInfoTile);
src/com/android/systemui/statusbar/phone/QuickSettingsModel.java:174
This is needed for the widget inside the toggle to get updated. You can view other definitions in here to update various states.
Code:
private QuickSettingsTileView mCpuInfoTile;
private RefreshCallback mCpuInfoCallback;
private State mCpuInfoState = new State();
res/layout/quick_settings_tile_cpuinfo.xml
This is where we create the layout of the tile and call it from java.
Code:
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2012 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:orientation="vertical">
<ImageView
android:id="@+id/cpuinfo_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:paddingBottom="10dp"
/>
<TextView
style="@style/TextAppearance.QuickSettings.TileView"
android:id="@+id/cpuinfoa_textview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:textColor="#287AA9"
android:gravity="center"
/>
<TextView
style="@style/TextAppearance.QuickSettings.TileView"
android:id="@+id/cpuinfob_textview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:textColor="#287AA9"
android:gravity="center"
/>
</LinearLayout>
res/values/strings.xml
Needed to setContentDescription()
Code:
<string name="accessibility_quick_settings_cpuinfo">CpuInfo <xliff:g id="meminfo" example="CpuInfo">%s</xliff:g>.</string>
I know this is a very general overview, but the actuality is there is so much that can be done with this, it would be hard to go into extreme detail. Would be better to just simply leave that stuff for questions in this thread.
If you want to know more, please just ask. Lets make android OURS!​
Click to expand...
Click to collapse

[MINI CODE MOD][2.3+] Colored Battery Percentage Text Level (left of battery) !

Hello guys, welcome to my new small work on eclipse.. This is a minor mod on Battery Text Level to make it a little bit colorize..
What is it for ?
Lots of users use battery % text on the left of battery icon and its color is white.
This will change color otomatically to;
BatteryLevel %0 - %9 >> RED
BatteryLevel %10 - %19 >> ORANGE
BatteryLevel %20 - %100 >> WHITE
{
"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"
}
Small Guide
Download file and unpack it. You will see com/erhany/ColoredBatteryText** ( 2 smali files)
Decompile SystemUI.apk and copy erhany folder inside smali/com folder.
ICS+, CM..
go to res/layout/ statusbar xml file, find battery text line if you have. add android:visibility="gone" into it and then rewrite same code
starting with <com.erhany.ColoredBatteryText ... and dont type android:visibility="gone" into this one.
If you dont have battery text line above battery; start with <com.erhany.ColoredBatteryText ... and you can use your clock line codes or how you want to set it..
* I can't give full code line, because it may differ due to stock ICS, CM or other..
GB
We all know GB icons are in a linearlayout and we cant seperate them so u can use
Code:
<com.erhany.ColoredBatteryText android:textSize="14.0dip" android:gravity="center" android:paddingRight="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" />
this code or whatever you want..
- Code tested on GB and must work on ICS+ , CM,.. Dont know for Aosp etc..
As I told, this is a minor mod to make statusbar area a lil bit colorize..
there was an error while compiling smali. Open smali file and change code to this>> const v0, 0xffffa500 and save
Download File : http://www.mediafire.com/download/td748g6azu3m39t/ColoredBatteryPercentageText.rar
Thanks
Kejar31 github, CM9 Battery Line creator..
Very cool! I use your battery text on a few of my devices and this would be a neat improvement.
This isn't very related but is it possible to do a mod like this that displays the carrier label?
When I say a mod like this, I mean a few smali files and a line of xml.
Sent from my C6603 using XDA Premium 4 mobile app
Ticklefish said:
Very cool! I use your battery text on a few of my devices and this would be a neat improvement.
This isn't very related but is it possible to do a mod like this that displays the carrier label?
When I say a mod like this, I mean a few smali files and a line of xml.
Sent from my C6603 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Here you go http://forum.xda-developers.com/showthread.php?t=2295136
Hope this is what you're looking for...
Sent from my GT-I9300 using xda app-developers app

Categories

Resources