[Galaxy 3 Themes and Apps] Jason-EX:
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:

AChep & petrukgrinder for developing and creating a guide.

Jason-EX (me) for changing the code for Galaxy 3.

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.

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.

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"

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

​

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:

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

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

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

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

​

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

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

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

<item type="id" name="settings_button">false</item>

4. Open "/res/value/strings.xml" and add this code at the end of the file:

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

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

.field mScrollView:Landroid/widget/ScrollView;

Then paste these two lines below:

.field mSettingsBut:Landroid/view/View;

.field private mSettingsButListener:Landroid/view/View$OnClickListener;

9. Find this line:

iput-object v0, p0, Lcom/android/server/status/StatusBarService;->mStopTracing:Ljava/lang/Runnable;

Then paste these lines below:

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

iput v7, p0, Lcom/android/server/status/StatusBarService;->mEdgeBorder:I

Then paste these lines below:

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

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

​

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:

<com.android.server.status.DateView

Remove the whole line and replace it with this 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" />

​