[2-in-1 TUT][MOD][PORT] Swipe To Remove Notification for Froyo [Updated - 24/2/13]

Search This thread

shwetanklal

Senior Member
May 14, 2011
392
508
Re: [TUT][MOD] JB Styled Notification Drawer for Froyo [Optional Mods #4 - 12/2/13]

@jason
May be clear button tutorial is not complete. For me default clear button still appeared (appear always and not functional) which need to be disable. or may be i did smthing wrong while trying to implement all mods at once.
Will try again toni8.
 

Jason-EX

Senior Member
Sep 13, 2011
1,063
977
@jason
May be clear button tutorial is not complete. For me default clear button still appeared (appear always and not functional) which need to be disable. or may be i did smthing wrong while trying to implement all mods at once.
Will try again toni8.
Just remove:
Code:
                    <Button android:textSize="14.0sp" android:layout_gravity="center_vertical" android:id="@id/clear_all_button" android:layout_width="75.0dip" android:layout_height="wrap_content" android:layout_marginTop="5.0dip" android:layout_marginRight="6.0dip" android:text="@string/status_bar_clear_all_button" style="?android:attr/buttonStyleSmall" />

EDIT: Added this to the first post, sorry for not being specific.
 
Last edited:
  • Like
Reactions: shwetanklal

Jason-EX

Senior Member
Sep 13, 2011
1,063
977
Added "Hiding Status Bar when expanded" to first post, Enjoy! ;)

SC20050101-031731_zpsee880061.png


This is really looking like JB :D
 
Last edited:

Jason-EX

Senior Member
Sep 13, 2011
1,063
977
Awesome mod to hide status bar!:victory: Now it disappear soo smoothly!!
Only one thing i noticed.. If you open status bar and connect usb you'll see some text. But it doesn't bother me :) Also it'll be better to put time/datу to top. But i think it's not possible..

Thanks again :good:
I'll try to think of a way. If It's possible to move the time and date to the very top, it can also block the USB text. I'll do some experiments ;)
 

aarsg3app

Member
Oct 29, 2011
20
3
Mangalore
Hi jason..can u add screenshot option in power menu..jus a small request...or can u help @shwetanklal to implement tis option in his rom...thank u
 

zygis10

Senior Member
Jan 28, 2013
291
93
Kaunas
Hi, can you make a tutorial how to make a swipe effect (like in your clear button) when cleaning notifications? Thanks
 

Jason-EX

Senior Member
Sep 13, 2011
1,063
977
Hi jason..can u add screenshot option in power menu..jus a small request...or can u help @shwetanklal to implement tis option in his rom...thank u
I tried that, but I got some error that says "mBitmap is null".

Hi, can you make a tutorial how to make a swipe effect (like in your clear button) when cleaning notifications? Thanks
That might be possible now that I think of it. Will try.
 
  • Like
Reactions: zygis10

aarrun

Senior Member
Jan 12, 2011
655
310
30
Mumbai
jason u have reached so far now that i think u can make the settings.apk layout same as android 4+ and even the activity title bar too. hope to see these two stuffs from u in the future. atkeast give it a try :).
 
  • Like
Reactions: Nil253259

Top Liked Posts

  • There are no posts matching your filters.
  • 22
    Swipe-to-remove Notification for Froyo

    Well I finally figure it all out. It looks simple, but it took me nearly two months to finish this. This should work in other Froyo phones as well. ;)

    Disclaimer: I take no responsibility whatsoever. This is based on stock XXJPS framework, but it should also work with others.

    To developers and themers, you are free to use this in your ROM, but please post a link to this thread and give proper credits to me and hansip87.

    Credits/Thanks:


    a. Decompile "framework-res.apk"
    b. Download "swipe-framework-res.zip" and extract those two files to "/res/anim/"
    c. Open "/res/layout/status_bar_latest_event.xml"

    Now change the "<LinearLayout" to "<com.android.server.status.LatestItemContainer" like this:

    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="65.0sp"
      xmlns:android="http://schemas.android.com/apk/res/android">
        <com.android.server.status.LatestItemView android:id="@id/content" android:background="@drawable/status_bar_item_background" android:paddingRight="6.0sp" android:focusable="true" android:clickable="true" android:layout_width="fill_parent" android:layout_height="64.0sp" />
        <View android:background="@drawable/divider_horizontal_bright" android:layout_width="fill_parent" android:layout_height="1.0sp" />
    </LinearLayout>

    to this:

    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <[B]com.android.server.status.LatestItemContainer [/B]android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="65.0sp"
      xmlns:android="http://schemas.android.com/apk/res/android">
        <com.android.server.status.LatestItemView android:id="@id/content" android:background="@drawable/status_bar_item_background" android:paddingRight="6.0sp" android:focusable="true" android:clickable="true" android:layout_width="fill_parent" android:layout_height="64.0sp" />
        <View android:background="@drawable/divider_horizontal_bright" android:layout_width="fill_parent" android:layout_height="1.0sp" />
    </[B]com.android.server.status.LatestItemContainer[/B]>

    d. Now the IDs for "slide_out_left_basic.xml" and "slide_out_right_basic.xml", so basically, compile it and then decompile it again.
    e. Open "/res/value/public.xml" in Notepad++ and you should get something like this:

    Code:
        <public type="anim" name="slide_out_left_basic" id="[B]0x010a0048[/B]" />
        <public type="anim" name="slide_out_right_basic" id="[B]0x010a0049[/B]" />

    You may have a different ID depending on the ROM you're using, so just keep a note of it.



    a. Decompile "services.jar"
    b. Download "swipe-services.zip" and extract all three files to "/out/com/android/server/status/"
    (If you already have the JB mods installed, then change "StatusBarService$41.smali" to "StatusBarService$42.smali".)
    c. Open "LatestItemContainer$1.smali" and find this line:

    Code:
        .line 47
        const v1,[B] 0x10a0049[/B]
    (This code refers to the "slide_out_right_basic.xml" ID, so if you have a different one, just change it)

    And this line:

    Code:
        .line 49
        :cond_3c
        const v1, [B]0x10a0048[/B]
    (This one refers to the "slide_out_left_basic.xml" ID, so if you have a different one, just change it)

    Save and close.

    d. Open "/out/com/android/server/status/StatusBarService.smali"

    Find this line:
    Code:
        invoke-virtual {v0, v1, v2, v3}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;

    and below "move-result-object v17", remove these following line:
    Code:
        .line 1346
        .local v17, row:Landroid/view/View;

    then paste these lines:
    Code:
       [B] check-cast v17, Lcom/android/server/status/LatestItemContainer;
    
        .line 1346
        .local v17, row:Lcom/android/server/status/LatestItemContainer;
        iget-boolean v4, v15, Lcom/android/server/status/NotificationData;->clearable:Z
    
        if-eqz v4, :cond_ae
    
        .line 1600
        new-instance v4, Lcom/android/server/status/StatusBarService$41;
    
        move-object v0, v4
    
        move-object/from16 v1, p0
    
        move-object v2, v15
    
        invoke-direct {v0, v1, v2}, Lcom/android/server/status/StatusBarService$41;-><init>(Lcom/android/server/status/StatusBarService;Lcom/android/server/status/NotificationData;)V
    
        move-object/from16 v0, v17
    
        move-object v1, v4
    
        invoke-virtual {v0, v1}, Lcom/android/server/status/LatestItemContainer;->setOnSwipeCallback(Ljava/lang/Runnable;)V
    
        .line 1606
        :cond_ae[/B]
        const v4, 0x1020002
    
        move-object/from16 v0, v17
    
        move v1, v4
    
        [B]invoke-virtual {v0, v1}, Lcom/android/server/status/LatestItemContainer;->findViewById(I)Landroid/view/View;[/B]
    (remember, "StatusBarService$41")

    Find this line:
    Code:
        invoke-virtual {v0, v1}, Landroid/view/View;->setDrawingCacheEnabled(Z)V

    change to:
    Code:
        invoke-virtual {v0, v1}, Lcom/android/server/status/LatestItemContainer;->setDrawingCacheEnabled(Z)V

    e. Open "/out/com/android/server/status/StatusBarService$NotificationCallbacks.smali" and add this code above "onNotificationClick"
    Code:
    .method public abstract onNotificationClear(Ljava/lang/String;Ljava/lang/String;I)V
    .end method

    f. Open "/out/com/android/server/NotificationManagerService$1.smali" and also add these codes above "onNotificationClick"
    Code:
    .method public onNotificationClear(Ljava/lang/String;Ljava/lang/String;I)V
        .registers 10
        .parameter "pkg"
        .parameter "tag"
        .parameter "id"
    
        .prologue
        .line 346
        iget-object v0, p0, Lcom/android/server/NotificationManagerService$1;->this$0:Lcom/android/server/NotificationManagerService;
    
        const/4 v4, 0x0
    
        const/16 v5, 0x40
    
        move-object v1, p1
    
        move-object v2, p2
    
        move v3, p3
    
        #calls: Lcom/android/server/NotificationManagerService;->cancelNotification(Ljava/lang/String;Ljava/lang/String;III)V
        invoke-static/range {v0 .. v5}, Lcom/android/server/NotificationManagerService;->access$500(Lcom/android/server/NotificationManagerService;Ljava/lang/String;Ljava/lang/String;III)V
    
        .line 347
        return-void
    .end method

    g. Save everything, compile, and you're finished ;)

    SC20130220-011648_zpsff778df8.png



    NOTE (if you have JB mod installed): Tricky part is the smali numbering. You can't only change the file number, you also need to change the codes inside StatusBarService.smali to refer to it. Remember, $41 to $42. DO NOT GET BOTH MIXED UP!
    12
    JellyBean Styled Notification Drawer​

    Disclaimer: I take no responsibility whatsoever. Please note that this tutorial is for "deodex-ed" frameworks only. If your current ROM is "odex-ed", then deodex it using this method or just grab a copy of a deodex-ed theme. And if you want this in a custom ROM you like, then I suggest you to ask the developer to apply these features themselves.

    To developers and themers, you are free to use this in your ROM or Theme, but please give proper credits.

    Credits/Thanks:

    Requirement:
    • APK Multi-Tool for de-compiling and compiling APKs.
    • Smali/Baksmali for de-compiling and compiling JARs.
    • Notepad++ for editing XML and SMALI files.
    • Adobe Photoshop or GIMP for editing framework images (optional).
    • A copy of "twframework-res.apk" and "services.jar" from "/system/framework/".
    • And a backup copy of those two framework files.

    How to de-compile and compile APK and JAR files

    For APKs,
    1. Download APK Multi-Tool from here. (Skip this part if you already have "APK Manager" or APKTool".)
    2. Extract and run "Setup.exe". (Skip this part if you already have "APK Manager" or APKTool".)
    3. Place the file needed for this mod in "place-apk-here-for-modding".
    4. Decompile it (no.9), and start editing files needed.
    5. After that, set compression level to "0" (no.21), then compile (no.11).

    For JARs,
    1. Download Smali/Baksmali from here.
    2. Cut and paste them to a directory that is easy to get access (I recommend "C:/").
    3. Place the required file to be edit to the same directory.
    4. Now type in command prompt: "cd\" (enter) "cd /directory/".
    5. To de-compile, type: "java -jar baksmali.jar -x for-modding.jar -o out".
    6. To compile, type: "java -jar smali.jar -x out -o classes.dex".
    7. Then replace the classes.dex with the original JAR file that you want to edit.


    Adding Time and Date

    1. De-compile "services.jar".
    2. Download "JB-time-date.zip" from attachment, then extract both files to "/out/com/android/server/status/".
    3. Compile "services.jar".
    4. De-compile "twframework-res.apk" then open "twframework-res/res/layout/status_bar_expanded.xml".

    Add this code above the first "<LinearLayout"
    Code:
        <RelativeLayout android:orientation="horizontal" android:background="@color/tw_color002" android:layout_width="fill_parent" android:layout_height="47.0dip">
            <LinearLayout android:orientation="horizontal" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true">
                <com.android.server.status.StatusBarJellyHeaderView android:layout_width="wrap_content" android:layout_height="wrap_content" />
            </LinearLayout>
        </RelativeLayout>

    6. Save and compile "twframework-res.apk"

    SC20130209-190451-Copy_zps1bbc6c44.png


    1. Download "JB-clear-btn.zip" from attachment below.
    2. Decompile "twframework-res.apk"
    3. Extract "JB-clear-btn.zip" and copy those two images to "/res/drawable-ldpi/"
    4. Copy "btn_clear.xml" to "/res/drawable"
    5. Open "/res/layout/status_bar_expanded.xml"

    Find this code added from the Time and Date:
    Code:
        <RelativeLayout android:orientation="horizontal" android:background="@color/tw_color002" android:layout_width="fill_parent" android:layout_height="47.0dip">
            <LinearLayout android:orientation="horizontal" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true">
                <com.android.server.status.StatusBarJellyHeaderView android:layout_width="wrap_content" android:layout_height="wrap_content" />
            </LinearLayout>
        </RelativeLayout>

    Then add this code:
    Code:
        <RelativeLayout android:orientation="horizontal" android:background="@color/tw_color002" android:layout_width="fill_parent" android:layout_height="47.0dip">
            <LinearLayout android:orientation="horizontal" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true">
                <com.android.server.status.StatusBarJellyHeaderView android:layout_width="wrap_content" android:layout_height="wrap_content" />
            </LinearLayout>
            [B]<LinearLayout android:orientation="horizontal" android:paddingRight="6.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true">
                <Button android:textColor="@android:color/transparent" android:layout_gravity="center_vertical" android:id="@id/clear_all_button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/status_bar_clear_all_button" style="@style/Btn.Clear" />
            </LinearLayout>[/B]
        </RelativeLayout>

    And remove this code:
    Code:
                        <Button android:textSize="14.0sp" android:layout_gravity="center_vertical" android:id="@id/clear_all_button" android:layout_width="75.0dip" android:layout_height="wrap_content" android:layout_marginTop="5.0dip" android:layout_marginRight="6.0dip" android:text="@string/status_bar_clear_all_button" style="?android:attr/buttonStyleSmall" />

    6. Open "/res/value/styles.xml"

    Paste this code at the end of the file:
    Code:
        <style name="Btn.Clear" parent="@*android:style/Widget.Button">
            <item name="android:textColor">#ffffffff</item>
            <item name="android:gravity">center</item>
            <item name="android:background">@drawable/btn_clear</item>
            <item name="android:clickable">true</item>
        </style>

    7. Save everything and compile "twframework-res.apk"

    SC20130210-070055_zps5accc2a1.png


    Adding Settings shortcut button
    1. Download "JB-settings-btn.zip" from attachment below.
    2. Decompile "twframework-res.apk" and open "/res/layout/status_bar_expanded.xml"

    Find the code added from Clear button
    Code:
        <RelativeLayout android:orientation="horizontal" android:background="@color/tw_color002" android:layout_width="fill_parent" android:layout_height="47.0dip">
            <LinearLayout android:orientation="horizontal" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true">
                <com.android.server.status.StatusBarJellyHeaderView android:layout_width="wrap_content" android:layout_height="wrap_content" />
            </LinearLayout>
            <LinearLayout android:orientation="horizontal" android:paddingRight="6.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true">
                <Button android:textColor="@android:color/transparent" android:layout_gravity="center_vertical" android:id="@id/clear_all_button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/status_bar_clear_all_button" style="@style/Btn.Clear" />
            </LinearLayout>
        </RelativeLayout>

    Then add these two lines:
    Code:
        <RelativeLayout android:orientation="horizontal" android:background="@color/tw_color002" android:layout_width="fill_parent" android:layout_height="47.0dip">
            <LinearLayout android:orientation="horizontal" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true">
                <com.android.server.status.StatusBarJellyHeaderView android:layout_width="wrap_content" android:layout_height="wrap_content" />
            </LinearLayout>
            <LinearLayout android:orientation="horizontal" android:paddingRight="6.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true">
                <Button android:textColor="@*android:color/transparent" android:layout_gravity="center_vertical" android:id="@id/clear_all_button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/status_bar_clear_all_button" style="@style/Btn.Clear" />
                [B]<View android:visibility="invisible" android:layout_width="1.0dip" android:layout_height="wrap_content" />
                <ImageView android:layout_gravity="center_vertical" android:id="@id/settings_button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/ic_notify_quicksettings" android:contentDescription="@string/accessibility_settings_button" />[/B]
            </LinearLayout>
        </RelativeLayout>

    3. Open "/res/value/ids.xml" and add this code at the end of the file:
    Code:
        <item type="id" name="settings_button">false</item>

    4. Open "/res/value/strings.xml" and add this code at the end of the file:
    Code:
        <string name="accessibility_settings_button">System settings.</string>

    4. Extract the two images from "JB-settings-btn.zip" and paste it in "/res/drawable-ldpi/", then extract "ic_notify_quicksettings.xml" and paste it in "/res/drawable/".
    5. Now you'll have to compile "twframework-res.apk" and decompile it again
    6. Open "/res/value/public.xml" and find this line:
    Code:
        <public type="id" name="settings_button" id="[B]0x02040061[/B]" />

    (Keep a note of the ID value)

    7. Decompile "services.jar" and open "/out/com/android/server/status/StatusBarServices.smali"
    8. Find this line:
    Code:
    .field mScrollView:Landroid/widget/ScrollView;

    Then paste these two lines below:
    Code:
    .field mSettingsBut:Landroid/view/View;
    
    .field private mSettingsButListener:Landroid/view/View$OnClickListener;

    9. Find this line:
    Code:
        iput-object v0, p0, Lcom/android/server/status/StatusBarService;->mStopTracing:Ljava/lang/Runnable;

    Then paste these lines below:
    Code:
        .line 4000
        new-instance v0, Lcom/android/server/status/StatusBarService$41;
    
        invoke-direct {v0, p0}, Lcom/android/server/status/StatusBarService$41;-><init>(Lcom/android/server/status/StatusBarService;)V
    
        iput-object v0, p0, Lcom/android/server/status/StatusBarService;->mSettingsButListener:Landroid/view/View$OnClickListener;

    10. Find this line:
    Code:
        iput v7, p0, Lcom/android/server/status/StatusBarService;->mEdgeBorder:I

    Then paste these lines below:
    Code:
        .line 611
        const v7, 0x2040061
    
        invoke-virtual {v1, v7}, Lcom/android/server/status/ExpandedView;->findViewById(I)Landroid/view/View;
    
        move-result-object v7
    
        iput-object v7, p0, Lcom/android/server/status/StatusBarService;->mSettingsBut:Landroid/view/View;
    
        .line 612
        iget-object v7, p0, Lcom/android/server/status/StatusBarService;->mSettingsBut:Landroid/view/View;
    
        iget-object v8, p0, Lcom/android/server/status/StatusBarService;->mSettingsButListener:Landroid/view/View$OnClickListener;
    
        invoke-virtual {v7, v8}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    (Change the ID if you got a different one)
    Code:
        .line 611
        const v7, [B]0x2040061[/B]

    11. Now extract "StatusBarServices$41" from "JB-settings-btn" and paste it in "/out/com/android/server/status/"
    12. Compile both "twframework-res.apk" and "services.jar"

    SC20130209-190451_zpsaa0bd398.png


    Hiding the Status Bar when expanded

    1. Grab a "framework-res.apk" and de-compile it
    2. Go to "/res/layout/status_bar.xml"
    3. Find the "DateView" code at the bottom of the file:
    Code:
        <com.android.server.status.DateView

    Remove the whole line and replace it with this code:
    Code:
        <com.android.server.status.DateView android:textSize="0.00999999dip" android:textStyle="normal" android:textColor="#ff000000" android:gravity="center" android:id="@id/date" android:background="@color/black" android:paddingLeft="6.0px" android:paddingRight="6.0px" android:layout_width="fill_parent" android:layout_height="fill_parent" android:singleLine="true" />

    SC20050101-031731_zpsee880061.png
    11
    Adding Carrier Label

    1. Decompile "services.jar"
    2. Download "JB-carrier-label.zip" from attachment and extract those files to "/out/com/android/server/status/"
    3. Save and compile "services.jar"
    4. Decompile "twframework-res.apk" and open "/res/layout/status_bar_tracking.xml"
    5. Find this line:
    Code:
        <com.android.server.status.CloseDragHandle android:orientation="vertical" android:id="@id/close" android:layout_width="fill_parent" android:layout_height="wrap_content">

    Then paste this line below:
    Code:
            <com.android.server.status.CarrierLabel android:textSize="15.0dip" android:textColor="#ffffffff" android:gravity="center_horizontal" android:background="@drawable/status_bar_background" android:paddingBottom="4.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" />

    6. Then open "/res/layout/status_bar_expanded.xml" and find this code:
    Code:
                   <LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content">
                        <LinearLayout android:layout_gravity="center_vertical" android:orientation="vertical" android:paddingBottom="1.0dip" android:layout_width="0.0dip" android:layout_height="wrap_content" android:layout_marginLeft="5.0dip" android:layout_marginTop="1.0dip" android:layout_weight="1.0">
                            <TextView android:textAppearance="?android:textAppearanceMedium" android:textColor="@color/tw_color001" android:layout_gravity="center_vertical" android:id="@id/plmnLabel" android:paddingLeft="4.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" />
                            <TextView android:textAppearance="?android:textAppearanceMedium" android:textColor="@color/tw_color001" android:layout_gravity="center_vertical" android:id="@id/spnLabel" android:paddingLeft="4.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" />
                        </LinearLayout>
                        <Button android:textSize="14.0sp" android:layout_gravity="center_vertical" android:id="@id/clear_all_button" android:layout_width="75.0dip" android:layout_height="wrap_content" android:layout_marginTop="5.0dip" android:layout_marginRight="6.0dip" android:text="@string/status_bar_clear_all_button" style="?android:attr/buttonStyleSmall" />
                    </LinearLayout>

    And change the height of the first "Linear Layout" to "0.0dip":
    Code:
                   <LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="[B]0.0dip[/B]">
                        <LinearLayout android:layout_gravity="center_vertical" android:orientation="vertical" android:paddingBottom="1.0dip" android:layout_width="0.0dip" android:layout_height="wrap_content" android:layout_marginLeft="5.0dip" android:layout_marginTop="1.0dip" android:layout_weight="1.0">
                            <TextView android:textAppearance="?android:textAppearanceMedium" android:textColor="@color/tw_color001" android:layout_gravity="center_vertical" android:id="@id/plmnLabel" android:paddingLeft="4.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" />
                            <TextView android:textAppearance="?android:textAppearanceMedium" android:textColor="@color/tw_color001" android:layout_gravity="center_vertical" android:id="@id/spnLabel" android:paddingLeft="4.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" />
                        </LinearLayout>
                        <Button android:textSize="14.0sp" android:layout_gravity="center_vertical" android:id="@id/clear_all_button" android:layout_width="75.0dip" android:layout_height="wrap_content" android:layout_marginTop="5.0dip" android:layout_marginRight="6.0dip" android:text="@string/status_bar_clear_all_button" style="?android:attr/buttonStyleSmall" />
                    </LinearLayout>

    7. Save and compile "twframework-res.apk"

    SC20130210-080255_zps0e02107d.png


    Making the Tracking Bar clickable

    1. Decompile "twframework-res.apk" and open "/res/layout/status_bar_tracking.xml"
    2. Replace the whole "<ImageView" code with:
    Code:
            <ImageView android:layout_gravity="bottom" android:layout_width="fill_parent" android:layout_height="wrap_content" android:src="@drawable/status_bar_tracker" android:scaleType="fitXY" style="@style/Closer.bar" />

    3. Download "JB-pressed-tracker.zip" from attachment below, and extract "status_bar_tracker.xml" to "/res/drawable/"
    4. Open "/res/value/styles.xml" and add these code at the end of the file:
    Code:
        <style name="Closer.bar" parent="@android:style/Widget.Button">
            <item name="android:gravity">center</item>
            <item name="android:background">@drawable/status_bar_close_on</item>
            <item name="android:clickable">true</item>
        </style>

    5. Now create a image in "/res/drawable-ldpi/" and name it "status_bar_close_pressed.png"

    Examples:

    "status_bar_close_on.png"

    status_bar_close_on_zps1287e98e.png


    "status_bar_close_pressed.png"

    status_bar_close_pressed_zps9a877a8c.png


    SC20130218-143751_zpsd7bdd2d8.png


    Adding that little space between the notifications

    1. Decompile "framework-res.apk"
    2. Open "/res/layout/status_bar_latest_event.xml"
    3. You'll see this:

    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <com.android.server.status.LatestItemContainer android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="65.0sp"
      xmlns:android="http://schemas.android.com/apk/res/android">
        <com.android.server.status.LatestItemView android:id="@id/content" android:background="@drawable/status_bar_item_background" android:paddingRight="6.0sp" android:focusable="true" android:clickable="true" android:layout_width="fill_parent" android:layout_height="64.0sp" />
        <View android:background="@drawable/something" android:layout_width="fill_parent" android:layout_height="1.0sp" />
    </com.android.server.status.LatestItemContainer>

    change it to this:

    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <com.android.server.status.LatestItemContainer android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="68.0sp"
      xmlns:android="http://schemas.android.com/apk/res/android">
        <View android:background="@null" android:layout_width="fill_parent" android:layout_height="4.0sp" />
        <com.android.server.status.LatestItemView android:id="@id/content" android:background="@drawable/status_bar_item_background" android:paddingRight="6.0sp" android:focusable="true" android:clickable="true" android:layout_width="fill_parent" android:layout_height="64.0sp" />
    </com.android.server.status.LatestItemContainer>

    SC20130224-183153_zps7ae4cd49.png
    10
    Optional Customization

    Moving Time and Date layout below the Toggle Buttons

    If you've finish all the guide from the first post, then you should end up with something like this in "/res/layout/status_bar_expanded.xml":
    Code:
        <RelativeLayout android:orientation="horizontal" android:background="@color/tw_color002" android:layout_width="fill_parent" android:layout_height="47.0dip">
            <LinearLayout android:orientation="horizontal" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true">
                <com.android.server.status.StatusBarJellyHeaderView android:layout_width="wrap_content" android:layout_height="wrap_content" />
            </LinearLayout>
            <LinearLayout android:orientation="horizontal" android:paddingRight="6.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true">
                <Button android:textColor="@*android:color/transparent" android:layout_gravity="center_vertical" android:id="@id/clear_all_button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/status_bar_clear_all_button" style="@style/Btn.Clear" />
                <View android:visibility="invisible" android:layout_width="1.0dip" android:layout_height="wrap_content" />
                <ImageView android:layout_gravity="center_vertical" android:id="@id/settings_button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/ic_notify_quicksettings" android:contentDescription="@string/accessibility_settings_button" />
            </LinearLayout>
        </RelativeLayout>
        <LinearLayout android:orientation="vertical" android:id="@id/quickpanel_container" android:layout_width="fill_parent" android:layout_height="wrap_content">
            <LinearLayout android:orientation="horizontal" android:background="@drawable/status_bar_background" android:layout_width="fill_parent" android:layout_height="50.0dip" android:layout_weight="1.0">
                <TextView android:textSize="0.0dip" android:textColor="@color/tw_color002" android:gravity="center" android:id="@id/quickpanel_wifi_btn" android:background="@null" android:paddingTop="1.0dip" android:paddingBottom="1.0dip" android:layout_width="fill_parent" android:layout_height="fill_parent" android:drawableTop="@drawable/quick_panel_icon_wifi_off" android:layout_weight="1.0" />
                <TextView android:textSize="0.0dip" android:textColor="@color/tw_color002" android:gravity="center" android:id="@id/quickpanel_data_btn" android:background="@null" android:paddingTop="1.0dip" android:paddingBottom="1.0dip" android:layout_width="fill_parent" android:layout_height="fill_parent" android:drawableTop="@drawable/quick_panel_icon_data_off" android:layout_weight="1.0" />
                <TextView android:textSize="0.0dip" android:textColor="@color/tw_color002" android:gravity="center" android:id="@id/quickpanel_bt_btn" android:background="@null" android:paddingTop="1.0dip" android:paddingBottom="1.0dip" android:layout_width="fill_parent" android:layout_height="fill_parent" android:drawableTop="@drawable/quick_panel_icon_bluetooth_off" android:layout_weight="1.0" />
                <TextView android:textSize="0.0dip" android:textColor="@color/tw_color002" android:gravity="center" android:id="@id/quickpanel_gps_btn" android:background="@null" android:paddingTop="1.0dip" android:paddingBottom="1.0dip" android:layout_width="fill_parent" android:layout_height="fill_parent" android:drawableTop="@drawable/quick_panel_icon_gps_off" android:layout_weight="1.0" />
                <TextView android:textSize="0.0dip" android:textColor="@color/tw_color002" android:gravity="center" android:id="@id/quickpanel_sound_btn" android:background="@null" android:paddingTop="1.0dip" android:paddingBottom="1.0dip" android:layout_width="fill_parent" android:layout_height="fill_parent" android:drawableTop="@drawable/quick_panel_icon_silent_off" android:layout_weight="1.0" android:soundEffectsEnabled="false" />
                <TextView android:textSize="0.0dip" android:textColor="@color/tw_color002" android:gravity="center" android:id="@id/quickpanel_orientation_btn" android:background="@null" android:paddingTop="1.0dip" android:paddingBottom="1.0dip" android:layout_width="fill_parent" android:layout_height="fill_parent" android:drawableTop="@drawable/quick_panel_icon_orientation_off" android:layout_weight="1.0" />
            </LinearLayout>
        </LinearLayout>


    Now, to move it below the Toggle Buttons, just move the whole "Relative Layout" below the "Linear Layout".
    Code:
        <LinearLayout android:orientation="vertical" android:id="@id/quickpanel_container" android:layout_width="fill_parent" android:layout_height="wrap_content">
            <LinearLayout android:orientation="horizontal" android:background="@drawable/status_bar_background" android:layout_width="fill_parent" android:layout_height="50.0dip" android:layout_weight="1.0">
                <TextView android:textSize="0.0dip" android:textColor="@color/tw_color002" android:gravity="center" android:id="@id/quickpanel_wifi_btn" android:background="@null" android:paddingTop="1.0dip" android:paddingBottom="1.0dip" android:layout_width="fill_parent" android:layout_height="fill_parent" android:drawableTop="@drawable/quick_panel_icon_wifi_off" android:layout_weight="1.0" />
                <TextView android:textSize="0.0dip" android:textColor="@color/tw_color002" android:gravity="center" android:id="@id/quickpanel_data_btn" android:background="@null" android:paddingTop="1.0dip" android:paddingBottom="1.0dip" android:layout_width="fill_parent" android:layout_height="fill_parent" android:drawableTop="@drawable/quick_panel_icon_data_off" android:layout_weight="1.0" />
                <TextView android:textSize="0.0dip" android:textColor="@color/tw_color002" android:gravity="center" android:id="@id/quickpanel_bt_btn" android:background="@null" android:paddingTop="1.0dip" android:paddingBottom="1.0dip" android:layout_width="fill_parent" android:layout_height="fill_parent" android:drawableTop="@drawable/quick_panel_icon_bluetooth_off" android:layout_weight="1.0" />
                <TextView android:textSize="0.0dip" android:textColor="@color/tw_color002" android:gravity="center" android:id="@id/quickpanel_gps_btn" android:background="@null" android:paddingTop="1.0dip" android:paddingBottom="1.0dip" android:layout_width="fill_parent" android:layout_height="fill_parent" android:drawableTop="@drawable/quick_panel_icon_gps_off" android:layout_weight="1.0" />
                <TextView android:textSize="0.0dip" android:textColor="@color/tw_color002" android:gravity="center" android:id="@id/quickpanel_sound_btn" android:background="@null" android:paddingTop="1.0dip" android:paddingBottom="1.0dip" android:layout_width="fill_parent" android:layout_height="fill_parent" android:drawableTop="@drawable/quick_panel_icon_silent_off" android:layout_weight="1.0" android:soundEffectsEnabled="false" />
                <TextView android:textSize="0.0dip" android:textColor="@color/tw_color002" android:gravity="center" android:id="@id/quickpanel_orientation_btn" android:background="@null" android:paddingTop="1.0dip" android:paddingBottom="1.0dip" android:layout_width="fill_parent" android:layout_height="fill_parent" android:drawableTop="@drawable/quick_panel_icon_orientation_off" android:layout_weight="1.0" />
            </LinearLayout>
        </LinearLayout>
    [B]    <RelativeLayout android:orientation="horizontal" android:background="@color/tw_color002" android:layout_width="fill_parent" android:layout_height="47.0dip">
            <LinearLayout android:orientation="horizontal" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true">
                <com.android.server.status.StatusBarJellyHeaderView android:layout_width="wrap_content" android:layout_height="wrap_content" />
            </LinearLayout>
            <LinearLayout android:orientation="horizontal" android:paddingRight="6.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true">
                <Button android:textColor="@*android:color/transparent" android:layout_gravity="center_vertical" android:id="@id/clear_all_button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/status_bar_clear_all_button" style="@style/Btn.Clear" />
                <View android:visibility="invisible" android:layout_width="1.0dip" android:layout_height="wrap_content" />
                <ImageView android:layout_gravity="center_vertical" android:id="@id/settings_button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/ic_notify_quicksettings" android:contentDescription="@string/accessibility_settings_button" />
            </LinearLayout>
        </RelativeLayout>[/B]


    Moving the Settings Shortcut Button to the right

    If you follow the Settings Shortbut Button guide from the first post, you'll end up with this in "/res/layout/status_bar_expanded.xml":
    Code:
    <RelativeLayout android:orientation="horizontal" android:background="@color/tw_color002" android:layout_width="fill_parent" android:layout_height="47.0dip">
            <LinearLayout android:orientation="horizontal" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true">
                <com.android.server.status.StatusBarJellyHeaderView android:layout_width="wrap_content" android:layout_height="wrap_content" />
            </LinearLayout>
            <LinearLayout android:orientation="horizontal" android:paddingRight="6.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true">
                <Button android:textColor="@*android:color/transparent" android:layout_gravity="center_vertical" android:id="@id/clear_all_button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/status_bar_clear_all_button" style="@style/Btn.Clear" />
                <View android:visibility="invisible" android:layout_width="1.0dip" android:layout_height="wrap_content" />
                <ImageView android:layout_gravity="center_vertical" android:id="@id/settings_button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/ic_notify_quicksettings" android:contentDescription="@string/accessibility_settings_button" />
            </LinearLayout>
        </RelativeLayout>

    To move it to the left (like in JB 4.1.x), just change it like the following:
    Code:
    <RelativeLayout android:orientation="horizontal" android:background="@color/tw_color002" android:layout_width="fill_parent" android:layout_height="47.0dip">
            <LinearLayout android:orientation="horizontal" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true">
                <com.android.server.status.StatusBarJellyHeaderView android:layout_width="wrap_content" android:layout_height="wrap_content" />
                [B]<ImageView android:layout_gravity="center_vertical" android:id="@id/settings_button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/ic_notify_quicksettings" android:contentDescription="@string/accessibility_settings_button" />       [/B]
            </LinearLayout>
            <LinearLayout android:orientation="horizontal" android:paddingRight="6.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true">
                <Button android:textColor="@*android:color/transparent" android:layout_gravity="center_vertical" android:id="@id/clear_all_button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/status_bar_clear_all_button" style="@style/Btn.Clear" />
            </LinearLayout>
        </RelativeLayout>


    Note: If you're a developer or a themer, you can change it however you like. And if you find more optional tweaks, please feel free to post it here.
    7
    Swipe to remove notification is successfully done ;)

    couldn't capture it as screenshot, but basically, it looks like this:

    SC20130220-011648_zpsff778df8.png