[Guide]4.2.2 Statusbar For GB roms [COOL][GB]

Search This thread

SpaceCaker

Senior Member
Mar 26, 2011
13,545
10,904
netherlands
www.youtube.com
Wasn't that this type of Statusbar was first made by @marinalin85? *No Offence*

Just saying

this one is different in some parts

he used lidroid toggles in quickview

and i did credit him

after figuring out all modifications done

and i had this typebof statusbar before but with dcsms miui toggle bottom
and modded to 2 pngs but thanks to marina we have it in one button


Sent from my S500 using xda app-developers app
 
V

vale amicis

Guest
this one is different in some parts

he used lidroid toggles in quickview

and i did credit him

after figuring out all modifications done

and i had this typebof statusbar before but with dcsms miui toggle bottom
and modded to 2 pngs but thanks to marina we have it in one button


Sent from my S500 using xda app-developers app
Okay :)

Will it work on CM7 based rom's too o_O
 

balamu96m

Senior Member
May 2, 2011
1,216
1,304
Chennai
mind blowing work bro!!

thanks! Good to see hard-core reverse engineering after a long time!

Sent from my Micromax A110 using xda app-developers app
 

SpaceCaker

Senior Member
Mar 26, 2011
13,545
10,904
netherlands
www.youtube.com

Attachments

  • uploadfromtaptalk1371567941278.jpg
    uploadfromtaptalk1371567941278.jpg
    38.4 KB · Views: 472
  • Like
Reactions: sandy7
S

SuperDroid-BOND

Guest
this was his screenshot

Sent from my S500 using xda app-developers app

SIR,
Is it possible to port this to JB coz I m gonna try this. Just a few questions, what files I need to delete from original and/or what major modifications do I have to follow or remember.

BTW thanks a ton for this awesome guide SIR.
 

K.A.

Senior Member
Apr 4, 2012
6,360
1,272
FINALLY you made a guide for that!!! :eek::eek:
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 112
    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




    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
    u will see something likes this
    Code:
    <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

    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>
    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


    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
    change it to the Public ID code u got from
    Code:
    <public type="drawable" name="btn_toggles_normal"

    Now find this

    Code:
        const v3, 0x7f02017f
    change it to the public id u got from
    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 :D

    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
    38
    Tutorial for adding new toggles

    How to add new toggles ?


    As u can see i highlighted some stuff with pink color
    Code:
    [COLOR="Magenta"][I]const-string v2, "android.settings.DISPLAY_SETTINGS"[/I][/COLOR]
    As u can see it has this tag inside
    Code:
    android.settings.DISPLAY_SETTINGS
    this is the package/action name of a app / option inside settings.apk
    u can change this to any thin u want like
    taskmanager it will be like this

    Code:
    const-string v2, "com.sec.android.app.controlpanel.MAIN"
    now if u add it to a new Onclick method it will look like this

    Code:
    [COLOR="RoyalBlue"].method public TaskManagerButtonSpaceTutorial[/COLOR](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="RoyalBlue"]const-string v2, "com.sec.android.app.controlpanel.MAIN[/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

    this is a new method

    of course it wont work yet as u need to add it to the layout

    goto res/layout/quickpanel_quick_settings_space.xml

    add something like this

    Code:
                        <FrameLayout android:id="@id/settings_button" android:background=     [user=3944923]@drawab[/user]le/tile_toggle" android:layout_width="106.0px" android:layout_height="100.0px" android:layout_weight="1.0">
                            <ImageView android:layout_gravity="center_horizontal" android:layout_width="wrap_content" android:layout_height="wrap_content" [COLOR="Red"]android:src=     [user=3944923]@drawab[/user]le/taskmanagerpng" [/COLOR][COLOR="Red"]android:onClick="TaskManagerButtonSpaceTutorial"[/COLOR] />
                            <TextView android:textSize="12.0dip" android:textColor="#ffffffff" android:gravity="center" android:layout_gravity="bottom" android:background="#00000000" android:layout_width="106.0px" android:layout_height="wrap_content" android:layout_marginBottom="15.0px" [COLOR="Red"]android:text="TaskManager"[/COLOR] />
                        </FrameLayout>

    the red stuff u need to edit to the app/ icon / text /
    Code:
     .method public TaskManagerButtonSpaceTutorial
    u used
    @drawable/taskmanagerpng u need to add a png that has the name taskmanagerpng to drawable-mdpi

    Code:
    android:onClick="[COLOR="Magenta"]TaskManagerButtonSpaceTutorial[/COLOR]"
    noticed the pink part ?
    this is the text i used after .method public
    this makes the button actually work


    And ofcourse
    Code:
    android:text="[COLOR="Magenta"]TaskManager[/COLOR]"
    this is what the text needs to say under the app :D
    22
    Screenshots

    Note these are form Galaxy Acei

    and has a Brightness Panel and Taking Care of Lidroid * i did NOT include it in this tut yet *

    uploadfromtaptalk1370620736149.jpg
    uploadfromtaptalk1370620755098.jpg

    Another Note:

    i cant help without logcat

    also please take some time
    compare and try and error
    this isnt a easy guide or easy to do so take time.
    i dont wanna waste time by doing it all for you, i have my own timeaswell;)
    7
    Use this layout file if u port to non samsung device ;)

    rename .zip to .xml
    4
    First.... Great Guide mate :good: . maybe i will update my TouchWiz Nature S theme ;)