[Galaxy Ace S5830 Themes and Apps] SpaceCaker:
How to add 4.2.2 Statusbar to youre GingerBread rom :D

In this guide i will show u how to add 4.2.2 statusbar

Currently only for samsung roms.

Files to be modded ?

SystemUI.apk

[LIST=1]
[*]res/layout/statusbar.xml
[*]res/layout/status_bar_expanded.xml
[*]res/layout/status_bar_tracking.xml
[*]res/Values/ids.xml
[*]res/Values/strings.xml
[*]res/Values/styles.xml
[*]smali/com/android/systemui/statusbar/StatusBarService.smali
[/LIST]

Whatt files do we add ? *u get these in a ZIP file so u can replace :P

[LIST=1]
[*]smali/com/android/systemui/statusbar/StatusBarServiceLRPull.smali
[*]smali/com/android/systemui/statusbar/SpaceCakerJBheader.smali
[*]smali/in <this is a folder for Update Activity and possible add on if u want to add stausbargreper >
[*]smali/com/spacecaker/ButtonBurst.smali
[*]smali/com/spacecaker/ButtonBurst$1.smali
[*]smali/com/spacecaker/SpaceLayOut.smali
[*]smali/com/spacecaker/SpaceLayOut$1.smali
[*]res/layout/jb_headerview.xml
[*]res/layout/quickpanel_quick_settings_space.xml
[*]res/drawable/tw_btn_default_small.xml
[*]res/drawable/btn_prof.xml
[*]res/drawable/ic_notify_quicksettings.xml
[*]res/drawable/set.xml
[*]res/drawable/status_bar_close.xml
[*]res/drawable/tw_btn_default_small
[*]res/drawable-hdpi/btn_tg.png
[*]res/drawable-hdpi/btn_toggles_normal.png
[*]res/drawable-hdpi/ic_notify_quicksettings_normal.png
[*]res/drawable-hdpi/ic_notify_quicksettings_pressed.png
[*]res/drawable-hdpi/quickpanel_title_background.9.png
[*]res/drawable-hdpi/title_jb_bar_header.9.png
[*]res/drawable-mdpi/btn_tg.png
[*]res/drawable-mdpi/btn_toggles_normal.png
[*]res/drawable-mdpi/brightness_normal.png
[*]res/drawable-mdpi/brightness_pressed.png
[*]res/drawable-mdpi/btn_set_normal.png
[*]res/drawable-mdpi/btn_set_pressed.png
[*]res/drawable-mdpi/my_prof_normal.png
[*]res/drawable-mdpi/my_prof_pressed.png
[*]res/drawable-mdpi/quickpanel_icon_bluetooth_off.png
[*]res/drawable-mdpi/quickpanel_icon_bluetooth_on.png
[*]res/drawable-mdpi/quickpanel_icon_data_off.png
[*]res/drawable-mdpi/quickpanel_icon_data_on.png
[*]res/drawable-mdpi/quickpanel_icon_gps_off.png
[*]res/drawable-mdpi/quickpanel_icon_gps_on.png
[*]res/drawable-mdpi/quickpanel_icon_rotation_off.png
[*]res/drawable-mdpi/quickpanel_icon_rotation_on.png
[*]res/drawable-mdpi/quickpanel_icon_silent_off.png
[*]res/drawable-mdpi/quickpanel_icon_sound_vibration_off_2.png
[*]res/drawable-mdpi/quickpanel_icon_sound_on_on.png
[*]res/drawable-mdpi/quickpanel_icon_sound_vibration_on.png
[*]res/drawable-mdpi/quickpanel_icon_vibration_off.png
[*]res/drawable-mdpi/quickpanel_icon_wifi_off.png
[*]res/drawable-mdpi/quickpanel_icon_wifi_on.png
[*]res/drawable-mdpi/quickpanel_plmn_background.png
[*]res/drawable-mdpi/quickpanel_quick_settings_background.png
[*]res/drawable-mdpi/status_bar_background.png * remove the old .9.png of this if its not there its ok *
[*]res/drawable-mdpi/status_bar_close_off.png * remove the old .9.png of this if its not there its ok *
[*]res/drawable-mdpi/status_bar_close_on.png * remove the old .9.png of this if its not there its ok *
[*]res/drawable-mdpi/tile_toggle.png
[*]res/drawable-mdpi/tw_quick_panel_clearbtn_focus.9.png
[*]res/drawable-mdpi/tw_quick_panel_clearbtn_normal.9.png
[*]res/drawable-mdpi/tw_quick_panel_clearbtn_press.9.png
[*]res/drawable-mdpi/tw_quick_panel_clearbtn_select.9.png
[*]res/layout/jb_headerview.xml
[*]res/layout/quickpanel_quick_settings_space.xml
[/LIST]

Ok now we are going to modify the

Status_bar_Tracking.xml

Make it look like this

<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.TrackingView android:orientation="vertical" android:background="#ff171b1e" android:paddingLeft="0.0px" android:paddingRight="0.0px" android:paddingBottom="0.0px" android:focusable="true" android:visibility="gone" android:descendantFocusability="afterDescendants"
xmlns:android="http://schemas.android.com/apk/res/android">
<View android:background="#00000000" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1.0" />
<com.android.systemui.statusbar.CarrierLabel android:textAppearance="@*android:style/TextAppearance.StatusBar.Icon" android:textSize="16.0sp" android:textColor="#00000000" android:gravity="center" android:layout_gravity="bottom" android:background="#00000000" android:layout_width="fill_parent" android:layout_height="24.0dip" />
<com.android.systemui.statusbar.CloseDragHandle android:layout_gravity="bottom" android:orientation="vertical" android:id="@id/close" android:background="#ffdf7c0d" android:focusable="true" android:clickable="true" android:layout_width="fill_parent" android:layout_height="32.0dip">
<ImageView android:focusable="true" android:clickable="true" android:layout_width="fill_parent" android:layout_height="32.0dip" android:src="@drawable/status_bar_close" android:scaleType="fitXY" />
</com.android.systemui.statusbar.CloseDragHandle>
</com.android.systemui.statusbar.TrackingView>

Next is

Statusbar.xm

abovel

com.android.systemui.statusbar.IconMerger

u will see something likes this

<LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/icons"

Make sure the Android:id=@id/icons"is present

make sure the above looks now like this

[B][COLOR="RoyalBlue"]<com.android.systemui.statusbar.StatusBarServiceLRPull android:layout_width="fill_parent" android:layout_height="wrap_content">[/COLOR][/B]
<LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/icons" android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.IconMerger android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/notificationIcons" android:paddingLeft="6.0dip" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0" android:layout_alignParentLeft="true" />
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/statusIcons" android:paddingRight="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_alignParentRight="true" />
<com.android.systemui.statusbar.Clock android:textAppearance="@*android:style/TextAppearance.StatusBar.Icon" android:textColor="#ffffffff" android:gravity="center" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
</LinearLayout>
[COLOR="RoyalBlue"][B] </com.android.systemui.statusbar.StatusBarServiceLRPull>[/B][/COLOR]

So it will look like this

<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.StatusBarView android:orientation="vertical" android:background="#ff000000" android:focusable="true" android:descendantFocusability="afterDescendants"
xmlns:android="http://schemas.android.com/apk/res/android">
[COLOR="RoyalBlue"][B] <com.android.systemui.statusbar.StatusBarServiceLRPull android:layout_width="fill_parent" android:layout_height="wrap_content">][/B][/COLOR]
<LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/icons" android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.IconMerger android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/notificationIcons" android:paddingLeft="6.0dip" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0" android:layout_alignParentLeft="true" />
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/statusIcons" android:paddingRight="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_alignParentRight="true" />
<com.android.systemui.statusbar.Clock android:textAppearance="@*android:style/TextAppearance.StatusBar.Icon" android:textColor="#ffffffff" android:gravity="center" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
</LinearLayout>
[B][COLOR="RoyalBlue"] </com.android.systemui.statusbar.StatusBarServiceLRPull>[/COLOR][/B]
<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="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="2.0dip" android:paddingRight="10.0dip" android:layout_width="0.0dip" android:layout_height="wrap_content" android:layout_weight="1.0">
<TextView android:textAppearance="@*android:style/TextAppearance.StatusBar.Ticker" android:textColor="#ffffffff" android:layout_width="fill_parent" android:layout_height="wrap_content" android:singleLine="true" />
<TextView android:textAppearance="@*android:style/TextAppearance.StatusBar.Ticker" android:textColor="#ffffffff" 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:background="#ff000000" android:textAppearance="@*android:style/TextAppearance.StatusBar.Icon" android:textColor="#00000000" android:gravity="left|center" android:id="@id/date" android:background="#00000000" android:paddingLeft="0.0px" android:paddingRight="0.0px" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
</com.android.systemui.statusbar.StatusBarView>

Now we are going to modify

Status_bar_expanded.xml

Make sure it looks something like this

<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.ExpandedView android:orientation="vertical" android:focusable="true" android:descendantFocusability="afterDescendants" android:layout_alignParentTop="true" style="@*android:style/Theme.NoTitleBar.Fullscreen"
xmlns:android="http://schemas.android.com/apk/res/android">
[B][COLOR="RoyalBlue"]<RelativeLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content" android:baselineAligned="false">
<include layout="@layout/jb_headerview" android:id="@id/spaceybeaneyheader" android:layout_width="fill_parent" android:layout_height="48.0dip" />
</RelativeLayout>[/COLOR][/B]
[COLOR="RoyalBlue"][B] <com.spacecaker.SpaceLayOut android:layout_width="fill_parent" android:layout_height="fill_parent">
<LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content">
<include layout="@layout/quickpanel_quick_settings_space" />
</LinearLayout>[/B][/COLOR]
<FrameLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1.0">
<ScrollView android:id="@id/scroll" android:scrollbars="none" android:fadingEdge="none" android:layout_width="fill_parent" android:layout_height="wrap_content" 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" android:layout_marginTop="6.0dip">
<TextView android:textSize="17.0sp" android:textStyle="normal" android:textColor="#ffffffff" android:id="@id/noNotificationsTitle" android:background="@drawable/quickpanel_title_background" android:paddingLeft="5.0dip" android:layout_width="fill_parent" android:layout_height="26.0dip" android:text="@string/status_bar_no_notifications_title" />
<TextView android:textSize="17.0sp" android:textStyle="normal" android:textColor="#ffffffff" android:id="@id/ongoingTitle" android:background="@drawable/quickpanel_title_background" android:paddingLeft="5.0dip" android:layout_width="fill_parent" android:layout_height="26.0dip" 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" />
<RelativeLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content">
<TextView android:textSize="17.0sp" android:textStyle="normal" android:textColor="#ffffffff" android:id="@id/latestTitle" android:background="@drawable/quickpanel_title_background" android:paddingLeft="5.0dip" android:layout_width="fill_parent" android:layout_height="26.0dip" android:text="@string/status_bar_latest_events_title" />
<Button android:textSize="16.0sp" android:textColor="#ffadc1d6" android:gravity="center" android:id="@id/clear_all_button" android:background="@drawable/tw_btn_default_small" android:padding="0.100000024dip" android:focusable="true" android:clickable="true" android:layout_width="@dimen/status_bar_expanded_clear_button_width" android:layout_height="fill_parent" android:layout_marginRight="4.0dip" android:text="@string/status_bar_clear_all_button" android:layout_alignParentRight="true" android:contentDescription="@string/accessibility_clear_all" style="@style/S3.Clear" />
</RelativeLayout>
<LinearLayout android:orientation="vertical" android:id="@id/latestItems" android:layout_width="fill_parent" android:layout_height="wrap_content" />
<ImageView android:layout_width="fill_parent" android:layout_height="wrap_content" android:src="@drawable/blank" />
</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>
[B][COLOR="RoyalBlue"] </com.spacecaker.SpaceLayOut>[/COLOR][/B]
</com.android.systemui.statusbar.ExpandedView>

What i have done is adding new

<com.spacecaker.SpaceLayOut android:layout_width="fill_parent" android:layout_height="fill_parent">
</com.spacecaker.SpaceLayOut>

lines + use other xml to load Quickpanel and JB header

to make it look much cleaner

Now we are going to

res/values/ids.xml

and we are going to add these ids

<item type="id" name="spaceybeaneyheader">false</item>
<item type="id" name="settings_button">false</item>
<item type="id" name="jbclock">false</item>
<item type="id" name="spacebuttonburst">false</item>
<item type="id" name="recent_app_button">false</item>

Now go to

res/values/strings.xml and we add these lines

<string name="accessibility_clear_all">Clear</string>
<string name="accessibility_settings_button">System settings.</string>
<string name="status_bar_date_formatter">"%1$s
%2$s"</string>

Now go to

res/values/Styles.xml

and add

this to the end of file

<style name="S3.Clear" parent="@*android:style/Widget.Button">
<item name="android:textAppearance">?android:textAppearanceSmallInverse</item>
<item name="android:textColor">#ffffffff</item>
<item name="android:gravity">center</item>
<item name="android:background">@drawable/tw_btn_default_small</item>
<item name="android:focusable">true</item>
<item name="android:clickable">true</item>
</style>

Now add all the Files i have given in the attachement *Space_Adds.zip*

and compile the apk

if u get a error do describe it in xda post so i can help u to fix

Now delete the Directory of ur decompiled apk

and

Decompiled the apk again * this is for the public IDS * sothey are added

Now

go to

res/values/public.xml and find these

<public type="drawable" name="btn_tg"
<public type="drawable" name="btn_toggles_normal"

Now goto

smali/com/spacecaker/ButtonBurst.smali

and find this

const v3, 0x7f020180

change it to the Public ID code u got from

<public type="drawable" name="btn_toggles_normal"

Now find this

const v3, 0x7f02017f

change it to the public id u got from

<public type="drawable" name="btn_tg"

now goto smali\com\android\systemui\statusbar\policy.dateview.smali

and find this

const v4, 0x[COLOR="Magenta"]7f07002a[/COLOR]

change the colored part to the public id u got from

<public type="string" name="status_bar_date_formatter"

and now We are done for this part

now lets add the

Settings

Display

and

Prof/Contact button

goto

smali/com/android/systemui/statusbar/StatusBarService.smali

find

.method public addIcon

and above it add these

.method public BrightnessButton(Landroid/view/View;)V
.locals 3
.parameter "v"

.prologue
.line 1717
invoke-virtual {p1}, Landroid/view/View;->getContext()Landroid/content/Context;

move-result-object v0

new-instance v1, Landroid/content/Intent;

[COLOR="Magenta"][I]const-string v2, "android.settings.DISPLAY_SETTINGS"[/I][/COLOR]

invoke-direct {v1, v2}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

const/high16 v2, 0x1000

invoke-virtual {v1, v2}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;

move-result-object v1

invoke-virtual {v0, v1}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V

invoke-virtual {p0}, Lcom/android/systemui/statusbar/StatusBarService;->animateCollapse()V

.line 1720
return-void
.end method

.method public ProfileButton(Landroid/view/View;)V
.locals 3
.parameter "v"

.prologue
.line 1717
invoke-virtual {p1}, Landroid/view/View;->getContext()Landroid/content/Context;

move-result-object v0

new-instance v1, Landroid/content/Intent;

[COLOR="Magenta"][I] const-string v2, "com.android.contacts.action.LIST_DEFAULT"[/I][/COLOR]

invoke-direct {v1, v2}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

const/high16 v2, 0x1000

invoke-virtual {v1, v2}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;

move-result-object v1

invoke-virtual {v0, v1}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V

invoke-virtual {p0}, Lcom/android/systemui/statusbar/StatusBarService;->animateCollapse()V

.line 1720
return-void
.end method

.method public SpaceCakerButton(Landroid/view/View;)V
.locals 3
.parameter "v"

.prologue
.line 1717
invoke-virtual {p1}, Landroid/view/View;->getContext()Landroid/content/Context;

move-result-object v0

new-instance v1, Landroid/content/Intent;

[COLOR="Magenta"][I]const-string v2, "android.settings.SETTINGS"[/I][/COLOR]

invoke-direct {v1, v2}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

const/high16 v2, 0x1000

invoke-virtual {v1, v2}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;

move-result-object v1

invoke-virtual {v0, v1}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V

invoke-virtual {p0}, Lcom/android/systemui/statusbar/StatusBarService;->animateCollapse()V

.line 1720
return-void
.end method

now compile the apk and it should work now :D

Special Thanks to

Matz69

DCSMS

SpaceCaker