yashsingh1/xdaforums huggingface dataset:
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] Ticklefish:
Try this in your status_bar.xml:

If you want to remove the clock from the statusbar, just delete the DigitalClock line.

Adding the DigitalClock to the expanded screen is relatively simple, you just need to know where on the screen you want to put it. With serajr's mod, you actually want to edit status_bar_expanded_header.xml. Have a look at mine to see how I've done it.
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] whalesplaho:
works a like charm..... i cant stop smiling!!! :)

Godbless yhu brov. i just dnt know what i will do without yhu!
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] Ticklefish:
Re: [TUT] How To Center The Clock On The Statusbar..And Move Other Icons As Well!

Hey, if I can make someone smile then it's always worthwhile. :)

Does the code make sense? Can you see what it's doing?

Oh, and nice homescreen, my friend! :good:
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] whalesplaho:
thanks for yur nice comment... tha code is funny & working!!! ;)

havent seen dat code before.

---------- Post added at 02:28 PM ---------- Previous post was at 02:16 PM ----------

i try to use yur status_bar_expanded_header.xml, just change tha DigitalClock code with my mine but got compiling error....

src not declared in line 8

line 8 code:-

<ImageView android:id="@id/clear_all_button" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/clear" android:layout_alignParentLeft="true" android:contentDescription="@string/accessibility_clear_all" />
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] Ticklefish:
Re: [TUT] How To Center The Clock On The Statusbar..And Move Other Icons As Well!

10 out of 10 for not quoting the whole error, just the bit that mattered!

My clear_all button doesn't use the same icon as serajr's standard mod. Mine uses an icon called 'clear' which is just a small, transparent png. The button and date occupy the same part of the screen so, since the date is transparent, it looks like you press on the date to clear any notifications.

If that's what you want to do, you just need to copy the PNG from the drawable-mdpi as well.
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] whalesplaho:
:good: compiled successful!!!

thanks a bunch brotha... yhu more dan a friend!

am 24 & yhu? wanna know maybe i should call yhu big brov or mate.

---------- Post added at 10:44 PM ---------- Previous post was at 09:53 PM ----------

am loving dis brov.... ;) :highfive:
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] avirale123:
friend's facebook and whatsapp icon

Could you teach me to run it to the right
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] whalesplaho:
dat means all notification ll be on right... can yhu post yur status bar code & how yhu want it?
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] avirale123:
as you see the icons overlap would throw to the right

<LinearLayout android:orientation="horizontal" android:id="@id/icons" android:paddingLeft="6.0dip" android:paddingRight="6.0dip" android:layout_width="fill_parent" android:layout_height="fill_parent">
<RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.StatusBarIconView android:id="@id/moreIcon" android:visibility="gone" android:layout_width="@dimen/status_bar_icon_size" android:layout_height="fill_parent" android:src="@drawable/stat_notify_more" android:layout_alignParentLeft="true" />
<com.android.systemui.statusbar.phone.IconMerger android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/notificationIcons" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_toRightOf="@id/moreIcon" />
<DigitalClock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="left|center" android:id="@id/clock" android:paddingLeft="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
<ImageView android:id="@id/battery" android:paddingLeft="8.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" />
<include android:id="@id/signal_cluster" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toLeftOf="@id/battery" layout="@layout/signal_cluster_view" />
<ImageView android:layout_gravity="center_vertical" android:id="@id/stat_no_sim" android:paddingLeft="4.0dip" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toLeftOf="@id/signal_cluster" />
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/statusIcons" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_toLeftOf="@id/stat_no_sim" />
</RelativeLayout>
</LinearLayout>
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] Ticklefish:
With RelativeLayout, you need to define where each child is relative to the whole layout. You need to add 'android:layout_centerInParent="true"' to the DigitalClock tag, otherwise it'll just sit at the start of the statusbar.

So you'll need:
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] whalesplaho:
Ticklefish he wants tha notification on right..... i dont think it will be on right with tha above code & what does dis do; 'android:layout_centerInParent="true"'

Edit::::::::

Ticklefish i guess i gat to disturb yhu, wanna ask questions concerning v2..... hope yhu dnt mind please!

---------- Post added at 11:53 AM ---------- Previous post was at 11:05 AM ----------

> i guess adding Carrier Text ontop of date is same as adding date & time to status_bar_expanded.xml

> yur battery icon i cant found dem in drawable-mdpi, can yhu help with it please. a lil bit differs to mine

> is it possible to move only network bar to tha left & also notifications still there

> yur background image shows digital/analog clock, how?

> recent apps please....

Am very sorry am a pain in tha ASS!
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] Ticklefish:
Re: [TUT] How To Center The Clock On The Statusbar..And Move Other Icons As Well!

Ah, I thought he wanted the clock centered. Oh well. If you want things to align with the right side of a RelativeLayout, you'll need 'android:layout_alignParentRight="true"'.

The Parent is the the RelativeLayout itself so 'android:layout_centerInParent="true"' will put something in the center of the Layout.

I'm always happy to answer your questions, my friend. Just head on over to the thread and ask away!
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] whalesplaho:
Questions

> i guess adding Carrier Text ontop of date is same as adding date & time to status_bar_expanded.xml

> yur battery icon i cant found dem in drawable-mdpi, can yhu help with it please. a lil bit differs to mine

> is it possible to move only network bar to tha left & also notifications still there

> yur background image shows digital/analog clock, how?

> recent apps please....

Am very sorry am a pain in tha ASS!

---------- Post added at 12:36 PM ---------- Previous post was at 12:26 PM ----------

i guess its okay now right?

<LinearLayout android:orientation="horizontal" android:id="@id/icons" android:paddingLeft="6.0dip" android:paddingRight="6.0dip" android:layout_width="fill_parent" android:layout_height="fill_parent">
<RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.StatusBarIconView android:id="@id/moreIcon" android:visibility="gone" android:layout_width="@dimen/status_bar_icon_size" android:layout_height="fill_parent" android:src="@drawable/stat_notify_more" android:layout_alignParentLeft="true" />
<com.android.systemui.statusbar.phone.IconMerger android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/notificationIcons" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_toRightOf="@id/moreIcon" android:layout_alignParentRight="true" />
<DigitalClock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="left|center" android:id="@id/clock" android:paddingLeft="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
<ImageView android:id="@id/battery" android:paddingLeft="8.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" />
<include android:id="@id/signal_cluster" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toLeftOf="@id/battery" layout="@layout/signal_cluster_view" />
<ImageView android:layout_gravity="center_vertical" android:id="@id/stat_no_sim" android:paddingLeft="4.0dip" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toLeftOf="@id/signal_cluster" />
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/statusIcons" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_toLeftOf="@id/stat_no_sim" />
</RelativeLayout>
</LinearLayout>
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] Ticklefish:
Re: [TUT] How To Center The Clock On The Statusbar..And Move Other Icons As Well!

Pretty much. The Carrier Label code is already in the tracking.xml. All you need to do is copy it into status_bar_expanded_header.xml and adjust the code to fit.

QUOTE=whalesplaho;37327189] > yur battery icon i cant found dem in drawable-mdpi, can yhu help with it please. a lil bit differs to mine[/QUOTE]

Ah..but I don't have a battery icon. I just use the battery text. But I have used the battery icon for something on the statusbar..

I'm going to make this a little test. See if you work out what I've used the battery icon for.. :D

QUOTE=whalesplaho;37327189] > is it possible to move only network bar to tha left & also notifications still there[/QUOTE]

You mean have the signal icon on the left with the notifications and the WiFi icon on the right with the battery icon/text? It's definitely possible. Have a look at..okay, I can't remember what it's called but something like signal_cluster.xml.

QUOTE=whalesplaho;37327189] > yur background image shows digital/analog clock, how?[/QUOTE]

Actually very easily. AnalogClock is hardcoded into Android itself. You just need to get the parameters right.

QUOTE=whalesplaho;37327189] > recent apps please....[/QUOTE]

That was very, very easy. The code is already in the stock Sony apk.

Feel free to look at my code if you need help. The best thing to do is to go through it line by line and work out what each line does. You don't have to understand every last detail, just get an idea of what's going on.

And just try stuff. Do it slowly, take your time and if something doesn't work, see if you can work out why.

For your homework (lol) I want you to try to get the signal and WiFi icons on different sides of the statusbar. If you can work it out, you'll be in a much better position. :)

QUOTE=whalesplaho;37327189] i guess its okay now right?[/QUOTE]

Nope. Try it and you'll see what it does. ;)

With a RelativeLayout, there's nothing to stop children (technical term) from being on top of each other. You need to have a quick think about where all the parts are in relation to each other and the whole statusbar. Sketch it out on a piece of paper if you want.

I can tell you precisely what to code but it'll be good for you if you can work it out yourself. But I will if you can't get it. :)

However, bearing in mind the size of a phone's statusbar, if you have a centered clock and the notifications on the right along with the battery icon and WiFi icon and various status icons..you could be looking at having overlapping notifications before very long. You may be better off using Method 2.5. It'll certainly be easier to code!

Can you post about this in the other thread please? I confuse easily!
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] Ticklefish:
I want to say mine, but serajr's xml is actually better. Grr... ;)

Don't combine the code, that will just cause huge problems and won't work at all. It's worth having a look at what all this code actually does. If you know what these lines mean, then you can start doing lots of fun things to your phone yourself.
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] Ticklefish:
Yes, you can. And very easily too, if you're on ICS. Can you share your status_bar.xml please? Then I can show you how?
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] Ticklefish:
Yes, you can. And very easily too, if you're on ICS. Can you share your status_bar.xml please? Then I can show you how?

Whoops...duplicate post!!
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] Gustavo RD78:
cool its initiative to share knowledge

keep mod :good:
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] Ticklefish:
I'll need your framework-res.apk as well to decompile this.
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] billy.bong:
Yap, the status_bar.xml in my attachment.

Just remove the .doc extension.

Thank you very much, mate :good::cyclops:

FYI the status_bar.xm I uploaded was decompiled from MIUI system ui. :D
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] Ticklefish:
MIUI, eh? Wow..that's some busy code. Can you share a screenshot of how it looks now?
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] billy.bong:
See my attachment :D

But the status_bar.xml, when I trying to edit it, i'ts not totally different with another ICS status_bar.xml bro.

Thank you for wanna to help me. Sorry if I bother you, mate :cowboy:

Ok I'll try it :D
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] Ticklefish:
Yeah, it's the same sort of thing. There's just a few things that must be unique to MIUI itself but nothing that should cause too much of an issue.

I moved the 'signal_cluster' line to just above the 'CarrierLabel' line. That should put the signal icons just to the left of the carrier label.

Maybe.
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] billy.bong:
Yap, it's work mate :D

See my attachment. Thank you very much dude :)

The conclusion is just move the line that describe the signal bar, to the position that we want. For example to the left carrier label, just move the signal bar line, then put it in above the line that describe the carrier label. That's right?

But onething bro, there's more space in the left of the signal bar (I mark red circle on it), and when I move the clock into the center of status bar, there's more space too in the right of the battery. Any idea to remove that space?

Thanks for your help dude :)
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] Ticklefish:
If that space to the left of the signal icon is still there, try moving the 'signal_cluster' line to just underneath the 'CarrierLabel' line. That will put the signal icon on the right of the carrier label. Not a perfect solution but could work out for you.
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] quoctrungtrinh:
thanks for this great mod this is what im looking for
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] knightazura:
ohh so~ ok ok

this https://www.box.com/s/9f023a55594aa8a093b4 (framework-res) and https://www.box.com/s/ce71c4897adc84d9ed56 (SystemUI)

btw, you and bro Billy.Bong talk about Signal Bar in left position right??

err, can you take it for me too?? :fingers-crossed:

sorry if it bother you orz;

thanks yoo :D
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] Ticklefish:
Done. I used the same principles mentioned above and did it in a few seconds. This can be pushed back to your phone, just make sure you get the permissions right. :cool:
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] physcodelic:
Okey successfully move the clock :D

Maybe youre right, I should start learning about this xml stuff...

Hopes my brain wont explode :D

Ah, btw can you write a tuts about 1% battery mod?

Cant find one usefull...
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] evilbarcode:
Try this http://xdaforums.com/showpost.php?p=25621612&postcount=2
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] Ticklefish:
Thanks! :)
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] I9103:
work it on 2.3?
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] whalesplaho:
1. When yhu tap on clock, it will open settings?

2. Yhu know i dont know much, its yhu putting me through. i need help on Recent Apps

3. Help me with tha right parameters for Analog & Digital backgroud

4. Damn yur status_bar.xml is fully coded. i sober when i saw it!

my date doesnt show full, just tha weekday only & also can tha date & network be big a little... help please!
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] Ticklefish:
Re: [TUT] How To Center The Clock On The Statusbar..And Move Other Icons As Well!

Can you post this in my other thread please?
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] whalesplaho:
Posted in how to Add seconds to StatusBar!
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] delight535:
Thank you for your tutorial. :) I made my clock centered. It looks great.

Can you help me how can I get my signal meter (and mobile data icon too) and wifi icon to the left? (and the notifications can stay on left too)

Thank you!
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] Ticklefish:
Sure! Post your xml here (copy and paste it) and I'll show you what to do! :D
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] delight535:
Great, thank you. :D With this code does the clock stay in the center? Because there is a line with com.android.systemui.statusbar.Clock and it says: left|center.

Will the clock stay center anyway, or should I just delete this line from the code?

Thanks :D
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] Ticklefish:
Re: [TUT] How To Center The Clock On The Statusbar..And Move Other Icons As Well!

The clock won't be affected by this, that line is outside the id/icons Layout.

But you do need to be aware that if you have a lot of notifications, your icons might overlap it.
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] delight535:
Thank you! :D

I tried it: the clocks stays in center, but another clock appears on the right side.

And there is a strange new icon and the left side: a circle with 3 dots in it. I don't know what it is.

But the signal icons are on the left side. :D
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] Ticklefish:
Can you share a screenshot?
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] delight535:
Sure. http://imageshack.us/f/819/notbar.png/

I have CM7 with JBdesign.

I have no idea what is that circle on the left side. :D It has appeared since this new xml.
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] delight535:
Thank you! :) I will try it. And have you got any idea about that icon with a circle?
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] rodman01:
No sorry, not really at the moment. All the "<ImageButton android:id="@id/statusxxxx" tags are it not.....so I think the icon must be somewhere else...cpuld you give us the complete code again, so that we could have another look at it?
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] FranklinL26:
Great!
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] SS-4050:
Re: [TUT] How To Center The Clock On The Statusbar..And Move Other Icons As Well!

Can anybody help tells me what I need to do if I want to :

1. move the battery to the left of the status bar?

2. make the notifications show on the center of the statusbar?

I'm Using Th0ngpham Xperia Z SystemUI
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] whalesplaho:
Can yhu post yur status_bar.xml code?
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] Ticklefish:
Re: [TUT] How To Center The Clock On The Statusbar..And Move Other Icons As Well!

Looks like you're using Method 1, more or less. Which will allow the clock to be overlapped.

Have a look at using Method 2.5. It will ensure your clock isn't overlapped. You might want to clear your notifications from time to time though.
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] Ticklefish:
Re: [TUT] How To Center The Clock On The Statusbar..And Move Other Icons As Well!

Seems simple enough. Whalesplaho, you want to give it a go? :)
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] wertcross123:
Hello guys, Im done with all procedure. but, after i flash the zip. Then succeed. reboot to system. Then nothing change? :confused: :confused:

Can you guys tell me whats the problem on my phone? :rolleyes:
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] whalesplaho:
Try to move tha Meta-Inf from tha Original SystemUI to tha edited one & also Mount System in CWM before flashing..... ;)

Yeap brov.... yhu av really taught me, i guess i should get dis!
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] SS-4050:
Re: [TUT] How To Center The Clock On The Statusbar..And Move Other Icons As Well!

So you wanna help me whalesplaho? Thank you :)
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] Ticklefish:
Not quite..but you did good.. :)

It's worth using Notepad++ to do your xml editing. It can help space out everything in your code.

LinearLayout doesn't use all the parameters as RelativeLayout, "layout_alignParentLeft", "layout_toRightOf" and "layout_centerInParent" don't actually do anything. Although it doesn't actually cause any harm having them in the code. Android just ignores them.

You've got some duplicates in your code but you've got the right idea.

Give this a try:

<LinearLayout android:orientation="horizontal" android:id="@id/icons" android:paddingLeft="6.0dip" android:paddingRight="6.0dip" android:layout_width="fill_parent" android:layout_height="fill_parent">
<LinearLayout android:id="@+id/statusbarleftside" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0">
<TextView android:layout_gravity="left|center" android:id="@id/battery_text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/status_bar_settings_settings_button" android:singleLine="true" style="@style/StatusBarNotificationText" />
<ImageView android:id="@id/battery" android:layout_width="wrap_content" android:layout_height="wrap_content"/>
</LinearLayout>
<RelativeLayout android:id="@+id/statusbarcenter" android:layout_width="wrap_content" android:layout_height="fill_parent">
<com.android.systemui.statusbar.StatusBarIconView android:id="@id/moreIcon" android:layout_width="@dimen/status_bar_icon_size" android:layout_height="fill_parent" android:visibility="gone" android:src="@drawable/stat_notify_more" android:layout_alignParentLeft="true"/>
<com.android.systemui.statusbar.phone.IconMerger android:orientation="horizontal" android:id="@id/notificationIcons" android:layout_width="wrap_content" android:layout_height="fill_parent" android:gravity="center_vertical" android:layout_toRightOf="@id/moreIcon" />
</RelativeLayout>
<RelativeLayout android:id="@+id/statusbarrightside" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0">
<com.android.systemui.statusbar.policy.Clock android:id="@id/clock" android:layout_width="wrap_content" android:layout_height="fill_parent" android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:singleLine="true" android:layout_alignParentRight="true" />
<include android:id="@id/signal_cluster" android:layout_width="wrap_content" android:layout_height="wrap_content" layout="@layout/signal_cluster_view" android:layout_toLeftOf="@id/clock" />
<LinearLayout android:orientation="horizontal" android:id="@id/statusIcons" android:layout_width="wrap_content" android:layout_height="fill_parent" android:gravity="center_vertical" android:layout_toLeftOf="@id/signal_cluster"/>
<ImageView android:id="@id/stat_no_sim" android:paddingLeft="4.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:visibility="gone" android:layout_gravity="center_vertical" android:layout_toLeftOf="@id/statusIcons" />
</RelativeLayout>
</LinearLayout>