**Always backup any original file before modifying. If your phone doesn't boot push that backup to your phone.**
REQUIRED:
--Android SDK
--APK Tool
--WinZIP
--NOTEPAD++
STEPS:-
-- Download the attached ZIP.
--Decompile your SystemUI.apk
--Copy all the "png's" from the drawable-mdpi folder in ur decompiled SystemUI in \res\drawable-mdpi
--Now, open /res/values/ids.xml and copy these codes in the xml:
Code:
<item type="id" name="quickpanel_wifi_btn_text">false</item>
<item type="id" name="quickpanel_quick_settings">false</item>
<item type="id" name="quickpanel_wifi_btn_icon">false</item>
<item type="id" name="quickpanel_bt_btn_icon">false</item>
<item type="id" name="quickpanel_gps_btn_icon">false</item>
<item type="id" name="quickpanel_sound_btn_icon">false</item>
<item type="id" name="quickpanel_rotation_btn_icon">false</item>
<item type="id" name="quickpanel_bt_btn_text">false</item>
<item type="id" name="quickpanel_gps_btn_text">false</item>
<item type="id" name="quickpanel_sound_btn_text">false</item>
<item type="id" name="quickpanel_rotation_btn_text">false</item>
<item type="id" name="quickpanel_data_btn_icon">false</item>
<item type="id" name="quickpanel_data_btn_text">false</item>
-- Open /res/values/strings.xml and copy these codes in the xml:
Code:
<string name="quickpanel_wifi_text" />
<string name="quickpanel_bluetooth_text" />
<string name="quickpanel_gps_text" />
<string name="quickpanel_sound_text" />
<string name="quickpanel_sound_vibration_text" />
<string name="quickpanel_silent_text" />
<string name="quickpanel_vibration_text" />
<string name="quickpanel_rotation_text" />
<string name="quickpanel_error_text">Error</string>
<string name="quickpanel_dc_text">Data</string>
<string name="quickpanel_dc_on">Turning On</string>
<string name="quickpanel_dc_off">Turning Off</string>
-- Decompile again the resulting apk.
-- This one is for registering the files and info that we made in previous steps to be available publicly and to be recognized in .smali program.
-- Inside /res/values/public.xml, you will find the ids of the new registries.
-- Open /res/layout/status_bar_expanded.xml and find this coode in the xml:
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.ExpandedView android:orientation="vertical" android:focusable="true" android:descendantFocusability="afterDescendants"
xmlns:android="http://schemas.android.com/apk/res/android">
Code:
</FrameLayout>
<FrameLayout android:layout_width="wrap_content" android:layout_height="45.0dip" android:layout_weight="1.0">
<ImageView android:layout_gravity="center_horizontal" android:id="@id/quickpanel_gps_btn_icon" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="1.0dip" android:src="@drawable/quickpanel_icon_gps_off" />
<com.android.systemui.statusbar.quickpanel.GpsSettingButton android:textSize="1.0dip" android:textStyle="normal" android:textColor="#ffffffff" android:gravity="center" android:id="@id/quickpanel_gps_btn_text" android:background="#00ffffff" android:paddingTop="0.0dip" android:paddingBottom="0.0dip" android:focusable="true" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="@string/quickpanel_gps_text" />
</FrameLayout>
<FrameLayout android:layout_width="wrap_content" android:layout_height="45.0dip" android:layout_weight="1.0">
<ImageView android:layout_gravity="center_horizontal" android:id="@id/quickpanel_sound_btn_icon" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="1.0dip" android:src="@drawable/quickpanel_icon_sound_on_on" />
<com.android.systemui.statusbar.quickpanel.SoundSettingButton android:textSize="1.0dip" android:textStyle="normal" android:textColor="#ffffffff" android:gravity="center" android:id="@id/quickpanel_sound_btn_text" android:background="#00ffffff" android:paddingTop="0.0dip" android:paddingBottom="1.0dip" android:focusable="true" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="@string/quickpanel_silent_text" />
</FrameLayout>
<FrameLayout android:layout_width="wrap_content" android:layout_height="45.0dip" android:layout_weight="1.0">
<ImageView android:layout_gravity="center_horizontal" android:id="@id/quickpanel_rotation_btn_icon" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="1.0dip" android:src="@drawable/quickpanel_icon_rotation_off" />
<com.android.systemui.statusbar.quickpanel.AutoRotationSettingButton android:textSize="1.0dip" android:textStyle="normal" android:textColor="#ffffffff" android:gravity="center" android:id="@id/quickpanel_rotation_btn_text" android:background="#00ffffff" android:paddingTop="0.0dip" android:paddingBottom="1.0dip" android:focusable="true" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="@string/quickpanel_rotation_text" />
</FrameLayout>
</com.android.systemui.statusbar.quickpanel.QuickSettingsView>
</LinearLayout>
Below are the most imp. steps:
This step is for matching the Quickpanel codes found in public.xml with that in smali foder.
1. Open each Smali files one by one which you copied now.
2. Also open Open the PublicPre.xml provided by me and Public.xml of ur current ROM in which u had registered the ID's.
3. In your smali files, find the id codes like 0x.......
4.Search dis in PublicPre.xml.
5.Copy the Item name related to dis code and search dis in ur current Public.xml.
6. And finally copy the Id of that ITEM name and replace with that in your Smali file.
7. Do the above steps with each ID codes in each Smali.
7.After Succesfully matching all the ID codes, COMPILE UR SYSTEMUI AND PUSH IT 2 YouR PHONE.
Quote:
Note:- this guide is only to add 4 toggles..!! i will update my guide with more new features very soon..!! |
Have I helped you ??? If Yes !!! Go and find "THANKS" Button