How to add 4.2.2 Statusbar to youre GingerBread rom
In this guide i will show u how to add 4.2.2 statusbar
Note:!!!!!!! If u are new to modifying apps Dont try this Please.. u must know how to mod first before u gonna try as u will definetly end up in some errors or possible FCs
Read the thread/OP/first 1/2 posts FULLY! if u dont read it fully i wont provide support as u are to lazy to even read in the first place. if u read full 1st page i can help u
do add logcats if FC * how to do this is also described here!*.
I will NOT HELP if u not take time and try to attempt some stuff before u ask me! Thanks
Ok now we are going to modify the
Status_bar_Tracking.xml
Make it look like this
Next is
Statusbar.xm
abovel
u will see something likes this
Make sure the Android:id=@id/icons"is present
make sure the above looks now like this
So it will look like this
Now we are going to modify
Status_bar_expanded.xml
Make sure it looks something like this
What i have done is adding new
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
Now go to
res/values/strings.xml and we add these lines
Now go to
res/values/Styles.xml
and add
this to the end of file
now add a dimens.xml or edit ur dimens.xml
and add this line
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
Now goto
smali/com/spacecaker/ButtonBurst.smali
and find this
change it to the Public ID code u got from
Now find this
change it to the public id u got from
now goto smali\com\android\systemui\statusbar\policy.dateview.smali
and find this
change the colored part to the public id u got from
and now We are done for this part
now lets add the
goto
smali/com/android/systemui/statusbar/StatusBarService.smali
find
and above it add these
now compile the apk and it should work now
if u port the UI to non samsung device do use this layout xml http://xdaforums.com/showpost.php?p=42702913&postcount=59
if it doesn't work please take a logcat * A full logcat with ADB and not with catlog or logcat apps on phone if preferable use this command adb logcat -v long > logcat.txt this way i can help also dont cut the logcat just keep it full as there are more parts that are needed to see instead of only a E/androidruntime error
Special Thanks to
Matz69
DCSMS
auliaYF
marinalin
and everyone who helped
SpaceCaker
if i am missing credits or whatsoever PM me and i will set
In this guide i will show u how to add 4.2.2 statusbar
Note:!!!!!!! If u are new to modifying apps Dont try this Please.. u must know how to mod first before u gonna try as u will definetly end up in some errors or possible FCs
Read the thread/OP/first 1/2 posts FULLY! if u dont read it fully i wont provide support as u are to lazy to even read in the first place. if u read full 1st page i can help u
do add logcats if FC * how to do this is also described here!*.
I will NOT HELP if u not take time and try to attempt some stuff before u ask me! Thanks
Ok now we are going to modify the
Status_bar_Tracking.xml
Make it look like this
Code:
<?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
Code:
com.android.systemui.statusbar.IconMerger
Code:
<LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/icons"
make sure the above looks now like this
Code:
[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
Code:
<?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
Code:
<?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
Code:
<com.spacecaker.SpaceLayOut android:layout_width="fill_parent" android:layout_height="fill_parent">
</com.spacecaker.SpaceLayOut>
to make it look much cleaner
Now we are going to
res/values/ids.xml
and we are going to add these ids
Code:
<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
Code:
<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
Code:
<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 a dimens.xml or edit ur dimens.xml
and add this line
Code:
<dimen name="status_bar_expanded_notification_clear_button_text_size">17.0dip</dimen>
<dimen name="status_bar_expanded_notification_category_text_size">17.0dip</dimen>
<dimen name="status_bar_expanded_clear_button_width">123.0dip</dimen>
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
Code:
<public type="drawable" name="btn_tg"
<public type="drawable" name="btn_toggles_normal"
Now goto
smali/com/spacecaker/ButtonBurst.smali
and find this
Code:
const v3, 0x7f020180
Code:
<public type="drawable" name="btn_toggles_normal"
Now find this
Code:
const v3, 0x7f02017f
Code:
<public type="drawable" name="btn_tg"
now goto smali\com\android\systemui\statusbar\policy.dateview.smali
and find this
Code:
const v4, 0x[COLOR="Magenta"]7f07002a[/COLOR]
change the colored part to the public id u got from
Code:
<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
Code:
.method public addIcon
and above it add these
Code:
.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
if u port the UI to non samsung device do use this layout xml http://xdaforums.com/showpost.php?p=42702913&postcount=59
if it doesn't work please take a logcat * A full logcat with ADB and not with catlog or logcat apps on phone if preferable use this command adb logcat -v long > logcat.txt this way i can help also dont cut the logcat just keep it full as there are more parts that are needed to see instead of only a E/androidruntime error
Special Thanks to
Matz69
DCSMS
auliaYF
marinalin
and everyone who helped
SpaceCaker
if i am missing credits or whatsoever PM me and i will set
Attachments
Last edited: