[Android Themes] :
Some Extra Theming and Moving the Power Widget Down

[COLOR=Red [MENTION=5064082]joehanh88[/MENTION],

Thanks A Lot for giving me chance to write the "how to" in your thread sir.

You and Your Guide, both are awesome.

And Please Pardon me as I found this thread more than just good to write this thing as suggested by you.

[/COLOR]

::::::::::::::::::::::::::----------:::::::::::::::::::::::::::::

​

Let's Start with Some Extra Themeing.

First of All let us understand the layout structure of the notification bar(where wi-fi,bluetooth, and other power widget are their). Its in SystemUI/res/layout/here - "Status Bar Expanded.xml"

The Second line decides the background,and layout of the status bar.

<FrameLayout android:id="@id/notification_panel" android:background="#3f000000" android:paddingTop="@dimen/notification_panel_padding_top" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginLeft="@dimen/notification_panel_margin_left"

Just from 5th line, its start deciding the layout of ongoing notification and other alerts.

<FrameLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginBottom="@dimen/close_handle_underlap">
<include android:layout_width="fill_parent" android:layout_height="@dimen/notification_panel_header_height" layout="@layout/status_bar_expanded_header" />
<LinearLayout android:orientation="horizontal" android:background="@drawable/status_bar_hr" android:layout_width="fill_parent" android:layout_height="21.0dip" android:layout_marginTop="40.0dip">
<LinearLayout android:gravity="left" android:orientation="horizontal" android:layout_width="0.0dip" android:layout_height="0.0dip" android:layout_marginLeft="0.0dip" android:layout_alignParentLeft="true">
<TextView android:textSize="45.0dip" android:textColor="#ff99ff00" android:gravity="center_vertical" android:id="@id/notification_title" android:paddingLeft="0.0dip" android:paddingRight="0.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:text="@string/status_bar_latest_events_title" />
</LinearLayout>

After that comes our widget for bluetooth wifi & others- (May be different in other devices so look for icons.

<FrameLayout android:id="@id/toolBarSwitchPanel" android:background="#3f000000" android:layout_width="fill_parent" android:layout_height="85.0dip" android:layout_marginTop="40.0dip">
<include layout="@layout/toolbar_view" />
<include layout="@layout/toolbar_indicator" />
</FrameLayout>

Now after that the Scroll view,

<ScrollView android:id="@id/scroll" android:fadingEdge="none" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginTop="140.0dip" android:overScrollMode="never">
<com.android.systemui.statusbar.policy.NotificationRowLayout android:id="@id/latestItems" android:layout_width="fill_parent" android:layout_height="wrap_content" systemui:rowHeight="@dimen/notification_row_min_height" />
</ScrollView>

After that close dragging handle,

<com.android.systemui.statusbar.phone.CloseDragHandle android:layout_gravity="bottom" android:orientation="vertical" android:id="@id/close" android:layout_width="fill_parent" android:layout_height="@dimen/close_handle_height">
<ImageView android:layout_gravity="bottom" android:id="@id/closeImg" android:layout_width="fill_parent" android:layout_height="@dimen/close_handle_height" android:src="@drawable/status_bar_close" android:scaleType="fitXY" />
</com.android.systemui.statusbar.phone.CloseDragHandle>
</FrameLayout>

Now Let's start changing this.

Let's change the widget to the bottom.

Cut that codes from your status_bar_expanded.xml and paste it just above the close drag handle. and add this in that first line after "android_background" of the widget line..

android:layout_gravity="bottom"

So it will look like this

<FrameLayout android:id="@id/toolBarSwitchPanel" android:layout_gravity="bottom" android:background="#3f000000" android:layout_width="fill_parent" android:layout_height="85.0dip" android:layout_marginTop="5.0dip">
<include layout="@layout/toolbar_view" />
<include layout="@layout/toolbar_indicator" />
</FrameLayout>
</FrameLayout>
<com.android.systemui.statusbar.phone.CloseDragHandle android:layout_gravity="bottom" android:orientation="vertical" android:id="@id/close" android:layout_width="fill_parent" android:layout_height="@dimen/close_handle_height">
<ImageView android:layout_gravity="bottom" android:id="@id/closeImg" android:layout_width="fill_parent" android:layout_height="@dimen/close_handle_height" android:src="@drawable/status_bar_close" android:scaleType="fitXY" />
</com.android.systemui.statusbar.phone.CloseDragHandle>
</FrameLayout>

Now let's change the gap of these widget in the above are so that, it will look good. So find scroll view line and go to end of line and see there it will be like

android:layout_marginTop="70.0dip"

Now change the value to fit your screen. I have a 5 inch screen and value is given for reference or just substract 40 value from yours and the answer you have to write there.

Now we have fixed the overlapping of notification and gap of widget have been filled.

Now let's welcome the digital clock in the expanded status bar or anywhere in systemUI, if you want to. for some devices this clock is in "status_bar_expanded_header.xml"

Find this

<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Clock" android:id="@id/clock" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="5.0dip" android:singleLine="true" />

and change it to this

<DigitalClock android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Clock" android:id="@id/clock" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="5.0dip" android:singleLine="true" />

Now change few layout in status_bar.xml also. so that it will look good. Like battery on left side clock on center and signal bars on right.

Again the same layout we understood above. Starting lines are for Left Side, Middle line that we will add and below our lines will be the right side alignment.

So please mod your files like I have in my status_bar.xml

<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.phone.PhoneStatusBarView android:orientation="vertical" android:id="@id/status_bar" android:background="@drawable/status_bar_background" android:focusable="true" android:fitsSystemWindows="true" android:descendantFocusability="afterDescendants"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
<ImageView android:id="@id/notification_lights_out" android:paddingLeft="6.0dip" android:paddingBottom="2.0dip" android:visibility="gone" android:layout_width="@dimen/status_bar_icon_size" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_lights_out_dot_small" android:scaleType="center" />
<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:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0">
<ImageView android:gravity="left|center" android:id="@id/battery" android:paddingLeft="4.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" />
<ImageView android:id="@id/simicon" android:visibility="gone" android:layout_width="@dimen/status_bar_icon_size" android:layout_height="@dimen/status_bar_icon_size" />
<TextView android:textSize="16.0sp" android:textColor="@*android:color/holo_blue_light" android:id="@id/percentage" android:paddingLeft="4.0dip" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" />
<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" />
<com.android.systemui.statusbar.phone.IconMerger android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/notificationIcons" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_alignParentLeft="true" />
</LinearLayout>
<DigitalClock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:textColor="#ff99ff00" android:gravity="center" android:id="@id/clock" android:paddingLeft="6.0dip" android:clickable="false" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
<LinearLayout android:gravity="right" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0">
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/statusIcons" android:layout_width="wrap_content" android:layout_height="fill_parent" />
<LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/signal_battery_cluster" android:paddingLeft="2.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent">
<include android:id="@id/signal_cluster" android:layout_width="wrap_content" android:layout_height="wrap_content" layout="@layout/gemini_signal_cluster_view" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<include android:id="@id/sim_indicator" android:layout_width="wrap_content" android:layout_height="25.0dip" layout="@layout/gemini_sim_indicator" />
<LinearLayout android:orientation="horizontal" android:id="@id/ticker" 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="@dimen/status_bar_icon_size" android:layout_height="@dimen/status_bar_icon_size" android:layout_marginRight="4.0dip">
<com.android.systemui.statusbar.AnimatedImageView android:layout_width="@dimen/status_bar_icon_size" android:layout_height="@dimen/status_bar_icon_size" android:scaleType="center" />
<com.android.systemui.statusbar.AnimatedImageView android:layout_width="@dimen/status_bar_icon_size" android:layout_height="@dimen/status_bar_icon_size" android:scaleType="center" />
</ImageSwitcher>
<com.android.systemui.statusbar.phone.TickerView android:id="@id/tickerText" android:paddingTop="2.0dip" android:paddingRight="10.0dip" android:layout_width="0.0dip" android:layout_height="wrap_content" android:layout_weight="1.0">
<TextView android:textAppearance="@style/TextAppearance.StatusBar.PhoneTicker" android:layout_width="fill_parent" android:layout_height="wrap_content" android:singleLine="true" />
<TextView android:textAppearance="@style/TextAppearance.StatusBar.PhoneTicker" android:layout_width="fill_parent" android:layout_height="wrap_content" android:singleLine="true" />
</com.android.systemui.statusbar.phone.TickerView>
</LinearLayout>
</com.android.systemui.statusbar.phone.PhoneStatusBarView>

Now for we have done with our changes so let's recompile and move it system/app/here and fix permission and reboot.

If it's not compiling then let us know the error of apktool or apkmultitool log. We will find the solution for it.

If it compile the results will be like we have in screen-shot of this post.

Both of My Status_bar.xml and status_bar_expanded.xml is attached for reference.

"CREDITS SECTION"

Our Brother - [MENTION=917443]dzo[/MENTION]lCP [MENTION=5064082]joehanh88[/MENTION] Sir [MENTION=3964321]Xda F[/MENTION]orum

@My Wife [MENTION=535343]all[/MENTION] others who will try for this.

​