[Sony Cross-Device Development Themes and Apps] Gaurav007:
Hi Community!

Here is a Guide For Porting Swiping Power toggles Created by Master [MENTION=3989065]serajr[/MENTION]

Works on 5.1,5.0.2 & 5.0

REQUIREMENTS

1.)DEODEXED SystemUI & Settings

2.)Knowledge About Replacing IDs

3.)Latest Apktool

Lets Start

Download the attached files and merge them into your SystemUI

Then Open Android-mainfest.xml

Add this code before </manifest>

<meta-data android:name="com.sonymobile.runtimeskinning.LAF_VERSION" android:value="1"/>
<receiver android:name="com.serajr.powertoggles.receivers.NetworkModeReceiver" android:process="com.android.phone"/>
<activity android:configChanges="orientation|screenSize" android:exported="true" android:icon="@drawable/ic_settings" android:label="@string/power_toggles_preferences_category_power_toggles" android:name="com.serajr.powertoggles.preferences.PowerTogglesPreferencesActivity" android:theme="@style/DeviceDefaultLight">
<intent-filter>
<action android:name="com.serajr.powertoggles.preferences.intent.PREFERENCES"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
<meta-data android:name="com.sonymobile.settings.preference.TITLE" android:resource="@string/power_toggles_preferences_category_power_toggles"/>
<meta-data android:name="com.sonymobile.settings.preference.SUMMARY" android:resource="@string/status_bar_settings"/>
<meta-data android:name="android.support.PARENT_ACTIVITY" android:value="com.android.settings.display"/>
</activity>
<activity android:configChanges="orientation|screenSize" android:exported="false" android:icon="@drawable/ic_settings" android:label="@string/power_toggles_preferences_category_order" android:name="com.serajr.powertoggles.preferences.PowerTogglesPreferencesOrderActivity" android:theme="@style/DeviceDefaultLight">
<intent-filter>
<action android:name="com.serajr.powertoggles.preferences.intent.ORDER"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>

Now Open Res/Values/Arrays.xmal

Add this Codes before </resources>

<string-array name="power_toggles_available_buttons">
<item>MeProfile</item>
<item>SystemSettings</item>
<item>RecentApps</item>
<item>BatteryInfo</item>
<item>Camera</item>
<item>Wifi</item>
<item>WifiAp</item>
<item>Bluetooth</item>
<item>GPS</item>
<item>StaminaMode</item>
<item>NFC</item>
<item>Roaming</item>
<item>Throw</item>
<item>Sound</item>
<item>Flashlight</item>
<item>Brightness</item>
<item>ScreenTimeout</item>
<item>StayAwakePlugged</item>
<item>Sync</item>
<item>Lockscreen</item>
<item>AutoRotate</item>
<item>Airplane</item>
<item>MobileData</item>
<item>NetworkMode</item>
<item>USBConnectionMode</item>
<item>USBDebugging</item>
<item>USBTether</item>
<item>Reboot</item>
<item>Shutdown</item>
</string-array>
<string-array name="power_toggles_reboot_options">
<item>@string/power_toggles_reboot</item>
<item>@string/power_toggles_reboot_recovery</item>
<item>@string/power_toggles_reboot_bootloader</item>
</string-array>
<string-array name="power_toggles_reboot_actions">
<item>now</item>
<item>recovery</item>
<item>bootloader</item>
</string-array>
<string-array name="power_toggles_usb_connection_mode_options">
<item>@string/power_toggles_usb_mtp_mode</item>
<item>@string/power_toggles_usb_msc_mode</item>
</string-array>
<string-array name="power_toggles_usb_connection_mode_actions">
<item>mtp</item>
<item>mass_storage</item>
</string-array>
<string-array name="power_toggles_battery_info_options">
<item>@string/power_toggles_battery_info_info</item>
<item>@string/power_toggles_battery_info_usage</item>
</string-array>
<string-array name="power_toggles_battery_info_actions">
<item>battery_info</item>
<item>battery_usage</item>
</string-array>

Open Bools.xml

ADD these codes

<bool name="power_toggles_colored_battery_info">true</bool>
<bool name="power_toggles_colored_usb_connection_mode">true</bool>
<bool name="power_toggles_colored_system_settings">true</bool>
<bool name="power_toggles_colored_recent_apps">true</bool>
<bool name="power_toggles_colored_reboot">true</bool>
<bool name="power_toggles_colored_shutdown">true</bool>
<bool name="power_toggles_active_camera_double_cells">true</bool>

Open colors.xml

Add these code

<color name="custom_drawer_layout_bg">#e60e0e0e</color>
<color name="custom_drawer_layout_scrin">#55ffffff</color>
<color name="power_toggles_button_icon_color">#ff33b5e5</color>
<color name="power_toggles_button_label_color">#ffffffff</color>

Open Dimens.xml

Add these codes

<dimen name="custom_drawer_layout_width">300.0dip</dimen>
<dimen name="power_toggles_button_height">80.0dip</dimen>
<dimen name="power_toggles_grid_width">300.0dip</dimen>

Open Ids.xml

<item type="id" name="custom_drawer_layout">false</item>
<item type="id" name="power_toggles">false</item>
<item type="id" name="power_toggles_button">false</item>
<item type="id" name="power_toggles_button_icon">false</item>
<item type="id" name="power_toggles_button_text">false</item>
<item type="id" name="power_toggles_button_status">false</item>
<item type="id" name="power_toggles_me_profile_button">false</item>
<item type="id" name="power_toggles_preference_icon">false</item>
<item type="id" name="power_toggles_preferences_order_grid">false</item>
<item type="id" name="power_toggles_button_camera_surface_holder">false</item>
<item type="id" name="power_toggles_button_camera_surface_flash_overlay">false</item>

Open integers.xml

ADD these codes

<integer name="power_toggles_row_layout_portrait_buttons_count">4</integer>
<integer name="power_toggles_row_layout_landscape_buttons_count">8</integer>
<integer name="power_toggles_grid_layout_columns_count">4</integer>

Open String.xml

<string name="custom_drawer_layout_header_text">POWER TOGGLES</string>
<string name="power_toggles_wifi_text">Wi-Fi</string>
<string name="power_toggles_mobile_data_text">Data</string>
<string name="power_toggles_network_text">Network Mode</string>
<string name="power_toggles_sound_sound_text">Sound</string>
<string name="power_toggles_sound_sound_vibration_text">Sound Vibration</string>
<string name="power_toggles_sound_silent_text">Silent</string>
<string name="power_toggles_sound_vibration_text">Vibration</string>
<string name="power_toggles_auto_rotate_text">Auto Rotation</string>
<string name="power_toggles_bluetooth_text">Bluetooth</string>
<string name="power_toggles_gps_text">GPS</string>
<string name="power_toggles_sync_text">Auto Sync</string>
<string name="power_toggles_brightness_text">Brightness</string>
<string name="power_toggles_screen_timeout_text">Screen Timeout</string>
<string name="power_toggles_lockscreen_text">Lockscreen</string>
<string name="power_toggles_airplane_text">Airplane Mode</string>
<string name="power_toggles_flashlight_text">Flashlight</string>
<string name="power_toggles_reboot_text">Reboot</string>
<string name="power_toggles_shutdown_text">Shutdown</string>
<string name="power_toggles_airplane_mode">In Flight Mode</string>
<string name="power_toggles_shutdown_confirm">Your phone will shut down.</string>
<string name="power_toggles_reboot">Reboot</string>
<string name="power_toggles_reboot_recovery">Recovery</string>
<string name="power_toggles_reboot_bootloader">Bootloader</string>
<string name="power_toggles_usb_debugging_text">USB Debugging</string>
<string name="power_toggles_usb_connection_mode_text">USB Conn. Mode</string>
<string name="power_toggles_usb_mtp_title">Current mode: MTP</string>
<string name="power_toggles_usb_msc_title">Current mode: MSC</string>
<string name="power_toggles_usb_mtp_mode">MTP - Media Transfer</string>
<string name="power_toggles_usb_msc_mode">MSC - Mass Storage</string>
<string name="power_toggles_wifi_ap_text">Wi-Fi Hotspot</string>
<string name="power_toggles_stay_awake_plugged_text">Stay Awake</string>
<string name="power_toggles_battery_info_text">Battery Info</string>
<string name="power_toggles_battery_info_info">Battery Information</string>
<string name="power_toggles_battery_info_usage">Battery Power Usage</string>
<string name="power_toggles_system_settings_text">System Settings</string>
<string name="power_toggles_recent_apps_text">Recent Apps</string>
<string name="power_toggles_me_profile_contact_text">Me</string>
<string name="power_toggles_stamina_mode_text">STAMINA Mode</string>
<string name="power_toggles_nfc_text">NFC</string>
<string name="power_toggles_roaming_text">Roaming</string>
<string name="power_toggles_throw_text">Throw</string>
<string name="power_toggles_usb_tether_text">USB Tethering</string>
<string name="power_toggles_preferences_category_power_toggles">Power Toggles</string>
<string name="power_toggles_preferences_close_on_toggle_title">Close on Toggle</string>
<string name="power_toggles_preferences_close_on_toggle_summary">Close the notification pulldown after toggling a button</string>
<string name="power_toggles_preferences_category_order">Buttons Order</string>
<string name="power_toggles_preferences_buttons_order_title">Change Order</string>
<string name="power_toggles_preferences_buttons_order_summary">Change the buttons order (two or more selected selected buttons are needed)</string>
<string name="power_toggles_preferences_category_buttons">Buttons (Alphabetically Sorted)</string>
<string name="power_toggles_preferences_category_reset">Reset</string>
<string name="power_toggles_preferences_reset_title">Reset Buttons</string>
<string name="power_toggles_preferences_reset_summary">All buttons and default order</string>
<string name="power_toggles_preferences_reset_message">All buttons will be included with the default order. Continue?</string>
<string name="power_toggles_preferences_reset_success_message">All buttons and order successfully reseted!</string>
<string name="power_toggles_preferences_about">About</string>
<string name="power_toggles_preferences_buttons_titles_title">Buttons Titles</string>
<string name="power_toggles_preferences_buttons_titles_summary">Show buttons titles</string>
<string name="power_toggles_camera_text">Camera</string>
<string name="power_toggles_battery_meter_format">@string/status_bar_settings_battery_meter_format</string>

Open Styles.xml

Add these Codes

<style name="TextAppearance.StatusBar.CustomDrawerLayout" parent="@android:style/Widget.DeviceDefault.Light.TimePicker">
<item name="android:textSize">12.0dip</item>
<item name="android:textAllCaps">true</item>
</style>
<style name="DeviceDefaultLight" parent="@android:style/Theme.DeviceDefault.Light" />
<style name="power_toggles_text_appearance" parent="@android:style/TextAppearance">
<item name="android:textSize">9.0sp</item>
<item name="android:textStyle">normal</item>
<item name="android:textColor">@color/power_toggles_button_label_color</item>
<item name="android:ellipsize">marquee</item>
<item name="android:paddingLeft">2.0dip</item>
<item name="android:paddingRight">2.0dip</item>
<item name="android:fadingEdge">horizontal</item>
<item name="android:maxLines">2</item>
<item name="android:singleLine">false</item>
<item name="android:textAllCaps">true</item>
</style>

Recompile

Post 2 contains Smali part