18th July 2011, 01:10 PM
(Last edited by Taine0; 21st July 2011 at 02:56 PM .)
Senior Member -
OP
Thanks Meter
624
Posts: 270
Join Date: Nov 2010
[Status bar/notification mod] Center clock and icon switch - CM7/gingerbread - update
As you can see, I've managed to center the clock and switch the notification and system icons around.
So I've only tested this mod on CM7 and HDPI.
I can't see why it wouldn't work on other gingerbread roms, pretty certain all gingerbread have the same type of statusbar.xml to play around with.
Things you need -
APKmanager
Notepad++
rootexplorer
How to do it: Use rootexplorer to grab your systemui located system>app.
Decompile it with APKmanager, go into the layout folder and edit the statusbar.xml.
For those who want to just edit the clock here is the code to do it.
find the
<com.android.systemui.statusbar.Clock' delete that whole line and paste this above the linear layout
(edit:I updated the clock code to help centering, it'll now be centered for any screensize.)
Code:
<LinearLayout android:gravity="center" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.Clock android:textAppearance="@android:style/TextAppearance.StatusBar.Icon" android:textSize="15.0sp" android:typeface="normal" android:textStyle="normal" android:textColor="#ffffffff" android:gravity="center" android:paddingTop="3.0px" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:layout_weight="1.0" />
</LinearLayout>
If you want the whole mod, heres a copy of my XML
Code:
<?xml version="1.0" encoding="UTF-8"?>
<com.android.systemui.statusbar.StatusBarView android:background="@drawable/statusbar_background" android:focusable="true" android:descendantFocusability="afterDescendants" android:layout_width="fill_parent" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<com.android.systemui.statusbar.Clock android:textAppearance="@android:style/TextAppearance.StatusBar.Icon" android:textSize="15.0sp" android:typeface="normal" android:textStyle="normal" android:textColor="#ffffffff" android:gravity="center" android:paddingLeft="145.0dip" android:paddingTop="3.0px" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:layout_weight="1.0" />
<LinearLayout android:gravity="left" android:orientation="horizontal" android:id="@id/statusIcons" android:paddingLeft="5.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" />
<LinearLayout android:orientation="horizontal" android:id="@id/icons" android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.IconMerger android:gravity="right" android:orientation="horizontal" android:id="@id/notificationIcons" android:paddingLeft="40.0dip" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0" />
</LinearLayout>
<com.android.systemui.statusbar.CmBatteryText android:textAppearance="@android:style/TextAppearance.StatusBar.Icon" android:textSize="15.0sp" android:typeface="normal" android:textStyle="normal" android:gravity="center" android:orientation="horizontal" android:paddingLeft="297.0dip" android:paddingTop="2.5px" android:layout_width="wrap_content" android:layout_height="fill_parent" />
<com.android.systemui.statusbar.CmBatteryMiniIcon android:textAppearance="@android:style/TextAppearance.StatusBar.Icon" android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/CmBatteryMiniIcon" android:layout_width="0.0px" android:layout_height="0.0px" />
<ImageButton android:id="@id/status_home" android:background="@drawable/ic_statusbar_home" android:visibility="gone" android:layout_width="0.0dip" android:layout_height="fill_parent" />
<ImageButton android:id="@id/status_menu" android:background="@drawable/ic_statusbar_menu" android:visibility="gone" android:layout_width="0.0dip" android:layout_height="fill_parent" />
<ImageButton android:id="@id/status_back" android:background="@drawable/ic_statusbar_back" android:paddingRight="6.0dip" android:visibility="gone" android:layout_width="0.0dip" android:layout_height="fill_parent" />
<LinearLayout android:orientation="horizontal" android:id="@id/ticker" android:background="@drawable/statusbar_background" android:paddingLeft="6.0dip" android:animationCache="false" android:layout_width="fill_parent" android:layout_height="fill_parent">
<ImageSwitcher android:id="@id/tickerIcon" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_marginRight="8.0dip">
<com.android.systemui.statusbar.AnimatedImageView android:layout_width="25.0dip" android:layout_height="25.0dip" />
<com.android.systemui.statusbar.AnimatedImageView android:layout_width="25.0dip" android:layout_height="25.0dip" />
</ImageSwitcher>
<com.android.systemui.statusbar.TickerView android:id="@id/tickerText" android:paddingTop="5.0px" android:layout_width="0.0dip" android:layout_height="wrap_content" android:layout_weight="1.0">
<TextView android:textAppearance="@android:style/TextAppearance.StatusBar.Ticker" android:textSize="12.0sp" android:typeface="normal" android:textStyle="normal" android:textColor="#ffffffff" android:paddingTop="4.0px" android:layout_width="fill_parent" android:layout_height="wrap_content" android:singleLine="true" />
<TextView android:textAppearance="@android:style/TextAppearance.StatusBar.Ticker" android:textSize="12.0sp" android:typeface="normal" android:textStyle="normal" android:textColor="#ffffffff" android:paddingTop="4.0px" android:layout_width="fill_parent" android:layout_height="wrap_content" android:singleLine="true" />
</com.android.systemui.statusbar.TickerView>
</LinearLayout>
<com.android.systemui.statusbar.DateView android:textAppearance="@android:style/TextAppearance.StatusBar.Icon" android:textColor="#ffffffff" 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" />
</com.android.systemui.statusbar.StatusBarView>
You will need to change things to fit your own statusbar.xml. I'm on a old nightly for CM7 so it won't have as many things. So you'll have to play around and see what fits.
Once you edited, save the xml, compile with APKmanager, press Y to both questions, then deleted the resources file and statusbar.xml in the KEEP folder, sign it and then make a flashable zip and flash it over. Or replace the systemui with rootexplorer.
-----
Bugs to far: I can't seem to get the notification icons go all the way to the right side, It's not so bad because i've got the battery in place and the gap from the edge fits the battery perfectly, but it's annoying if you don't have the battery % on. I'm sure it's possible to alter it, I'm just not so great with XML.
Also the notifications overlap the clock when they get to the middle, I know how to fix that one, but just to lazy to bother as I never have that many notifications going on. The width of the notification display just needs changing.
Play around with it. Let me know how it goes.
-------
Notification mod now
Right, I've now themed the pulldown menu, I'm currently using images from the MEIZU theme as I was testing it out.
This is done by editting the status_bar_expanded.xml, replace lines that match yours.
Code:
<?xml version="1.0" encoding="UTF-8"?>
<com.android.systemui.statusbar.ExpandedView android:orientation="vertical" android:focusable="true" android:descendantFocusability="afterDescendants"
xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout android:orientation="vertical" android:background="@drawable/title_bar_portrait" android:paddingTop="3.0dip" android:paddingRight="3.0dip" android:paddingBottom="5.0dip" android:layout_width="fill_parent" android:layout_height="0.0px">
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content">
<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.5dip" android:layout_height="0.0px" android:layout_marginLeft="5.0dip" android:layout_marginTop="1.0dip" android:layout_weight="1.0" />
</LinearLayout>
</LinearLayout>
<FrameLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1.0">
<ScrollView android:id="@id/scroll" android:fadingEdge="none" android:layout_width="fill_parent" android:layout_height="fill_parent" android:overScrollMode="ifContentScrolls">
<com.android.systemui.statusbar.NotificationLinearLayout android:orientation="vertical" android:id="@id/notificationLinearLayout" android:layout_width="fill_parent" android:layout_height="wrap_content">
<TextView android:textAppearance="@style/TextAppearance.StatusBar.Title" android:gravity="center" android:id="@id/noNotificationsTitle" android:background="@drawable/shade_header_background" android:paddingLeft="5.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/status_bar_no_notifications_title" />
<TextView android:textAppearance="@style/TextAppearance.StatusBar.Title" android:gravity="center" android:id="@id/ongoingTitle" android:background="@drawable/shade_header_background" android:paddingLeft="5.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/status_bar_ongoing_events_title" />
<LinearLayout android:orientation="vertical" android:id="@id/ongoingItems" android:layout_width="fill_parent" android:layout_height="wrap_content" />
<TextView android:textAppearance="@style/TextAppearance.StatusBar.Title" android:gravity="center" android:id="@id/latestTitle" android:background="@drawable/shade_header_background" android:paddingLeft="5.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/status_bar_latest_events_title" />
<LinearLayout android:orientation="vertical" android:id="@id/latestItems" android:layout_width="fill_parent" android:layout_height="wrap_content" />
</com.android.systemui.statusbar.NotificationLinearLayout>
</ScrollView>
<ImageView android:layout_width="fill_parent" android:layout_height="fill_parent" android:src="@drawable/title_bar_shadow" android:scaleType="fitXY" />
</FrameLayout>
<LinearLayout android:orientation="vertical" android:background="@drawable/title_bar_portrait" android:layout_width="fill_parent" android:layout_height="35.0px">
<TextView android:gravity="center" android:textSize="14.0sp" android:textStyle="bold" android:textColor="#a6a6a6" android:id="@id/clear_all_button" android:paddingTop="3.0dip" android:layout_width="480.0px" android:layout_height="fill_parent" android:scaleType="fitXY" android:text="@string/status_bar_clear_all_button" style="\?android:attr/buttonStyle" />
</LinearLayout>
<com.android.systemui.statusbar.powerwidget.PowerWidget android:id="@id/exp_power_stat" android:background="@drawable/title_bar_portrait" android:layout_width="fill_parent" android:layout_height="wrap_content" />
</com.android.systemui.statusbar.ExpandedView>
-------------------------------------
Check out my icon set!
Metrogloss icons.
If I help you, please click the 'thanks' button!
2.2 rooted
The Following 90 Users Say Thank You to Taine0 For This Useful Post: [ Click to Expand ]
abhimukesh25 (3rd April 2012),
acax456 (26th March 2012),
agentsandy007 (13th November 2011),
ahlulnugraha (24th March 2012),
allofusjw (28th November 2011),
alteredlikeness (8th July 2012),
annebaabjan (31st August 2011),
A_U (19th January 2013),
Big-O-Devil (22nd September 2011),
BlackLie (19th April 2013),
bluedriver (4th March 2012),
Bologna (16th October 2011),
BomBeRoNe666 (10th December 2012),
boricua6 (28th December 2011),
calebv2 (7th October 2011),
chitose_ndy (15th May 2012),
chris_banks2 (9th June 2012),
consegregate (30th October 2011),
dandiar (19th September 2011),
dhirend_6d (10th April 2012),
DJBhardwaj (3rd October 2011),
djdarkknight96 (22nd July 2011),
donhu (20th July 2011),
Drewsipher (19th July 2011),
dxdiag32 (26th January 2012),
equiliym (27th September 2011),
febriantosaka1 (23rd November 2011),
fergie716 (2nd August 2011),
fLipz (29th August 2011),
fuloplori (29th September 2011),
gboydroid (30th April 2012),
Glebun (13th September 2011),
gomorrah (30th September 2011),
Habarug (27th January 2012),
hackergnome (4th September 2011),
hearts king101 (24th August 2011),
hero2003 (10th September 2011),
imblacklife (17th September 2011),
iRide113 (9th August 2011),
jackpham (6th July 2012),
jayharper08 (3rd October 2011),
jayk32 (26th July 2011),
jmotyka (23rd July 2011),
jneg123 (4th October 2011),
Jsmokey (8th December 2011),
K Dotty (9th October 2011),
k-dargo (31st July 2011),
Kalp99670 (7th March 2013),
kanttii (16th September 2011),
LfcFan1977 (10th September 2011),
linkci (21st April 2012),
lopman (15th January 2012),
mayanks_098 (16th October 2011),
melissapugs (10th January 2012),
Mimis_69 (11th August 2011),
MrinmoyJK (15th March 2013),
mrworldwide092 (23rd August 2011),
mutia (19th July 2011),
neroyoung (16th May 2012),
nhatientri (13th August 2011),
ode178 (24th July 2011),
OS_Hacking (11th February 2013),
overground (21st July 2011),
p0izn (2nd August 2011),
pa64 (22nd November 2011),
Pr@nyt (20th February 2013),
privatebox (31st October 2011),
propsia (4th December 2011),
qzan7 (28th July 2011),
remix96 (9th September 2011),
Rumy91 (15th November 2011),
Rycon33 (3rd October 2011),
Rydlis (7th August 2012),
Sadsleeper (23rd August 2011),
Scratch0805 (6th September 2011),
shreddintyres (1st August 2011),
shreyskywalker (11th September 2011),
SignalX (27th July 2011),
skynet28 (27th September 2011),
stason72 (24th November 2011),
syamsoul (19th October 2011),
thuanngotau (26th July 2011),
triasbrata (7th June 2012),
vido.ardes (18th July 2011),
VigiDroid (20th September 2011),
Vipitus (11th August 2011),
VolcanicSkunk (13th October 2011),
vukandric (18th July 2011),
williamfold (14th March 2013),
yeubacgiang (10th April 2013)
18th July 2011, 01:51 PM
Senior Member
Thanks Meter
10
Posts: 586
Join Date: Aug 2009
nice work - but you got many smilies in your code
may you should use the code-tags
Wouldn't it be possible to add this into a theme chooser apk ?
Samsung Galaxy S III
WanamLite 7.0 | Kernel: Stock | philz Touch Enhanced CWM 6.0.3.2 5.03.7 | SD: Class 10 16GB
Acer Iconia A500 32 GB
RE-FLEXxx-ShellSHOCK_Rev2-public | Dualboot: Ubuntu | Bootloader ICS V8 | Public Recovery v0.2 | SD: Class 10 16GB
Samsung Galaxy Note 10.1 n8010
Stock unrooted
Pc Suite Batch collection & Font Flasher
Our Blog >>
Device-History:
18th July 2011, 02:10 PM
Senior Member
Thanks Meter
1202
Posts: 2,674
Join Date: Sep 2009
Location: Belgrade
DONATE TO ME
This is really interesting. Will have a look how to get it on miui rom. Thanks for sharing!
Sent from my GT-I9000 using XDA Premium App
The Following User Says Thank You to vukandric For This Useful Post: [ Click to Expand ]
18th July 2011, 02:46 PM
(Last edited by whooper90; 18th July 2011 at 02:56 PM .)
Senior Member
Thanks Meter
42
Posts: 302
Join Date: Dec 2007
Location: Aarhus
just tried this.. and my statusbar disapeared
Will continue to work on it.
Hmm weird.. Just tried to push the old SystemUI.apk to the phone (The original).. Rebooted, and the status bar is still gone :-?
EDIT: Nope, it's here again
EDIT 2: Just tried decompiling the APK, and compiling it again without making any changes. Then pushing it to the device and rebooting. My statusbar is still disapearing.
Am I doing something wrong?
(Using apktool instead of APKmanager, 'cause im on a mac)
Regards Dennis Aka. Whooper
Computer Science @ University of Aarhus
18th July 2011, 03:07 PM
Senior Member -
OP
Thanks Meter
624
Posts: 270
Join Date: Nov 2010
Quote:
Originally Posted by
Che123
nice work - but you got many smilies in your code
may you should use the code-tags
Wouldn't it be possible to add this into a theme chooser apk ?
There, added codetags
and I don't think so. I don't think the theme chooser has the same statusbar.xml. I haven't really looked tbh, though.
Quote:
Originally Posted by
whooper90
just tried this.. and my statusbar disapeared
Will continue to work on it.
Hmm weird.. Just tried to push the old SystemUI.apk to the phone (The original).. Rebooted, and the status bar is still gone :-?
EDIT: Nope, it's here again
EDIT 2: Just tried decompiling the APK, and compiling it again without making any changes. Then pushing it to the device and rebooting. My statusbar is still disapearing.
Am I doing something wrong?
(Using apktool instead of APKmanager, 'cause im on a mac)
Hmm, are you signing the APK? I've only done it on aPKmanager, so not sure! also only done it with flashing the APK via recovery, too. I know in APKmanager you need to choose the systemapp options, does apktool have that? never used it, so not sure.
-------------------------------------
Check out my icon set!
Metrogloss icons.
If I help you, please click the 'thanks' button!
2.2 rooted
18th July 2011, 03:10 PM
Senior Member
Thanks Meter
42
Posts: 302
Join Date: Dec 2007
Location: Aarhus
Quote:
Originally Posted by
Taine0
Hmm, are you signing the APK? I've only done it on aPKmanager, so not sure! also only done it with flashing the APK via recovery, too. I know in APKmanager you need to choose the systemapp options, does apktool have that? never used it, so not sure.
Nope, not signing the apk. Maybe I should try that.
APKtool doesn't have systemapp options. It's pretty basic, it's only possible to compile/decompile without very many options.
Regards Dennis Aka. Whooper
Computer Science @ University of Aarhus
18th July 2011, 03:14 PM
Senior Member -
OP
Thanks Meter
624
Posts: 270
Join Date: Nov 2010
Quote:
Originally Posted by
whooper90
Nope, not signing the apk. Maybe I should try that.
APKtool doesn't have systemapp options. It's pretty basic, it's only possible to compile/decompile without very many options.
systemui.apk needs to be signed to work, so that could be your problem.
-------------------------------------
Check out my icon set!
Metrogloss icons.
If I help you, please click the 'thanks' button!
2.2 rooted
18th July 2011, 03:24 PM
Senior Member
Thanks Meter
42
Posts: 302
Join Date: Dec 2007
Location: Aarhus
Quote:
Originally Posted by
Taine0
systemui.apk needs to be signed to work, so that could be your problem.
Hmm.. signed the APK using test-keys.. Same result..
You don't happen to know a way to create a flashable .zip without apkmanager?
Regards Dennis Aka. Whooper
Computer Science @ University of Aarhus
18th July 2011, 03:26 PM
Senior Member
Thanks Meter
86
Posts: 781
Join Date: Apr 2010
Could this be made into a flash zip? I can never get these things to work right and would feel safer using a zip
Sent from my DROID X2 using XDA App
Verizon Galaxy Note 2 - CleanROM v3.5
Verizon Galaxy Nexus - Xylon/Just laying around
Nexus 7 - AOKP Official Build 1
Transformer 101 - *Retired*
Jailbroken iPad 3 - *Almost retired*
18th July 2011, 03:27 PM
(Last edited by Taine0; 18th July 2011 at 03:31 PM .)
Senior Member -
OP
Thanks Meter
624
Posts: 270
Join Date: Nov 2010
Quote:
Originally Posted by
whooper90
Hmm.. signed the APK using test-keys.. Same result..
You don't happen to know a way to create a flashable .zip without apkmanager?
I used uotkitchen for my flashable zip. I got it when I used it for the transparent status bar patch, Just upload your systemui.apk
Quote:
Originally Posted by
SwiftLegend
Could this be made into a flash zip? I can never get these things to work right and would feel safer using a zip
Sent from my DROID X2 using XDA App
I can't make it a flashable zip because every rom uses a different setup in the statusbar.xml. So it'll just result in crashing your statusbar.
-------------------------------------
Check out my icon set!
Metrogloss icons.
If I help you, please click the 'thanks' button!
2.2 rooted
The Following 2 Users Say Thank You to Taine0 For This Useful Post: [ Click to Expand ]
Thread Tools
Search this Thread
Display Modes
Linear Mode
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Go to top of page...
Most Thanked In This Thread
16 Mini guide Hokay, I'll explain the
way I …9 (quote) Thank you...
First, delete your … 9
BACKUP WORKING FILES!!
Dont … 5 @jaydubbs:
@Irisscience:
… 5 I have added this to the
BACKside-IHO …