Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,736,007 Members 40,364 Now Online
XDA Developers Android and Mobile Development Forum

[GUIDE] AOKP like toggles [UPDATE]

Tip us?
 
MuSaddiq
Old
(Last edited by MuSaddiq; 15th January 2014 at 07:25 PM.)
#1  
MuSaddiq's Avatar
Senior Member - OP
Thanks Meter 879
Posts: 631
Join Date: Aug 2013
Default [GUIDE] AOKP like toggles [UPDATE]

Hey Guys, In this guide I am going to show you how to make the stock statusbar toggles look like AOKP toggles.


Preview:




Requirements:

SystemUI.apk from your ROM
Know how to decompile/recompile


If you want your toggles to be like how they are in the 1st preview then follow the 1st method
or
If you want your toggles to be like how they are in the 2nd preview then follow the 2nd method



Let's start

1. Decompile your SystemUI.apk

2. Go to res/layout/
Open quickpanel_quick_settings.xml

1st Method
 
3. Replace the whole code with this code

Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.quickpanel.QuickSettingsView android:orientation="horizontal" android:id="@id/quickpanel_quick_settings" android:background="#ff000000" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1.0"
  xmlns:android="http://schemas.android.com/apk/res/android">
    <LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content">
        <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginLeft="5.0dip" android:layout_marginRight="5.0dip">
            <FrameLayout android:layout_width="fill_parent" android:layout_height="30.0px" android:layout_marginLeft="5.0dip" android:layout_marginRight="5.0dip" android:layout_weight="1.0">
                <ImageView android:id="@id/quickpanel_wifi_btn_icon" android:layout_width="fill_parent" android:layout_height="wrap_content" android:src="@drawable/quickpanel_icon_wifi_off" android:scaleType="fitXY" />
                <com.android.systemui.statusbar.quickpanel.WifiSettingButton android:textSize="0.0dip" android:textStyle="normal" android:textColor="#ffffffff" android:gravity="left" android:id="@id/quickpanel_wifi_btn_text" android:background="@drawable/quickpanel_button_selector_bg" android:paddingLeft="50.0dip" android:paddingTop="10.0dip" android:paddingBottom="3.0dip" android:focusable="true" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="@string/quickpanel_wifi_text" />
            </FrameLayout>
            <ImageView android:background="#1fffffff" android:layout_width="fill_parent" android:layout_height="0.5dip" />
            <FrameLayout android:layout_width="fill_parent" android:layout_height="30.0px" android:layout_marginLeft="5.0dip" android:layout_marginRight="5.0dip" android:layout_weight="1.0">
                <ImageView android:id="@id/quickpanel_data_btn_icon" android:layout_width="fill_parent" android:layout_height="wrap_content" android:src="@drawable/quickpanel_icon_data_off" android:scaleType="fitXY" />
                <com.android.systemui.statusbar.quickpanel.DataConnectionSettingButton android:textSize="0.0dip" android:textStyle="normal" android:textColor="#ffffffff" android:gravity="left" android:id="@id/quickpanel_data_btn_text" android:background="@drawable/quickpanel_button_selector_bg" android:paddingLeft="50.0dip" android:paddingTop="10.0dip" android:paddingBottom="3.0dip" android:focusable="true" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="@string/quickpanel_dc_text" />
            </FrameLayout>
            <ImageView android:background="#1fffffff" android:layout_width="fill_parent" android:layout_height="0.5dip" />
            <FrameLayout android:layout_width="fill_parent" android:layout_height="30.0px" android:layout_marginLeft="5.0dip" android:layout_marginRight="5.0dip" android:layout_weight="1.0">
                <ImageView android:id="@id/quickpanel_bt_btn_icon" android:layout_width="fill_parent" android:layout_height="wrap_content" android:src="@drawable/quickpanel_icon_bluetooth_off" android:scaleType="fitXY" />
                <com.android.systemui.statusbar.quickpanel.BluetoothSettingButton android:textSize="0.0dip" android:textStyle="normal" android:textColor="#ffffffff" android:gravity="left" android:id="@id/quickpanel_bt_btn_text" android:background="@drawable/quickpanel_button_selector_bg" android:paddingLeft="50.0dip" android:paddingTop="10.0dip" android:paddingBottom="3.0dip" android:focusable="true" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="@string/quickpanel_bluetooth_text" />
            </FrameLayout>
            <ImageView android:background="#1fffffff" android:layout_width="fill_parent" android:layout_height="0.5dip" />
            <FrameLayout android:layout_width="fill_parent" android:layout_height="30.0px" android:layout_marginLeft="5.0dip" android:layout_marginRight="5.0dip" android:layout_weight="1.0">
                <ImageView android:id="@id/quickpanel_gps_btn_icon" android:layout_width="fill_parent" android:layout_height="wrap_content" android:src="@drawable/quickpanel_icon_gps_off" android:scaleType="fitXY" />
                <com.android.systemui.statusbar.quickpanel.GpsSettingButton android:textSize="0.0dip" android:textStyle="normal" android:textColor="#ffffffff" android:gravity="left" android:id="@id/quickpanel_gps_btn_text" android:background="@drawable/quickpanel_button_selector_bg" android:paddingLeft="50.0dip" android:paddingTop="10.0dip" android:paddingBottom="3.0dip" android:focusable="true" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="@string/quickpanel_gps_text" />
            </FrameLayout>
            <ImageView android:background="#1fffffff" android:layout_width="fill_parent" android:layout_height="0.5dip" />
            <FrameLayout android:layout_width="fill_parent" android:layout_height="30.0px" android:layout_marginLeft="5.0dip" android:layout_marginRight="5.0dip" android:layout_weight="1.0">
                <ImageView android:id="@id/quickpanel_rotation_btn_icon" android:layout_width="fill_parent" android:layout_height="wrap_content" android:src="@drawable/quickpanel_icon_rotation_off" android:scaleType="fitXY" />
                <com.android.systemui.statusbar.quickpanel.AutoRotationSettingButton android:textSize="0.0dip" android:textStyle="normal" android:textColor="#ffffffff" android:gravity="left" android:id="@id/quickpanel_rotation_btn_text" android:background="@drawable/quickpanel_button_selector_bg" android:paddingLeft="50.0dip" android:paddingTop="10.0dip" android:paddingBottom="3.0dip" android:focusable="true" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="@string/quickpanel_rotation_text" />
            </FrameLayout>
            <ImageView android:background="#1fffffff" android:layout_width="fill_parent" android:layout_height="0.5dip" />
            <FrameLayout android:layout_width="fill_parent" android:layout_height="30.0px" android:layout_marginLeft="5.0dip" android:layout_marginRight="5.0dip" android:layout_weight="1.0">
                <ImageView android:id="@id/quickpanel_sound_btn_icon" android:layout_width="fill_parent" android:layout_height="wrap_content" android:src="@drawable/quickpanel_icon_sound_on_on" android:scaleType="fitXY" />
                <com.android.systemui.statusbar.quickpanel.SoundSettingButton android:textSize="13.0dip" android:textStyle="normal" android:textColor="#ffffffff" android:gravity="left" android:id="@id/quickpanel_sound_btn_text" android:background="@drawable/quickpanel_button_selector_bg" android:paddingLeft="50.0dip" android:paddingTop="10.0dip" android:paddingBottom="3.0dip" android:focusable="true" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="@string/quickpanel_silent_text" />
            </FrameLayout>
            <ImageView android:background="#1fffffff" android:layout_width="fill_parent" android:layout_height="0.5dip" />
        </LinearLayout>
    </LinearLayout>
</com.android.systemui.statusbar.quickpanel.QuickSettingsView>
4. Go to res/drawable-ldpi and delete these files

Code:
quickpanel_icon_bluetooth_off
quickpanel_icon_bluetooth_on
quickpanel_icon_data_off
quickpanel_icon_data_on
quickpanel_icon_gps_off
quickpanel_icon_gps_on
quickpanel_icon_rotation_off
quickpanel_icon_rotation_on
quickpanel_icon_silent_off
quickpanel_icon_sound_on_on
quickpanel_icon_sound_vibration_on
quickpanel_icon_vibration_off
quickpanel_icon_wifi_off
quickpanel_icon_wifi_on
5. Download Sys_Resources.zip
Extarct it and copy all the files to res/drawable-ldpi


2nd method
 
3. Replace the whole code with this code

Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.quickpanel.QuickSettingsView android:orientation="horizontal" android:id="@id/quickpanel_quick_settings" android:background="#ff000000" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1.0"
  xmlns:android="http://schemas.android.com/apk/res/android">
    <LinearLayout android:orientation="vertical" android:background="#ff000000" android:layout_width="fill_parent" android:layout_height="wrap_content">
        <LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1.0">
            <FrameLayout android:layout_width="wrap_content" android:layout_height="40.0dip" android:layout_weight="1.0">
                <ImageView android:layout_gravity="center_horizontal" android:id="@id/quickpanel_wifi_btn_icon" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="0.0dip" android:src="@drawable/quickpanel_icon_wifi_off" />
                <com.android.systemui.statusbar.quickpanel.WifiSettingButton android:textSize="0.0dip" android:textStyle="normal" android:textColor="#ffffffff" android:gravity="center" android:id="@id/quickpanel_wifi_btn_text" android:background="@drawable/quickpanel_button_selector_bg" android:paddingTop="63.0dip" android:paddingBottom="0.0dip" android:focusable="true" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/quickpanel_wifi_text" />
            </FrameLayout>
            <FrameLayout android:layout_width="wrap_content" android:layout_height="40.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="0.0dip" android:src="@drawable/quickpanel_icon_data_off" />
                <com.android.systemui.statusbar.quickpanel.DataConnectionSettingButton android:textSize="0.0dip" android:textStyle="normal" android:textColor="#ffffffff" android:gravity="center" android:id="@id/quickpanel_data_btn_text" android:background="@drawable/quickpanel_button_selector_bg" android:paddingTop="63.0dip" android:paddingBottom="0.0dip" android:focusable="true" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/quickpanel_dc_text" />
            </FrameLayout>
        </LinearLayout>
        <LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1.0">
            <FrameLayout android:layout_width="wrap_content" android:layout_height="40.0dip" android:layout_weight="1.0">
                <ImageView android:layout_gravity="center_horizontal" android:id="@id/quickpanel_bt_btn_icon" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="0.0dip" android:src="@drawable/quickpanel_icon_bluetooth_off" />
                <com.android.systemui.statusbar.quickpanel.BluetoothSettingButton android:textSize="0.0dip" android:textStyle="normal" android:textColor="#ffffffff" android:gravity="center" android:id="@id/quickpanel_bt_btn_text" android:background="@drawable/quickpanel_button_selector_bg" android:paddingTop="63.0dip" android:paddingBottom="0.0dip" android:focusable="true" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/quickpanel_bluetooth_text" />
            </FrameLayout>
            <FrameLayout android:layout_width="wrap_content" android:layout_height="40.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="0.0dip" android:src="@drawable/quickpanel_icon_gps_off" />
                <com.android.systemui.statusbar.quickpanel.GpsSettingButton android:textSize="0.0dip" android:textStyle="normal" android:textColor="#ffffffff" android:gravity="center" android:id="@id/quickpanel_gps_btn_text" android:background="@drawable/quickpanel_button_selector_bg" android:paddingTop="63.0dip" android:paddingBottom="0.0dip" android:focusable="true" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/quickpanel_gps_text" />
            </FrameLayout>
        </LinearLayout>
        <LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1.0">
            <FrameLayout android:layout_width="wrap_content" android:layout_height="40.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="0.0dip" android:src="@drawable/quickpanel_icon_rotation_off" />
                <com.android.systemui.statusbar.quickpanel.AutoRotationSettingButton android:textSize="0.0dip" android:textStyle="normal" android:textColor="#ffffffff" android:gravity="center" android:id="@id/quickpanel_rotation_btn_text" android:background="@drawable/quickpanel_button_selector_bg" android:paddingTop="63.0dip" android:paddingBottom="0.0dip" android:focusable="true" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/quickpanel_rotation_text" />
            </FrameLayout>
            <FrameLayout android:layout_width="wrap_content" android:layout_height="40.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="0.0dip" android:src="@drawable/quickpanel_icon_sound_on_on" />
                <com.android.systemui.statusbar.quickpanel.SoundSettingButton android:textSize="0.0dip" android:textStyle="normal" android:textColor="#ffffffff" android:gravity="center" android:id="@id/quickpanel_sound_btn_text" android:background="@drawable/quickpanel_button_selector_bg" android:paddingTop="63.0dip" android:paddingBottom="0.0dip" android:focusable="true" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/quickpanel_silent_text" />
            </FrameLayout>
        </LinearLayout>
    </LinearLayout>
</com.android.systemui.statusbar.quickpanel.QuickSettingsView>
4. Go to res/drawable-ldpi and delete these files

Code:
quickpanel_icon_bluetooth_off
quickpanel_icon_bluetooth_on
quickpanel_icon_data_off
quickpanel_icon_data_on
quickpanel_icon_gps_off
quickpanel_icon_gps_on
quickpanel_icon_rotation_off
quickpanel_icon_rotation_on
quickpanel_icon_silent_off
quickpanel_icon_sound_on_on
quickpanel_icon_sound_vibration_on
quickpanel_icon_vibration_off
quickpanel_icon_wifi_off
quickpanel_icon_wifi_on
5. Download Sys_Resources1.zip
Extarct it and copy all the files to res/drawable-ldpi


6. Recompile your SystemUI.apk
Push it into system/app
Set proper permissions(rw-r--r--)


If you want to move the toggles then follow this guide by @mariozawa


Credits:

b16h22
The Following 9 Users Say Thank You to MuSaddiq For This Useful Post: [ Click to Expand ]
 
MuSaddiq
Old
#2  
MuSaddiq's Avatar
Senior Member - OP
Thanks Meter 879
Posts: 631
Join Date: Aug 2013
Default Reseved 01

Reserved
 
-CALIBAN666-
Old
#3  
-CALIBAN666-'s Avatar
Recognized Contributor
Thanks Meter 3215
Posts: 5,458
Join Date: Feb 2012
Location: Leverkusen
Nice,i think its cooler when you make a all in one thread for all your guides so its easy to find one,thanx anyway.:thumbup:

MANY GREEEETZ!!!
The Following 2 Users Say Thank You to -CALIBAN666- For This Useful Post: [ Click to Expand ]
 
MuSaddiq
Old
#4  
MuSaddiq's Avatar
Senior Member - OP
Thanks Meter 879
Posts: 631
Join Date: Aug 2013
Quote:
Originally Posted by -CALIBAN666- View Post
Nice,i think its cooler when you make a all in one thread for all your guides so its easy to find one,thanx anyway.:thumbup:

MANY GREEEETZ!!!
Thanks for your suggestion but i have already done that, When you click 'MY WORKS' in my signature you will be redirected to a post where you can find all my apps, guides, icons, etc. with their links.
 
Powerhouse
Old
#5  
Powerhouse's Avatar
Senior Member
Thanks Meter 1966
Posts: 795
Join Date: Mar 2013
Looks like OP is on Fire ..Great work buddy ..

Good to see you on our team(GFX bandits)
The Following User Says Thank You to Powerhouse For This Useful Post: [ Click to Expand ]
 
DC07
Old
#6  
DC07's Avatar
Senior Member
Thanks Meter 832
Posts: 379
Join Date: Aug 2013
Location: NullPointerException
Quote:
Originally Posted by Mr.Gentleman View Post
Looks like OP is on Fire ..Great work buddy ..

Good to see you on our team(GFX bandits)
+1


Nice work M.S

The Following User Says Thank You to DC07 For This Useful Post: [ Click to Expand ]
 
Mranggapo
Old
#7  
Senior Member
Thanks Meter 140
Posts: 787
Join Date: Mar 2013
Location: Jakarta
This is what im looking for
Dont say newbie user a noob, once upon a time you were a noob too

 


 
Himan Boro
Old
#8  
Himan Boro's Avatar
Senior Member
Thanks Meter 61
Posts: 494
Join Date: Jul 2013
Location: Guwahati
Great Job Bro Please Can You B Able To Provide me Moded with Aokp status bar...i dnt knw recompiling-Decompiling
 
MuSaddiq
Old
#9  
MuSaddiq's Avatar
Senior Member - OP
Thanks Meter 879
Posts: 631
Join Date: Aug 2013
Quote:
Originally Posted by Himan Boro View Post
Great Job Bro Please Can You B Able To Provide me Moded with Aokp status bar...i dnt knw recompiling-Decompiling
Sorry, I don't have the modded statusbar. Actually, I mod the statusbar only for the preview, after that I delete it.
 
kumar akarsh
Old
#10  
kumar akarsh's Avatar
Senior Member
Thanks Meter 34
Posts: 142
Join Date: Dec 2012
Nice mod sir!!!!!!!!!!
prezzzzzzzzzz thanks if i helped you!!!!!!!!!!

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes