Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[GUIDE] AOKP like toggles [UPDATE]

OP MuSaddiq

5th January 2014, 10:53 AM   |  #1  
MuSaddiq's Avatar
OP Senior Member
Thanks Meter: 946
 
652 posts
Join Date:Joined: Aug 2013
More
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
Last edited by MuSaddiq; 15th January 2014 at 08:25 PM.
The Following 10 Users Say Thank You to MuSaddiq For This Useful Post: [ View ]
5th January 2014, 10:53 AM   |  #2  
MuSaddiq's Avatar
OP Senior Member
Thanks Meter: 946
 
652 posts
Join Date:Joined: Aug 2013
More
Reseved 01
Reserved
5th January 2014, 11:15 AM   |  #3  
-CALIBAN666-'s Avatar
Recognized Contributor
Flag Leverkusen
Thanks Meter: 3,660
 
5,850 posts
Join Date:Joined: Feb 2012
Donate to Me
More
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: [ View ]
5th January 2014, 11:34 AM   |  #4  
MuSaddiq's Avatar
OP Senior Member
Thanks Meter: 946
 
652 posts
Join Date:Joined: Aug 2013
More
Quote:
Originally Posted by -CALIBAN666-

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.
6th January 2014, 02:04 AM   |  #5  
Powerhouse's Avatar
Senior Member
Thanks Meter: 1,991
 
796 posts
Join Date:Joined: 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: [ View ]
6th January 2014, 03:32 AM   |  #6  
DC07's Avatar
Senior Member
Flag Mumbai
Thanks Meter: 1,083
 
512 posts
Join Date:Joined: Aug 2013
More
Quote:
Originally Posted by Mr.Gentleman

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: [ View ]
6th January 2014, 09:06 AM   |  #7  
Senior Member
Flag Jakarta
Thanks Meter: 186
 
932 posts
Join Date:Joined: Mar 2013
More
This is what im looking for
6th January 2014, 03:37 PM   |  #8  
Himan Boro's Avatar
Senior Member
Flag Guwahati
Thanks Meter: 64
 
499 posts
Join Date:Joined: Jul 2013
More
Great Job Bro Please Can You B Able To Provide me Moded with Aokp status bar...i dnt knw recompiling-Decompiling
6th January 2014, 03:47 PM   |  #9  
MuSaddiq's Avatar
OP Senior Member
Thanks Meter: 946
 
652 posts
Join Date:Joined: Aug 2013
More
Quote:
Originally Posted by Himan Boro

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.
7th January 2014, 05:37 AM   |  #10  
kumar akarsh's Avatar
Senior Member
Thanks Meter: 36
 
152 posts
Join Date:Joined: Dec 2012
Nice mod sir!!!!!!!!!!

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes