LightBlog

dimanche 17 avril 2016

[GUIDE][GB]How to add jellybean like WiFi-BT switch in title bar

Add jellybean like Wi-Fi & Bluetooth ON/OFF switch in title_bar.

This is a cool guide to add Wi-Fi or Bluetooth switch in titlebar as you can see in jellybean.
This mod work will on any gingerbread running phone.

Things you need:-

Quote:

  • Apktool/Apk-Multitool
  • Notepad++
  • Basic knowledge about compiling & decompiling.
  • Basic knowledge about xml editing & modding.
  • Settings.apk from your rom

Lets start:-

Step-1
First of all decompile your settings.apk

Step-2
Now download this
and extract it.
Open & copy the "res" and paste it in your decompiled "settings" folder

Step-3
Now goto settings/res/xml and open wifi_settings.xml
Here you will see a line like that:
Code:

<CheckBoxPreference android:persistent="false" android:title="@string/wifi_quick_toggle_title" android:key="enable_wifi" android:summary="@string/wifi_quick_toggle_summary" />
Step-4
Add this android:layout="@layout/sachin_wifi_switch" Now it will look like this:
Code:

<CheckBoxPreference android:persistent="false" android:layout="@layout/sachin_wifi_switch" android:title="@string/wifi_quick_toggle_title" android:key="enable_wifi" android:summary="@string/wifi_quick_toggle_summary" />
now save and close it.

Step-5
Now open bluetooth_settings.xml
and find this:
Code:

<CheckBoxPreference android:title="@string/bluetooth" android:key="bt_checkbox" android:summary="@string/bluetooth_quick_toggle_summary" />
Step-6
Here add this android:layout="@layout/sachin_bt_switch"
and now it will look like this:
Code:

<CheckBoxPreference android:layout="@layout/sachin_bt_switch" android:title="@string/bluetooth" android:key="bt_checkbox" android:summary="@string/bluetooth_quick_toggle_summary" />
save and close it.

Step-7
Now open AndroidManifest.xml in "Settings" folder.
Here find this:
Code:

<activity android:label="@string/wifi_settings" android:icon="@drawable/mainmenu_icon_wifi_settings" android:name=".wifi.WifiSettings" android:clearTaskOnLaunch="true" android:configChanges="keyboardHidden|orientation">
Step-8
After "activity" add this android:theme="@android:style/Theme.NoTitleBar"
like this:
Code:

<activity android:theme="@android:style/Theme.NoTitleBar" android:label="@string/wifi_settings" android:icon="@drawable/mainmenu_icon_wifi_settings" android:name=".wifi.WifiSettings" android:clearTaskOnLaunch="true" android:configChanges="keyboardHidden|orientation">
now find this:
Code:

<activity android:label="@string/bluetooth_settings_title" android:icon="@drawable/mainmenu_icon_bluetooth_settings" android:name=".bluetooth.BluetoothSettings" android:clearTaskOnLaunch="true" android:configChanges="keyboardHidden|orientation">
similarly do here, add android:theme="@android:style/Theme.NoTitleBar" after "activity".
like this:
Code:

<activity android:theme="@android:style/Theme.NoTitleBar" android:label="@string/bluetooth_settings_title" android:icon="@drawable/mainmenu_icon_bluetooth_settings" android:name=".bluetooth.BluetoothSettings" android:clearTaskOnLaunch="true" android:configChanges="keyboardHidden|orientation">
save and close it.

and you are done with modding.

Now compile & Sign the new Settings.apk
and push it to system/app and change the permission to rw-r-r

Enjoy! Press THANKS if you like it


HIT HARD
HIT OFTEN

#Roman Empire


Regards:- Sachin Kumar53


from xda-developers http://ift.tt/1SjG1XM
via IFTTT

Aucun commentaire:

Enregistrer un commentaire