Happening now! New Honor Phone Launch
FORUMS
Remove All Ads from XDA

[Guide] Jellybean navigation layout for CM7 ROM

239 posts
Thanks Meter: 564
 
Post Reply Email Thread
About :
This is for make CM7 ROM like Jellybean ROM layout on statusbar.

Credits :
- To Cool
- GDX Team
- DCSMS
- big thanks goes to AChep

Contents :
Post one:
-> Set up
-> Make Clock, date and day
-> Make Network speed on statusbar
-> Customize clear button

Tool used :
-> Apk Tool / Apk Manager / ToolAlite
-> SystemUI.apk
-> Notepad++

Screenshot :
Quote:


Guide 1.0 : How To Make Date, Time and Day on Status Bar Expanded
1. you need to decompile your SystemUI.apk (please dont tell me how to do that)
2. extract my jelly.zip.. download on attachment below
3. copy 2 files blablablajellyblablabla.smali to SystemUI.apk/smali/com/android/systemui/statusbar/here
4. now you need to modify status_bar_expanded.xml find on SystemUI.apk/res/layout/here

for first you need to find this line :
Code:
        <LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/carrier_label_layout" android:layout_width="fill_parent" android:layout_height="wrap_content">
paste this code below :
Code:
            <com.android.systemui.statusbar.StatusBarJellyHeaderView android:layout_width="wrap_content" android:layout_height="wrap_content" />
5. now recompile your file and push to system/app

================================================== ================================================== ===
Screenshot :
Quote:


Guide 2.0 : How To Create Network Traffic Speed on Status Bar
1. you need to decompile your SystemUI.apk (please dont tell me how to do that)
2. extract my network.zip.. download on attachment below
3. copy folder smali to SystemUI.apk/here
4. now you need to modify status_bar.xml find on SystemUI.apk/res/layout/here

for first you need to find this line :
Code:
        <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" />
paste this code below :
Code:
        <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true">
            <in.jmkl.dcsms.statusbargreper.DataTrafik android:layout_gravity="center_vertical" android:layout_width="wrap_content" android:layout_height="wrap_content" />
        </LinearLayout>
5. now recompile your file and push to system/app

================================================== ================================================== ===
Screenshot :
Quote:


Guide 3.0 : How To Make Customization Your Clear Button
1. you need to decompile your SystemUI.apk (please dont tell me how to do that)
2. extract my clearbutton.zip.. download on attachment below
3. copy 3 files to drawable-xxxx (xxxx is by your phone, mdpi, hdpi, ldpi or xhdpi)
4. now you need to modify xxx.xml (create by your self), styles.xml, status_bar_expanded.xml

for first you need to create clear_button.xml on drawable folder and copy this line to your xml file :
Code:
<?xml version="1.0" encoding="utf-8"?>
<selector
  xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:state_window_focused="false" android:state_enabled="true" android:drawable="@drawable/btn_clear_focus" />
    <item android:state_window_focused="false" android:state_enabled="false" android:drawable="@drawable/btn_clear" />
    <item android:state_pressed="true" android:drawable="@drawable/btn_clear_pressed" />
    <item android:state_focused="true" android:state_enabled="true" android:drawable="@drawable/btn_clear_focus" />
    <item android:state_enabled="true" android:drawable="@drawable/btn_clear_focus" />
    <item android:state_focused="true" android:drawable="@drawable/btn_clear_focus" />
    <item android:drawable="@drawable/btn_clear_focus" />
</selector>
now, open the styles.xml on SystemUI.apk/res/values/here and copy this line in the end before </resources> line :
Code:
    <style name="Awesome.Button" 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/clear_button</item>
        <item name="android:focusable">true</item>
        <item name="android:clickable">true</item>
    </style>
note : this line on red colors is pointed to your new xml file
Code:
 <item name="android:background">@drawable/clear_button</item>
now, open the status_bar_expanded.xml on SystemUI.apk/res/layout/here and find this line :
Code:
<TextView android:layout_gravity="center_vertical" android:id="@id/clear_all_button"
modify the line styles or paste my line like this :
Code:
<TextView android:layout_gravity="center_vertical" android:id="@id/clear_all_button" android:paddingLeft="15.0dip" android:paddingRight="15.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="4.0dip" android:layout_marginBottom="1.0dip" android:text="@string/status_bar_clear_all_button" style="@style/Awesome.Button" />
5. now recompile your file and push to system/app
Attached Files
File Type: zip Jelly.zip - [Click for QR Code] (3.0 KB, 5296 views)
File Type: zip Network.zip - [Click for QR Code] (4.7 KB, 2499 views)
File Type: zip clearbutton.zip - [Click for QR Code] (939 Bytes, 2759 views)
The Following 71 Users Say Thank You to petrukgrinder For This Useful Post: [ View ] Gift petrukgrinder Ad-Free
 
 
24th October 2012, 10:58 PM |#2  
petrukgrinder's Avatar
OP Senior Member
Flag Bandung
Thanks Meter: 564
 
Donate to Me
More
Guide 4.0 : How to add settings button on Status Bar Expdanded
1. you need to decompile SystemUI.apk (please dont tell me how to do that)
2. download my zip from here and extract it
3. now you must modify status_bar_expanded.xml

for first you need to find this line :
Code:
<com.android.systemui.statusbar.CarrierLabel android:textSize="17.659973dip" android:textColor="#ffffffff 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" />
after that line, add this line :
Code:
<ImageView android:layout_gravity="center_vertical" android:id="@id/settings_button" android:paddingLeft="0.0dip" android:paddingTop="0.0dip" android:paddingRight="8.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_notify_quicksettings" android:contentDescription="@string/accessibility_settings_button" />
now, you must open string.xml and add this line on bottom :
Code:
<string name="accessibility_settings_button">System settings.</string>
open ids.xml and add this line on bottom :
Code:
<item type="id" name="settings_button">false</item>
now, you must extract settingsshortcut.zip.. extract to your decompiled folder and then compile your SystemUI.apk this is for got public id number.. so after compiled, you must decompile again.

open public.xml and StatusBarService.smali. Find this line on public.xml :
Code:
<public type="id" name="settings_button" id="0x7f090027" />
the red color may be different

find this line on StatusBarService.smali :
Code:
.field mScrollView:Landroid/widget/ScrollView
and then add this line below :
Code:
.field mSettingsBut:Landroid/view/View;

.field private mSettingsButListener:Landroid/view/View$. OnClickListener;
now, find this line :
Code:
iput-object v0, p0, Lcom/android/systemui/statusbar/StatusBarService;->mStopTracing:Ljava/lang/Runnable;
and then add this line below :
Code:
.line 1703

new-instance v0, Lcom/android/systemui/statusbar/StatusBarService$8;     

invoke-direct {v0, p0}, Lcom/android/systemui/statusbar/StatusBarService$8;-><init>     

(Lcom/android/systemui/statusbar/StatusBarService;)V     

iput-object v0, p0, Lcom/android/systemui/statusbar/StatusBarService;->mSettingsButListener:Landroid/view/View $OnClickListener;

return-void.
find this line again :
Code:
iput v7, p0, Lcom/android/systemui/statusbar/StatusBarService;->mEdgeBorder:I
If not find, change v7 to v8

and then add this line below :
Code:
.line 333    

const v7, 0x7f090027   
  
invoke-virtual {v1, v7}, Lcom/android/systemui/statusba/ExpandedView;->findViewById(I)Landroid/view/View;     

move-result-object v7    

iput-object v7, p0, Lcom/android/systemui/statusbar/StatusBarService;->mSettingsBut:Landroid/view/View;

.line 334

iget-object v7, p0, Lcom/android/systemui/statusbar/StatusBarService;->mSettingsBut:Landroid/view/View;     

iget-object v8, p0, Lcom/android/systemui/statusbar/StatusBarService;->mSettingsButListener:Landroid/view/View $OnClickListener;

invoke-virtual {v7, v8}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V
*for the red color on .line 333 you must change to your settings_button on your public.xml
*if your find iput v8, p0, Lcom/android/systemui/statusbar/StatusBarService;->mEdgeBorder:I so v7 change to v8. and the line will be like this :

Code:
.line 333     

const v8, 0x7f090029    

invoke-virtual {v2, v8}, Lcom/android/systemui/statusbar/ExpandedView;->findViewById(I)Landroid/view/View;   
  
move-result-object v8     

iput-object v8, p0, Lcom/android/systemui/statusbar/StatusBarService;->mSettingsBut:Landroid/view/View;

.line 334    
iget-object v8, p0, Lcom/android/systemui/statusbar/StatusBarService;->mSettingsBut:Landroid/view/View;     

iget-object v9, p0, Lcom/android/systemui/statusbar/StatusBarService;->mSettingsButListener:Landroid/view/View $OnClickListener;

invoke-virtual {v8, v9}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V
now, copy StatusBarService$8.smali to SystemUI.apk/smali/com/android/systemui/statusbar/here after that compile and push to system/app.

================================================== ================================================== ===

Guide 5.0 : How to add carrier label on statusbar close on
1. you need to decompile SystemUI.apk (please dont tell me how to do that)
2. now you must modify status_bar_tracking.xml

for first you need to find this line :
Code:
<com.android.systemui.statusbar.CloseDragHandle
and then paste this line below :
Code:
<com.android.systemui.statusbar.CarrierLabel android:textSize="17.659973dip" android:textColor="#ffffffff" android:gravity="center_horizontal" android:paddingBottom="1.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="1.0dip" />
re-compile and push to system/app
The Following 43 Users Say Thank You to petrukgrinder For This Useful Post: [ View ] Gift petrukgrinder Ad-Free
24th October 2012, 10:59 PM |#3  
petrukgrinder's Avatar
OP Senior Member
Flag Bandung
Thanks Meter: 564
 
Donate to Me
More
for update
The Following 13 Users Say Thank You to petrukgrinder For This Useful Post: [ View ] Gift petrukgrinder Ad-Free
24th October 2012, 11:32 PM |#4  
Account currently disabled
Flag Cicalengka
Thanks Meter: 641
 
More
Nice tutorial

thanks
24th October 2012, 11:45 PM |#5  
petrukgrinder's Avatar
OP Senior Member
Flag Bandung
Thanks Meter: 564
 
Donate to Me
More
Quote:
Originally Posted by ariadelvana95

Nice tutorial

thanks

with my pleasure..
The Following 4 Users Say Thank You to petrukgrinder For This Useful Post: [ View ] Gift petrukgrinder Ad-Free
25th October 2012, 04:50 AM |#6  
Senior Member
Flag Bucharest
Thanks Meter: 261
 
More
I would spam your thanks button if you do this status bar for latest minicm7 2.2.1

Sent from my E15i using xda app-developers app
25th October 2012, 05:39 AM |#7  
saldymhmd's Avatar
Senior Member
Flag Bekasi (Indonesia)
Thanks Meter: 583
 
More
mantap !!! nice tutorial ! i've been searching for this tutorial and now i found it
25th October 2012, 06:19 AM |#8  
what cm7 theme your using can u share?
25th October 2012, 07:12 AM |#9  
AChep's Avatar
Recognized Themer / Recognized Developer
Flag Ukraine, Lugansk, Belovodsk
Thanks Meter: 5,801
 
Donate to Me
More
heheh, that's my jelly bean statusbar
The Following 2 Users Say Thank You to AChep For This Useful Post: [ View ]
25th October 2012, 07:42 AM |#10  
PsyGik's Avatar
Senior Member
Thanks Meter: 145
 
More
Where have I gone wrong?? Clear text is also displayed along with the image.



Have attached SystemUI.apk after doing all the mods (except network thing)

-------------------EDIT-----------------------------------
solved. Had to edit strings.xml
Now the problem is the clear button won't stay at the right corner. Screenshot attached..
Attached Thumbnails
Click image for larger version

Name:	screenshot-1351147185905.png
Views:	4228
Size:	49.9 KB
ID:	1429211   Click image for larger version

Name:	screenshot-1351150631662.png
Views:	3782
Size:	48.9 KB
ID:	1429287  
Attached Files
File Type: apk SystemUI.apk - [Click for QR Code] (298.0 KB, 447 views)
25th October 2012, 08:00 AM |#11  
AiphNday's Avatar
Senior Member
Flag Bandung
Thanks Meter: 89
 
More
Nice..
I like your guide..


Sent from my GT-S5660 using Tapatalk 2
Post Reply Subscribe to Thread

Tags
cm7 jellybean, jellybean navigation, petrukgrinder, tiny anastasia

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes