[Samsung Galaxy W I8150] RizaLeon:
Hello everyone,,

Still in gingerbread.. I want to share to you how to add a data toggle in statusbar pulldown for galaxy w and maybe work in another device,,

I hope it is usefull for you :D

REQUIREMENT :

1. You must know how to decompiling/compiling apk

2. Knowledge about editing smali/xml

3. Notepad++

4. You must have apktool/apkmanager

Let's have fun :laugh:

GUIDE :

a. Pull SystemUI from system/app/ and decompile it with apktool. ( I do not explain how to compile,decompile )

b. Download the resources.rar from attachments.

c. Extract downloaded.rar it to the decompiled folder.

d. Now open res/values/public.xml and add these lines at the end..

Last id in my public is "0x7f0a0030" so add these lines at the end..

<public type="id" name="quickpanel_data_btn_icon" id="0x7f0a0031" />
<public type="id" name="quickpanel_data_btn_status_icon" id="0x7f0a0032" />

e. Now open res/values/ids.xml and add these lines at the end..

<item type="id" name="quickpanel_data_btn_icon">false</item>
<item type="id" name="quickpanel_data_btn_status_icon">false</item>
<item type="id" name="quickpanel_data_btn_text">false</item>

f. Now open res/values/strings.xml and add these lines at the end..

<string name="quickpanel_dc_text">Data</string>

g. Now open res/layout/quickpanel_quick_settings.xml and add these lines ( Up to where you like ) :p

<FrameLayout android:layout_width="fill_parent" android:layout_height="84.0dip" android:layout_weight="1.0">
<ImageView android:layout_gravity="center_horizontal" android:id="@id/quickpanel_data_btn_icon" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="2.669983dip" android:src="@drawable/quickpanel_icon_data_off" />
<com.android.systemui.statusbar.quickpanel.DataConnectionSettingButton android:textSize="12.0dip" android:textStyle="normal" android:textColor="@color/quickpanel_text" android:gravity="center_horizontal" android:id="@id/quickpanel_data_btn_text" android:paddingTop="54.669983dip" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="@string/quickpanel_dc_text" android:shadowDx="1.0" android:shadowDy="1.0" />
<ImageView android:layout_gravity="bottom|center" android:id="@id/quickpanel_data_btn_status_icon" android:paddingLeft="2.3299866dip" android:paddingRight="2.3299866dip" android:layout_width="fill_parent" android:layout_height="5.3299866dip" android:layout_marginBottom="4.5dip" android:src="@drawable/quickpanel_icon_off" android:scaleType="fitXY" />
</FrameLayout>

h. Now the part where you have to modify smali files. Its not hard you just have to change some values in smali files

i. Open smali/com/android/systemui/statusbar/quickpanel/DataConnectionSettingButton.smali and also open res/values/public.xml.

Now you have to find the Id in smali and change it according to your public.xml.

[B]Id Smali :[/B]

0x7f0a0015 _ _ _ _Change with id public _ _ _ _ quickpanel_data_btn_icon ( type="id" )
0x7f0a0017 _ _ _ _Change with id public _ _ _ _ quickpanel_data_btn_status_icon ( type="id" )

0x7f02001b _ _ _ _Change with id public _ _ _ _ quickpanel_icon_on ( type="drawable" )
0x7f02001a _ _ _ _Change with id public _ _ _ _ quickpanel_icon_off ( type="drawable" )

0x7f08002f _ _ _ _Change with id public _ _ _ _ quickpanel_dc_text ( type="string" )

j. Now compile SystemUI.apk.... Wait It's not done yet you have to decompile it again to get the id quickpanel_icon_data_off and quickpanel_icon_data_on in your public.xml

k. Open again smali/com/android/systemui/statusbar/quickpanel/DataConnectionSettingButton.smali and also open res/values/public.xml

[B]Id Smali :[/B]

0x7f020015 _ _ _ _Change with id public _ _ _ _ quickpanel_icon_data_off ( type="drawable" )
0x7f020016 _ _ _ _Change with id public _ _ _ _ quickpanel_icon_data_on ( type="drawable" )

l.Now you are done with modifications. Compile SystemUI.apk and push it to system/app/ ................ ENJOY :highfive:

SystemUI.apk in attachments for baseband xxlm6 deodex

Credit :

_ petrukgrinder

_ iLominouss family

_ community Galaxy wonder indonesia

I will do other Guides later.. Sorry my bad english and Good Luck :fingers-crossed:​