[Android Themes] petrukgrinder:
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 :

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

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

<string name="accessibility_settings_button">System settings.</string>

open ids.xml and add this line on bottom :

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

<public type="id" name="settings_button" id="[COLOR="Red"]0x7f090027[/COLOR]" />

the red color may be different

find this line on StatusBarService.smali :

.field mScrollView:Landroid/widget/ScrollView

and then add this line below :

.field mSettingsBut:Landroid/view/View;

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

now, find this line :

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

and then add this line below :

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

iput v7, p0, Lcom/android/systemui/statusbar/StatusBarService;->mEdgeBorder:I

If not find, change v7 to v8

and then add this line below :

.line 333

const v7, [COLOR="Red"]0x7f090027[/COLOR]

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 :

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

<com.android.systemui.statusbar.CloseDragHandle

and then paste this line below :

<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