[Guide]Serajr Swiping Power Toggles for Lollipop - Sony Cross-Device Development Themes and Apps

Hi Community!
Here is a Guide For Porting Swiping Power toggles Created by Master @serajr
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>
Code:
<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>
Code:
<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
Code:
<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
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
Code:
<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
Code:
<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
Code:
<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
Code:
<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
Code:
<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

Smali Part
Decompile the newly recompiled SystemUI again
Open SystemUI\smali\com\android\systemui\statusbar\phone\PhoneStatusBar.smali
Find
Code:
.field private mQSPanel:Lcom/android/systemui/qs/QSPanel;
Add the Line above that
Code:
.field private mPowerToggles:Lcom/serajr/powertoggles/PowerToggles;
Find
Code:
.field mDataTrafficController:Lcom/sonymobile/systemui/statusbar/policy/DataTrafficControllerImpl;
Add this Line above that
Code:
.field private mCustomDrawerLayout:Lcom/serajr/systemui/navigationdrawer/CustomDrawerLayout;
Find
Code:
.method private setNavigationIconHints(I)V
Add these Methods below that
Code:
.method private setupCustomDrawerLayout()V
.locals 3
.prologue
.line 57
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
const v1, 0x7f1001e7 #type="id" name="custom_drawer_layout"
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Lcom/serajr/systemui/navigationdrawer/CustomDrawerLayout;
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mCustomDrawerLayout:Lcom/serajr/systemui/navigationdrawer/CustomDrawerLayout;
.line 61
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mCustomDrawerLayout:Lcom/serajr/systemui/navigationdrawer/CustomDrawerLayout;
iget-object v1, p0, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;
invoke-virtual {v1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v1
const v2, 0x7f09006b #type="color" name="custom_drawer_layout_scrin"
invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getColor(I)I
move-result v1
invoke-virtual {v0, v1}, Lcom/serajr/systemui/navigationdrawer/CustomDrawerLayout;->setScrimColor(I)V
.line 65
return-void
.end method
.method private setupPowerToggles()V
.locals 3
.prologue
.line 55
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
const v1, 0x7f1001e8 #type="id" name="power_toggles"
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Lcom/serajr/powertoggles/PowerToggles;
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerToggles:Lcom/serajr/powertoggles/PowerToggles;
.line 56
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerToggles:Lcom/serajr/powertoggles/PowerToggles;
iget-object v1, p0, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;
invoke-virtual {v1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v1
const v2, 0x7f0e01ad #type="dimen" name="power_toggles_grid_width"
invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I
move-result v1
invoke-virtual {v0, v1}, Lcom/serajr/powertoggles/PowerToggles;->gridWidth(I)V
.line 57
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerToggles:Lcom/serajr/powertoggles/PowerToggles;
const/4 v1, 0x0
invoke-virtual {v0, v1}, Lcom/serajr/powertoggles/PowerToggles;->buttonShowTitle(Z)V
.line 58
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerToggles:Lcom/serajr/powertoggles/PowerToggles;
invoke-virtual {v0}, Lcom/serajr/powertoggles/PowerToggles;->setupPowerToggles()V
.line 59
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerToggles:Lcom/serajr/powertoggles/PowerToggles;
invoke-virtual {v0}, Lcom/serajr/powertoggles/PowerToggles;->updatePowerToggles()V
.line 60
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerToggles:Lcom/serajr/powertoggles/PowerToggles;
new-instance v1, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$48;
invoke-direct {v1, p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$48;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)V
invoke-virtual {v0, v1}, Lcom/serajr/powertoggles/PowerToggles;->setChangeContentObserverListener(Lcom/serajr/powertoggles/PowerToggles$ChangeObserverCallbackInterface;)V
.line 61
return-void
.end method
Replace Public ID of these
Code:
0x7f1001e7 #type="id" name="custom_drawer_layout"
0x7f09006b #type="color" name="custom_drawer_layout_scrin"
0x7f1001e8 #type="id" name="power_toggles"
0x7f0e01ad #type="dimen" name="power_toggles_grid_width"
Find
Code:
.method public postAnimateCollapsePanels()V
Add these lines
Code:
.line 2048
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mCustomDrawerLayout:Lcom/serajr/systemui/navigationdrawer/CustomDrawerLayout;
invoke-virtual {v0}, Lcom/serajr/systemui/navigationdrawer/CustomDrawerLayout;->closeDrawers()V
.line 4475
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerToggles:Lcom/serajr/powertoggles/PowerToggles;
invoke-virtual {v0}, Lcom/serajr/powertoggles/PowerToggles;->fullScroll()V
Like this
Code:
.method public postAnimateCollapsePanels()V
.locals 2
.prologue
[COLOR="Red"].line 2048
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mCustomDrawerLayout:Lcom/serajr/systemui/navigationdrawer/CustomDrawerLayout;
invoke-virtual {v0}, Lcom/serajr/systemui/navigationdrawer/CustomDrawerLayout;->closeDrawers()V
.line 4475
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerToggles:Lcom/serajr/powertoggles/PowerToggles;
invoke-virtual {v0}, Lcom/serajr/powertoggles/PowerToggles;->fullScroll()V[/COLOR]
Find
Code:
invoke-direct/range {p0 .. p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->resetUserSetupObserver()V
Add these code Above that
Code:
.line 1243
invoke-direct/range {p0 .. p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setupCustomDrawerLayout()V
.line 1244
invoke-direct/range {p0 .. p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setupPowerToggles()V
.line 1245
invoke-virtual/range {p0 .. p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->powerTogglesEnabledCallback()V
.line 1246
invoke-virtual/range {p0 .. p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->powerTogglesPreferencesButtonsTitlesCallback()V
Find
Code:
.method public refreshAllStatusBarIcons()V
Add these Methods above that
Code:
.method public powerTogglesEnabledCallback()V
.locals 3
.prologue
const/4 v2, 0x1
.line 109
iget-object v0, p0, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "power_toggles_enabled"
invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v0
if-ne v0, v2, :cond_0
.line 112
const-string v0, "powerTogglesEnabledCallback"
const-string v1, "habilita"
invoke-static {v0, v1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
.line 113
const/4 v0, 0x1
invoke-virtual {p0, v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->customDrawerLayoutEnabled(Z)V
.line 120
:goto_0
return-void
.line 117
:cond_0
const-string v0, "powerTogglesEnabledCallback"
const-string v1, "desabilita"
invoke-static {v0, v1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
.line 118
const/4 v0, 0x0
invoke-virtual {p0, v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->customDrawerLayoutEnabled(Z)V
goto :goto_0
.end method
.method public powerTogglesPreferencesButtonsTitlesCallback()V
.locals 4
.prologue
.line 134
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerToggles:Lcom/serajr/powertoggles/PowerToggles;
if-eqz v1, :cond_1
.line 136
const/4 v0, 0x0
.line 138
.local v0, "showTitles":Z
iget-object v1, p0, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;
invoke-virtual {v1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v2, "power_toggles_preferences_buttons_titles"
const/4 v3, 0x0
invoke-static {v1, v2, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v1
const/4 v2, 0x1
if-ne v1, v2, :cond_0
.line 140
const/4 v0, 0x1
.line 144
:cond_0
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerToggles:Lcom/serajr/powertoggles/PowerToggles;
invoke-virtual {v1, v0}, Lcom/serajr/powertoggles/PowerToggles;->buttonShowTitle(Z)V
.line 145
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerToggles:Lcom/serajr/powertoggles/PowerToggles;
invoke-virtual {v1}, Lcom/serajr/powertoggles/PowerToggles;->setupPowerToggles()V
.line 146
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerToggles:Lcom/serajr/powertoggles/PowerToggles;
invoke-virtual {v1}, Lcom/serajr/powertoggles/PowerToggles;->updatePowerToggles()V
.line 149
.end local v0 # "showTitles":Z
:cond_1
return-void
.end method
Find
Code:
.method public destroy()V
Add this method above that
Code:
.method public customDrawerLayoutEnabled(Z)V
.locals 2
.param p1, "enabled" # Z
.prologue
.line 77
const/4 v0, 0x0
.line 79
.local v0, "lockMode":I
if-nez p1, :cond_0
.line 81
const/4 v0, 0x1
.line 85
:cond_0
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mCustomDrawerLayout:Lcom/serajr/systemui/navigationdrawer/CustomDrawerLayout;
invoke-virtual {v1, v0}, Lcom/serajr/systemui/navigationdrawer/CustomDrawerLayout;->setDrawerLockMode(I)V
.line 87
return-void
.end method
Save it
Open /res/layout/status_bar_expanded.xml or msim_status_bar_expanded(dual sim)
Add these Red Lines
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.phone.NotificationPanelView android:id="@id/notification_panel" android:background="@android:color/transparent" android:layout_width="fill_parent" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
<include android:layout_gravity="bottom" android:layout_width="fill_parent" android:layout_height="@dimen/carrier_label_height" layout="@layout/subs_label" />
<include android:layout_gravity="bottom" android:layout_width="fill_parent" android:layout_height="@dimen/carrier_label_height" android:layout_marginBottom="@dimen/close_handle_height" layout="@layout/carrier_label" />
<include android:visibility="gone" android:layout_height="wrap_content" layout="@layout/keyguard_status_view" />
[COLOR="red"]<com.serajr.systemui.navigationdrawer.CustomDrawerLayout android:id="@id/custom_drawer_layout" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginBottom="48.0dip">[/COLOR]
<include layout="@layout/somc_keyguard_voice_unlock_microphone_frame" />
<TextView android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Network.EmergencyOnly" android:gravity="center" android:id="@id/emergency_calls_only" android:padding="4.0dip" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="wrap_content" />
<FrameLayout android:layout_width="fill_parent" android:layout_height="wrap_content">
<include layout="@layout/msim_status_bar_expanded_header" />
<com.android.systemui.statusbar.phone.NotificationsQuickSettingsContainer android:layout_gravity="center|top|clip_horizontal" android:id="@id/notification_container_parent" android:clipChildren="false" android:clipToPadding="false" android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.phone.ObservableScrollView android:layout_gravity="center|top|clip_horizontal" android:id="@id/scroll_view" android:scrollbars="none" android:layout_width="@dimen/notification_panel_width" android:layout_height="fill_parent" android:fillViewport="true" android:overScrollMode="never">
<LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content">
<include android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="@dimen/status_bar_header_height_expanded" android:layout_marginStart="@dimen/notification_side_padding" android:layout_marginEnd="@dimen/notification_side_padding" layout="@layout/qs_panel" />
<View android:id="@id/reserve_notification_space" android:layout_width="fill_parent" android:layout_height="@dimen/min_stack_height" android:layout_marginTop="@dimen/notifications_top_padding" />
<View android:layout_width="fill_parent" android:layout_height="@dimen/notification_side_padding" />
</LinearLayout>
</com.android.systemui.statusbar.phone.ObservableScrollView>
<com.android.systemui.statusbar.stack.NotificationStackScrollLayout android:layout_gravity="center|top|clip_horizontal" android:id="@id/notification_stack_scroller" android:layout_width="@dimen/notification_panel_width" android:layout_height="fill_parent" android:layout_marginBottom="@dimen/close_handle_underlap" />
<ViewStub android:layout_gravity="end" android:id="@id/keyguard_user_switcher" android:layout="@layout/keyguard_user_switcher" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="@dimen/status_bar_header_height_keyguard" />
<include android:visibility="invisible" layout="@layout/keyguard_status_bar" />
</com.android.systemui.statusbar.phone.NotificationsQuickSettingsContainer>
</FrameLayout>
[COLOR="red"]<LinearLayout android:layout_gravity="end" android:orientation="vertical" android:background="@color/custom_drawer_layout_bg" android:layout_width="@dimen/custom_drawer_layout_width" android:layout_height="fill_parent">
<TextView android:gravity="center" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/custom_drawer_layout_header_text" style="@style/power_toggles_text_appearance" />
<FrameLayout android:layout_width="fill_parent" android:layout_height="0.0dip" android:layout_weight="1.0">
<com.serajr.powertoggles.PowerToggles android:id="@id/power_toggles" android:layout_width="fill_parent" android:layout_height="wrap_content" />
</FrameLayout>
</LinearLayout>
</com.serajr.systemui.navigationdrawer.CustomDrawerLayout>[/COLOR]
<include android:visibility="gone" layout="@layout/keyguard_bottom_area" />
<com.android.systemui.statusbar.AlphaOptimizedView android:layout_gravity="bottom" android:id="@id/qs_navbar_scrim" android:background="@drawable/qs_navbar_scrim" android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="96.0dip" />
</com.android.systemui.statusbar.phone.NotificationPanelView>
-Save
-Recompile
-Sign

Final Part
Decompile Settings.apk
Open res/xml/display_settings.xml or (on your own xml)
Add
Code:
<com.sonymobile.settings.preference.IntentPreference android:key="power_toggles" settings:dependOnResource="true" settings:dependOnIsValidIntent="true" settings:hasMetaData="true">
<intent android:targetPackage="com.android.systemui" android:targetClass="com.serajr.powertoggles.preferences.PowerTogglesPreferencesActivity" />
</com.sonymobile.settings.preference.IntentPreference>
Done
-Recompile
-Sign
If you have are having problems then checkTHIS Post
Here is my SystemUI.apk(Z2) if you are too lazy to do these stuff
Screenshot
Credits
Master @serajr
@Nathan Ali Ashari

Reserved

Good bro

Nice guide will try it ?

Awesome masters lml

Thank you buddy!
It is always a pleasure to me seeing my work still being ported, and better yet seeing it been made with so such great mastery.
Hats off!

serajr said:
Thank you buddy!
It is always a pleasure to me seeing my work still being ported, and better yet seeing it been made with so such great mastery.
Hats off!
Click to expand...
Click to collapse
Thanks Master

Its work in my device cm 12.1 xperia L but toggle mobile data not work (fc) .. How to fix ? ?
Sent from my C2105 using XDA Free mobile app

Arga_Abidullah said:
Its work in my device cm 12.1 xperia L but toggle mobile data not work (fc) .. How to fix ? ?
Sent from my C2105 using XDA Free mobile app
Click to expand...
Click to collapse
Post logcat buddy
Or
Open /data/system/Dropbox/and post the latest system app crash txt

java.lang.NoSuchMethodError: No virtual method getMobileDataEnabled(Z)V in class Landroid/net/ConnectivityManager; or its super classes (declaration of 'android.net.ConnectivityManager' appears in /system/framework/framework.jar)
at com.serajr.powertoggles.buttons.MobileData.toggleState(MobileData.java:98)
at com.serajr.powertoggles.PowerTogglesButton$1.onClick(PowerTogglesButton.java:175)
at android.view.View.performClick(View.java:4789)
at android.view.View$PerformClick.run(View.java:19881)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5291)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699)
Sent from my C2105 using XDA Free mobile app

Hi
I have tried this in my Z2. Followed tut as per OP. No errors. Done all things correctly.. But after replace SystemUI and reboot i got blank screen. Then tried ur SystemUI apk. Same result.. I have fully super deodexed stock Z2 rom.. Any help.. ?

Rajeev said:
Hi
I have tried this in my Z2. Followed tut as per OP. No errors. Done all things correctly.. But after replace SystemUI and reboot i got blank screen. Then tried ur SystemUI apk. Same result.. I have fully super deodexed stock Z2 rom.. Any help.. ?
Click to expand...
Click to collapse
me too, i´m glad that this issue happens to a experienced dev too
thought it was my fault ...
@Rajeev
it seems that spuris Z2 arrived ... great

Rajeev said:
Hi
I have tried this in my Z2. Followed tut as per OP. No errors. Done all things correctly.. But after replace SystemUI and reboot i got blank screen. Then tried ur SystemUI apk. Same result.. I have fully super deodexed stock Z2 rom.. Any help.. ?
Click to expand...
Click to collapse
Yes same result here bro @Rajeev on my Z3
Tried it today.... No luck, black screen ><"

Pandemic said:
Yes same result here bro @Rajeev on my Z3
Tried it today.... No luck, black screen ><"
Click to expand...
Click to collapse
moonryder said:
me too, i´m glad that this issue happens to a experienced dev too
thought it was my fault ...
@Rajeev
it seems that spuris Z2 arrived ... great
Click to expand...
Click to collapse
Yes. Hope that OP will find the issue and update his tutorial. Its a very good one for us..

Rajeev said:
Yes. Hope that OP will find the issue and update his tutorial. Its a very good one for us..
Click to expand...
Click to collapse
Pandemic said:
Yes same result here bro @Rajeev on my Z3
Tried it today.... No luck, black screen ><"
Click to expand...
Click to collapse
Logs please?

Gaurav007 said:
Logs please?
Click to expand...
Click to collapse
I have tired ur shared SystemUI apk too.. Same results.. In my Z2..

Rajeev said:
I have tired ur shared SystemUI apk too.. Same results.. In my Z2..
Click to expand...
Click to collapse
Bro 2-3 people told me it works
If you can send me logcat then I can check what is the problem
Or
You can open /data/system/Dropbox/
Here you'll find all crash reports
Post the latest system_app_crash.txt

Xperia Z2

Related

[MOD][HOW-TO] Real-time notification panel background color/transparency

This will allow you to change the background color/transparency of the notification panel in real time without rebooting.
We're going to be working with the following two files:
SecSettings.apk
SystemUI.apk
KEY
REMOVE what's in BLUE
ADD what's in RED
Note:
If you've already implemented my Clock mod and added the color picker files, you'll have to replace it with what I've attached as I've changed how the color picker works. It now saves your setting instead of reverting it to default everytime you leave and come back to the menu. I'll be updating the clock mod right now.
Issues:
There is a tiny line that goes across just under the brightness slider/notification toggles that I cannot figure out how to remove. It's only noticeable when you use colors. If you're just using transparency then it's hard to tell.
SecSettings.apk
Navigate to /res/values/strings.xml
Add the following to the end of the file
Code:
<string name="notification_panel_color_title">Notification panel color</string>
<string name="notification_panel_color_summary">Change the background color of the notification panel</string>
<string name="dialog_color_picker">Color Picker</string>
<string name="press_color_to_apply">Press on Color to apply</string>
Navigate to /res/values/ids.xml
add the following to the end of the file
Code:
<item type="id" name="color_picker_view">false</item>
<item type="id" name="old_color_panel">false</item>
<item type="id" name="new_color_panel">false</item>
Navigate to /xml/display_settings.xml
Add the following line wherever you would like it to show in the menu
Code:
<com.loser.colorpicker.ColorPickerPreference android:persistent="false" android:title="@string/notification_panel_color_title" android:key="notification_panel_color" android:summary="@string/notification_panel_color_summary" android:defaultValue="0xff000000" alphaSlider="true" />
Navigate to /smali/com/android/settings/DisplaySettings.smali
Code:
.field private mMultiWindowModeObserver:Landroid/database/ContentObserver;
.field private mMultiWindowPref:Landroid/preference/CheckBoxPreference;
[COLOR="Red"].field private mNotificationPanelColor:Lcom/loser/colorpicker/ColorPickerPreference;[/COLOR]
.field private mNotificationPulse:Landroid/preference/CheckBoxPreference;
.field private mPowerSavingMode:Landroid/preference/CheckBoxPreference;
.method private updateState()V
Code:
iget-object v3, p0, Lcom/android/settings/DisplaySettings;->mDisplayBatteryLevel:Landroid/preference/CheckBoxPreference;
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v4, "display_battery_percentage"
invoke-static {v0, v4, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v0
if-eqz v0, :cond_4
move v0, v1
:goto_1
invoke-virtual {v3, v0}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
[COLOR="red"]iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mNotificationPanelColor:Lcom/loser/colorpicker/ColorPickerPreference;
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "notification_panel_color"
const v5, -0xffffff
invoke-static {v3, v4, v5}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v3
const/16 v5, 0x0
invoke-virtual {v0, v5, v3}, Lcom/loser/colorpicker/ColorPickerPreference;->onSetInitialValue(ZLjava/lang/Object;)V[/COLOR]
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mTouchKeyLight:Landroid/preference/ListPreference;
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "button_key_light"
.method public onCreate(Landroid/os/BundleV
Code:
const-string v11, "display_battery_level"
invoke-virtual {p0, v11}, Lcom/android/settings/DisplaySettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v11
check-cast v11, Landroid/preference/CheckBoxPreference;
iput-object v11, p0, Lcom/android/settings/DisplaySettings;->mDisplayBatteryLevel:Landroid/preference/CheckBoxPreference;
[COLOR="red"]const-string v11, "notification_panel_color"
invoke-virtual {p0, v11}, Lcom/android/settings/DisplaySettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v11
check-cast v11, Lcom/loser/colorpicker/ColorPickerPreference;
iput-object v11, p0, Lcom/android/settings/DisplaySettings;->mNotificationPanelColor:Lcom/loser/colorpicker/ColorPickerPreference;
iget-object v11, p0, Lcom/android/settings/DisplaySettings;->mNotificationPanelColor:Lcom/loser/colorpicker/ColorPickerPreference;
invoke-virtual {v11, p0}, Lcom/loser/colorpicker/ColorPickerPreference;->setOnPreferenceChangeListener(Landroid/preference/Preference$OnPreferenceChangeListener;)V[/COLOR]
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getActivity()Landroid/app/Activity;
move-result-object v11
invoke-static {v11}, Lcom/android/settings/Utils;->isTablet(Landroid/content/Context;)Z
move-result v11
if-eqz v11, :cond_6
.method public onPreferenceChange(Landroid/preference/Preference;Ljava/lang/ObjectZ
Code:
:catch_2
move-exception v0
.line 1038
const-string v1, "DisplaySettings"
const-string v2, "could not persist Touch key light setting"
invoke-static {v1, v2, v0}, Landroid/util/Log;->secE(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
goto/16 :goto_4
.line 1040
:cond_9
[COLOR="red"]const-string v2, "notification_panel_color"
invoke-virtual {v2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_next
invoke-static {p2}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
move-result-object v2
const-string v1, "^#"
const-string v3, ""
invoke-virtual {v2, v1, v3}, Ljava/lang/String;->replaceFirst(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object v3
invoke-static {v3}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I
move-result v1
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v2
const-string v3, "notification_panel_color"
invoke-static {v2, v3, v1}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
goto/16 :goto_4
:cond_next[/COLOR]
const-string v2, "quick_launch"
invoke-virtual {v2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
Now download the attached zip and extract to the root of your SecSettings folder.
Compile and then decompile and open up /res/values/public.xml
Open /smali/com/loser/colorpicker/ColorPickerDialog.smali
There should be a total of 6 id's you need to get. Make sure you're looking at the type as there's a layout and string with the same name.
That's it for SecSettings. Compile.
Now for SystemUI.apk
Navigate to /smali/com/android/systemui/statusbar/phone/PhoneStatusBar.smali
.method protected updateExpandedViewPos(I)V
Code:
iget-object v9, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
[COLOR="Red"]const/4 v6, 0x0
invoke-virtual {v9, v6}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->setBackground(Landroid/graphics/drawable/Drawable;)V
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
invoke-virtual {v3}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v6, "notification_panel_color"
const v9, -0xffffff
invoke-static {v3, v6, v9}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
move-object/from16 v0, p0
iget-object v9, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationPanel:Landroid/view/View;[/COLOR]
invoke-virtual {v9, v3}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->setBackgroundColor(I)V
Simple enough? Compile and test!
loserskater said:
Issues:
There is a tiny line that goes across just under the brightness slider/notification toggles that I cannot figure out how to remove. It's only noticeable when you use colors. If you're just using transparency then it's hard to tell.
Click to expand...
Click to collapse
Great work as always.
Regarding the above issue, did you look to see if it's a PNG or a color you can make transparent? Sounds like it's a separator.
I am guessing you did, but I just thought I'd ask.
upndwn4par said:
Great work as always.
Regarding the above issue, did you look to see if it's a PNG or a color you can make transparent? Sounds like it's a separator.
I am guessing you did, but I just thought I'd ask.
Click to expand...
Click to collapse
I think something is taking up like one extra pixel than it's background so the color background shows through.
Sent from my SAMSUNG-SGH-I747
You could also include this:
Code:
\res\layout\tw_status_bar_expanded.xml
Find in red, change to blue
TWO Edits here:
Code:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout android:id="@id/notification_panel" android:background="@drawable/notification_panel_bg" android:paddingTop="@dimen/notification_panel_padding_top" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginLeft="@dimen/notification_panel_margin_left"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
<FrameLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginBottom="@dimen/close_handle_underlap">
<include android:layout_width="fill_parent" android:layout_height="@dimen/tw_notification_panel_header_height" layout="@layout/tw_status_bar_expanded_header" />
<TextView android:gravity="center" android:id="@id/emergency_calls_only" android:paddingBottom="4.0dip" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="wrap_content" />
<HorizontalScrollView android:id="@id/quicksetting_scroller" android:scrollbars="none" android:layout_width="wrap_content" android:layout_height="@dimen/quick_setting_button_height" android:layout_marginTop="@dimen/tw_notification_panel_header_height">
<com.android.systemui.statusbar.policy.quicksetting.QuickSettingPanel android:orientation="horizontal" android:id="@id/quicksetting_container" android:layout_width="wrap_content" android:layout_height="wrap_content" android:divider="@drawable/tw_black_bg" android:showDividers="middle" />
</HorizontalScrollView>
<ScrollView android:id="@id/scroll" android:fadingEdge="none" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginTop="@dimen/notification_panel_quicksettingbtn_height" android:overScrollMode="ifContentScrolls">
<LinearLayout android:orientation="vertical" android:id="@id/scrollCart" android:layout_width="fill_parent" android:layout_height="wrap_content">
<LinearLayout android:orientation="vertical" android:id="@id/brightness_controller" [COLOR="Red"]android:background="#[COLOR="Blue"]00[/COLOR]000000"[/COLOR] android:visibility="visible" android:layout_width="fill_parent" android:layout_height="56.0dip">
<LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="55.0dip">
<ImageView android:id="@id/brightness_icon" android:clickable="true" android:layout_width="25.0dip" android:layout_height="fill_parent" android:layout_marginLeft="13.0dip" android:src="@drawable/ic_sysbar_brightness" android:contentDescription="@string/accessibility_brightness_icon" />
<FrameLayout android:id="@id/brightness_group" android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.policy.ToggleSlider android:id="@id/brightness" android:layout_width="fill_parent" android:layout_height="fill_parent" systemui:text="@string/status_bar_settings_auto_brightness_label" />
<com.android.systemui.statusbar.policy.ToggleSlider android:id="@id/auto_brightness" android:layout_width="fill_parent" android:layout_height="fill_parent" systemui:text="@string/status_bar_settings_auto_brightness_label" />
</FrameLayout>
</LinearLayout>
<View [COLOR="Red"]android:background="#[COLOR="blue"]00[/COLOR]091a24"[/COLOR] android:layout_width="fill_parent" android:layout_height="1.0dip" />
</LinearLayout>
<LinearLayout android:orientation="vertical" android:id="@id/noNotificationsTitle" android:focusable="true" android:layout_width="fill_parent" android:layout_height="wrap_content">
<TextView android:textSize="@dimen/status_bar_expanded_notification_category_text_size" android:textStyle="bold" android:textColor="@color/notification_category_color" android:gravity="left|center" android:id="@id/noNotificationsText" android:paddingLeft="11.0dip" android:layout_width="fill_parent" android:layout_height="@dimen/status_bar_expanded_notification_category_height" android:text="@string/status_bar_no_notifications_title" />
</LinearLayout>
<LinearLayout android:orientation="vertical" android:id="@id/onGoingCart" android:background="#ff293945" android:focusable="true" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="@dimen/status_bar_expanded_notification_category_height">
<TextView android:textSize="@dimen/status_bar_expanded_notification_category_text_size" android:textStyle="bold" android:textColor="@color/notification_category_color" android:gravity="left|center" android:id="@id/onGoingNotificationText" android:paddingLeft="11.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:text="@string/status_bar_ongoing_events_title" />
</LinearLayout>
<com.android.systemui.statusbar.policy.NotificationRowLayout android:id="@id/onGoingItems" android:layout_width="fill_parent" android:layout_height="wrap_content" systemui:rowHeight="@dimen/tw_notification_row_min_height" />
<LinearLayout android:orientation="vertical" android:id="@id/notificationCart" android:background="#ff293945" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="@dimen/status_bar_expanded_notification_category_height">
<RelativeLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content">
<TextView android:textSize="@dimen/status_bar_expanded_notification_category_text_size" android:textStyle="bold" android:textColor="@color/notification_category_color" android:gravity="left|center" android:id="@id/latestNotificationText" android:paddingLeft="11.0dip" android:layout_width="180.0dip" android:layout_height="fill_parent" android:text="@string/status_bar_latest_events_title" android:layout_alignParentLeft="true" />
<TextView android:textSize="@dimen/status_bar_expanded_notification_clear_button_text_size" android:textColor="@color/tw_status_bar_clear_btn_text" android:gravity="center" android:id="@id/clear_all_button" android:background="@drawable/tw_btn_default_small" android:padding="0.100000024dip" android:focusable="true" android:clickable="true" android:layout_width="@dimen/status_bar_expanded_clear_button_width" android:layout_height="fill_parent" android:layout_marginRight="4.0dip" android:text="@string/status_bar_clear_all_button" android:layout_alignParentRight="true" android:contentDescription="@string/accessibility_clear_all" />
</RelativeLayout>
</LinearLayout>
<com.android.systemui.statusbar.policy.NotificationRowLayout android:id="@id/notificationItems" android:layout_width="fill_parent" android:layout_height="wrap_content" systemui:rowHeight="@dimen/tw_notification_row_min_height" />
<com.android.systemui.statusbar.policy.NotificationRowLayout android:id="@id/latestItems" android:layout_width="fill_parent" android:layout_height="wrap_content" systemui:rowHeight="@dimen/tw_notification_row_min_height" />
</LinearLayout>
</ScrollView>
</FrameLayout>
<com.android.systemui.statusbar.phone.CloseDragHandle android:layout_gravity="bottom" android:orientation="vertical" android:id="@id/close" android:layout_width="fill_parent" android:layout_height="@dimen/tw_close_handle_height">
<RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent">
<ImageView android:layout_gravity="bottom" android:layout_width="fill_parent" android:layout_height="@dimen/tw_close_handle_height" android:src="@drawable/tw_status_bar_close" android:scaleType="fitXY" />
<TextView android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Network" android:gravity="center" android:layout_gravity="bottom" android:id="@id/carrier_label" android:layout_width="fill_parent" android:layout_height="@dimen/tw_close_handle_height" android:layout_marginBottom="10.0dip" />
</RelativeLayout>
</com.android.systemui.statusbar.phone.CloseDragHandle>
</FrameLayout>
Also, in the zipa re some transparent files that go in drawable-xhdpi.
Put them into that folder, then build/compile
EDIT:
Just noticed the above post... there's that tiny line sorted for you That's the second edit.
Thank you as always Loser ! Going to try this one tomorrow... I promise I'll try to do this one without my noon questions.
I know you can't say for sure but do you think this would translate closely to 4.1.2.
Most of yours have for me but just figured I'd ask
Sent from my SAMSUNG-SGH-I747 using xda premium
hednik said:
Thank you as always Loser ! Going to try this one tomorrow... I promise I'll try to do this one without my noon questions.
I know you can't say for sure but do you think this would translate closely to 4.1.2.
Most of yours have for me but just figured I'd ask
Sent from my SAMSUNG-SGH-I747 using xda premium
Click to expand...
Click to collapse
All the code is from the tmo 4.1.2 build so you shouldn't have any issues.
loserskater said:
All the code is from the tmo 4.1.2 build so you shouldn't have any issues.
Click to expand...
Click to collapse
Almost have it working correctly. Compiled and decompiled and the public "id"s all looked correct. Flashed went to display settings. Got a force close on the option so.... I've got the Id's incorrect but I looked then over and all I saw was :
Code:
<public type="id" name="color_picker_view" id="0x7f0b03f7" />
<public type="id" name="old_color_panel" id="0x7f0b03f8" />
<public type="id" name="new_color_panel" id="0x7f0b03f9" />
These were the only "id"s i saw. I ignored the ones with "layout" or "string"
Now in the colorpickerdialog.smali I saw this:
Code:
.line 65
.local v0, inflater:Landroid/view/LayoutInflater;
const v2, 0x7f040129
const/4 v3, 0x0
invoke-virtual {v0, v2, v3}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;
move-result-object v1
.line 67
.local v1, layout:Landroid/view/View;
invoke-virtual {p0, v1}, Lcom/loser/colorpicker/ColorPickerDialog;->setContentView(Landroid/view/View;)V
.line 69
const v2, 0x7f090e96
invoke-virtual {p0, v2}, Lcom/loser/colorpicker/ColorPickerDialog;->setTitle(I)V
.line 71
const v2, 0x7f0b03f7
invoke-virtual {v1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object v2
check-cast v2, Lcom/loser/colorpicker/ColorPickerView;
iput-object v2, p0, Lcom/loser/colorpicker/ColorPickerDialog;->mColorPicker:Lcom/loser/colorpicker/ColorPickerView;
.line 72
const v2, 0x7f0b03f8
invoke-virtual {v1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object v2
check-cast v2, Lcom/loser/colorpicker/ColorPickerPanelView;
iput-object v2, p0, Lcom/loser/colorpicker/ColorPickerDialog;->mOldColor:Lcom/loser/colorpicker/ColorPickerPanelView;
.line 73
const v2, 0x7f0b03f9
invoke-virtual {v1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object v2
check-cast v2, Lcom/loser/colorpicker/ColorPickerPanelView;
iput-object v2, p0, Lcom/loser/colorpicker/ColorPickerDialog;->mNewColor:Lcom/loser/colorpicker/ColorPickerPanelView;
and this one further down, which is repeated from up top
Code:
method public onClick(Landroid/view/View;)V
.locals 2
.parameter "v"
.prologue
.line 122
invoke-virtual {p1}, Landroid/view/View;->getId()I
move-result v0
const v1, 0x7f0b03f9
if-ne v0, v1, :cond_0
.line 123
iget-object v0, p0, Lcom/loser/colorpicker/ColorPickerDialog;->mListener:Lcom/loser/colorpicker/ColorPickerDialog$OnColorChangedListener;
if-eqz v0, :cond_0
Here were all the id's from the colorpickerdialog.smali:
Code:
Line 88: const v2, 0x7f040129 - [COLOR="red"][B]This one was under "layout"[/B][/COLOR]
Line 101: const v2, 0x7f090e96 [COLOR="red"][B]This one wasn't in the public xml[/B][/COLOR]
Line 106: const v2, 0x7f0b03f7
Line 117: const v2, 0x7f0b03f8
Line 128: const v2, 0x7f0b03f9
Line 229: const v1, 0x7f0b03f9
As a side note the check boc was about twice the size the others ones I have as well. Thanks !
here are the files just in case I didn't make much sense in my rambling:
ColorPickerDialog.smali - 10.67 KB
public.xml - 485.77 KB
hednik said:
Almost have it working correctly. Compiled and decompiled and the public "id"s all looked correct. Flashed went to display settings. Got a force close on the option so.... I've got the Id's incorrect but I looked then over and all I saw was :
...
As a side note the check boc was about twice the size the others ones I have as well. Thanks !
here are the files just in case I didn't make much sense in my rambling:
ColorPickerDialog.smali - 10.67 KB
public.xml - 485.77 KB
Click to expand...
Click to collapse
I accidentally uploaded the colorpickerdialog that doesn't have the comments, I'll fix the upload soon
Sent from my SAMSUNG-SGH-I747
EDIT: Fixed. Download the new zip and look at ColorPickerDialog.smali
Also, yes the box is bigger. It's not a checkbox but a color box that shows the color.
loserskater said:
I accidentally uploaded the colorpickerdialog that doesn't have the comments, I'll fix the upload soon
Sent from my SAMSUNG-SGH-I747
EDIT: Fixed. Download the new zip and look at ColorPickerDialog.smali
Also, yes the box is bigger. It's not a checkbox but a color box that shows the color.
Click to expand...
Click to collapse
Thank you. You are a good man @loserskater. Thanks for supporting my habit ha
61M26173M3471522L
EDIT: works perfectly. Thank you !
Great Guide!
Did it for Galaxy Grand Duos Credits are given
Code:
http://forum.xda-developers.com/showthread.php?t=2320158
this solves the small line issue (if it lies below the brightness slider)
in values/dimens.xml
Code:
<dimen name="notification_panel_notification_top_margin">[COLOR="Red"]184.0dip[/COLOR]</dimen>
set it to 180.dip or so .
Thanks Loser :good:
You can just edit the actual xml and change it's height or visibility as I posted. Much simpler.
Kryten2k35 said:
You can just edit the actual xml and change it's height or visibility as I posted. Much simpler.
Click to expand...
Click to collapse
i just like everything on its place ^_^
first of all thanks for the mod.
ive decompiled and recompiled secsettings which is showing the options..
Before this mod my dropdown was transparent,
so...
I edited my systemUI.apk and recompiled it. my dropdown is now full BLACK (0% trans) which means i think ive recompiled systemUI.apk good??
but i cant select a color??
EDIT:
Navigated to /smali/com/android/systemui/statusbar/phone/PhoneStatusBar.smali
@.method protected updateExpandedViewPos(I)V
the command at OP:
Code:
iget-object v9, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
[COLOR="Red"]const/4 v6, 0x0
invoke-virtual {v9, v6}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->setBackground(Landroid/graphics/drawable/Drawable;)V
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
invoke-virtual {v3}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v6, "notification_panel_color"
const v9, -0xffffff
invoke-static {v3, v6, v9}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
move-object/from16 v0, p0
iget-object v9, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationPanel:Landroid/view/View;[/COLOR]
invoke-virtual {v9, v3}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->setBackgroundColor(I)V
My Code (N7100):
Code:
.local v3, color:I
move-object/from16 v0, p0
iget-object v9, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
[COLOR="red"]const/4 v6, 0x0
invoke-virtual {v9, v6}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->setBackground(Landroid/graphics/drawable/Drawable;)V
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
invoke-virtual {v3}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v6, "notification_panel_color"
const v9, -0xffffff
invoke-static {v3, v6, v9}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
move-object/from16 v0, p0
iget-object v9, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationPanel:Landroid/view/View;[/COLOR]
invoke-virtual {v9, v3}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->setBackgroundColor(I)V
.line 3479
.end local v3 #color:I
.end local v6 #k:F
:cond_5
const/4 v9, 0x0
move-object/from16 v0, p0
ON phone, when i hit the selected color it doesnt change, it stays on black :/???
AskinSavascisi said:
first of all thanks for the mod.
ive decompiled and recompiled secsettings which is showing the options..
Before this mod my dropdown was transparent,
so...
I edited my systemUI.apk and recompiled it. my dropdown is now full BLACK (0% trans) which means i think ive recompiled systemUI.apk good??
but i cant select a color??
EDIT:
Navigated to /smali/com/android/systemui/statusbar/phone/PhoneStatusBar.smali
@.method protected updateExpandedViewPos(I)V
the command at OP:
Code:
iget-object v9, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
[COLOR="Red"]const/4 v6, 0x0
invoke-virtual {v9, v6}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->setBackground(Landroid/graphics/drawable/Drawable;)V
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
invoke-virtual {v3}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v6, "notification_panel_color"
const v9, -0xffffff
invoke-static {v3, v6, v9}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
move-object/from16 v0, p0
iget-object v9, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationPanel:Landroid/view/View;[/COLOR]
invoke-virtual {v9, v3}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->setBackgroundColor(I)V
My Code (N7100):
Code:
.local v3, color:I
move-object/from16 v0, p0
iget-object v9, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
[COLOR="red"]const/4 v6, 0x0
invoke-virtual {v9, v6}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->setBackground(Landroid/graphics/drawable/Drawable;)V
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
invoke-virtual {v3}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v6, "notification_panel_color"
const v9, -0xffffff
invoke-static {v3, v6, v9}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
move-object/from16 v0, p0
iget-object v9, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationPanel:Landroid/view/View;[/COLOR]
invoke-virtual {v9, v3}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->setBackgroundColor(I)V
.line 3479
.end local v3 #color:I
.end local v6 #k:F
:cond_5
const/4 v9, 0x0
move-object/from16 v0, p0
ON phone, when i hit the selected color it doesnt change, it stays on black :/???
Click to expand...
Click to collapse
BUMP???
I'm trying to implement this mod but not in Display Settings, in my ROM settings.smali. But I've an error in OnpreferenceChange. Here's the log:
Code:
W/dalvikvm(4676): VFY: register1 v0 type 0, wanted ref
W/dalvikvm(4676): VFY: bad arg 1 (into Ljava/lang/Object;)
W/dalvikvm(4676): VFY: rejecting call to Ljava/lang/String;.equals (Ljava/lang/Object;)Z
W/dalvikvm(4676): VFY: rejecting opcode 0x6e at 0x0036
W/dalvikvm(4676): VFY: rejected Lcom/android/settings/phdsettings;.onPreferenceChange (Landroid/preference/Preference;Ljava/lang/Object;)Z
W/dalvikvm(4676): Verifier rejected class Lcom/android/settings/phdsettings;
W/dalvikvm(4676): Class init failed in newInstance call (Lcom/android/settings/phdsettings;)
D/AndroidRuntime(4676): Shutting down VM
W/dalvikvm(4676): threadid=1: thread exiting with uncaught exception (group=0x41a232a0)
What I'm doing wrong? Thanks in advance!
Anyone figure out how to get rid of the black background for notifications on MG2?
This is driving me nuts.
upndwn4par said:
Anyone figure out how to get rid of the black background for notifications on MG2?
This is driving me nuts.
Click to expand...
Click to collapse
Do you mean the background on notifcations themselves, not the actual panel? That is all in framework-res.apk I was scanning systemui.apk for hours to find out how to change those until I remembered framework-res controlled certain backgrounds in the system such as the background in secsettings.apk. If I remember correctly the files are in res/layout of framework-res.apk and they are called notification_template_xx.xml,
hope this helps bro
Danvdh said:
Do you mean the background on notifcations themselves, not the actual panel? That is all in framework-res.apk I was scanning systemui.apk for hours to find out how to change those until I remembered framework-res controlled certain backgrounds in the system such as the background in secsettings.apk. If I remember correctly the files are in res/layout of framework-res.apk and they are called notification_template_xx.xml,
hope this helps bro
Click to expand...
Click to collapse
Yes, the background of the notifications themselves. To make the notification drawer completely transparent a combination of PNGs and xmls must be changed (not the ones you mentioned). I have done this more than once. So either something has changed in the latest firmware, or I'm losing it. :cyclops:

[GUIDE] How to create two big button in notification panel like S5

In this guide, I will explain how to create a button in notification panel and giving it a function
See attachments to see the result of the guide, and any files that are needed for this change.
Requires:
- knowledge on how to compile / decompile with apktool;
- SystemUI.apk;
- Notepad++;
- brain and patience.
First decompile SystemUI, go to res/layout, open tw_status_bar_expanded.xml and add the red line:
Code:
<HorizontalScrollView android:id="@id/quicksetting_scroller" android:scrollbars="none" android:layout_width="wrap_content" android:layout_height="wrap_content">
<com.android.systemui.statusbar.policy.quicksetting.QuickSettingPanel android:orientation="horizontal" android:id="@id/quicksetting_container" android:layout_width="wrap_content" android:layout_height="wrap_content" android:divider="@drawable/tw_black_bg" android:showDividers="middle" />
</HorizontalScrollView>
[COLOR="Red"]<LinearLayout android:orientation="vertical" android:id="@id/sfinder_qconnect_layout" android:visibility="visible" android:layout_width="fill_parent" android:layout_height="wrap_content">
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:paddingLeft="@dimen/finder_connect_button_padding_right" android:paddingTop="@dimen/finder_connect_button_padding_top" android:paddingRight="@dimen/finder_connect_button_padding_left" android:paddingBottom="@dimen/finder_connect_button_padding_bottom" android:layout_width="fill_parent" android:layout_height="wrap_content">
<Button android:textSize="@dimen/tw_quick_panel_sfinder_qconnect_button_text_size" android:textColor="@drawable/tw_quick_panel_sfinder_qconnect_button_text_color" android:id="@id/sfinder_button_big" android:background="@drawable/tw_quick_panel_sfinder_qconnect_button" android:layout_width="0.0dip" android:layout_height="@dimen/finder_connect_button_height" android:layout_marginRight="10.0dip" android:text="@string/big_button_barra" android:layout_weight="0.5" />
<Button android:textSize="@dimen/tw_quick_panel_sfinder_qconnect_button_text_size" android:textColor="@drawable/tw_quick_panel_sfinder_qconnect_button_text_color" android:id="@id/qconnect_button_big" android:background="@drawable/tw_quick_panel_sfinder_qconnect_button" android:layout_width="0.0dip" android:layout_height="@dimen/finder_connect_button_height" android:layout_marginLeft="10.0dip" android:text="@string/big_button_panel" android:layout_weight="0.5" />
</LinearLayout>
<View android:id="@id/sfinder_qconnect_divider" android:background="@drawable/notification_bottom_line" android:layout_width="fill_parent" android:layout_height="1.0dip" />
</LinearLayout>[/COLOR]
<LinearLayout android:orientation="vertical" android:id="@id/brightness_controller" android:background="#ff000000" android:layout_width="fill_parent" android:layout_height="56.0dip">
<LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="55.0dip">
<ImageView android:id="@id/brightness_icon" android:clickable="true" android:layout_width="25.0dip" android:layout_height="fill_parent" android:layout_marginLeft="13.0dip" android:src="@drawable/ic_sysbar_brightness" android:contentDescription="@string/accessibility_brightness_icon" />
<FrameLayout android:id="@id/brightness_group" android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.policy.ToggleSlider android:id="@id/brightness" android:layout_width="fill_parent" android:layout_height="fill_parent" systemui:text="@string/status_bar_settings_auto_brightness_label" />
<com.android.systemui.statusbar.policy.ToggleSlider android:id="@id/auto_brightness" android:layout_width="fill_parent" android:layout_height="fill_parent" systemui:text="@string/status_bar_settings_auto_brightness_label" />
</FrameLayout>
</LinearLayout>
<View android:background="#ff091a24" android:layout_width="fill_parent" android:layout_height="1.0dip" />
</LinearLayout>
Now go to values folder and add this line in this files.
In ids.xml:
Code:
<item type="id" name="sfinder_qconnect_layout">false</item>
<item type="id" name="sfinder_button_big">false</item>
<item type="id" name="qconnect_button_big">false</item>
<item type="id" name="sfinder_qconnect_divider">false</item>
In dimens.xml
Code:
<dimen name="finder_connect_button_padding_top">11.0dip</dimen>
<dimen name="finder_connect_button_padding_bottom">10.0dip</dimen>
<dimen name="finder_connect_button_padding_right">20.0dip</dimen>
<dimen name="finder_connect_button_padding_left">20.0dip</dimen>
<dimen name="finder_connect_button_height">37.0dip</dimen>
<dimen name="tw_quick_panel_sfinder_qconnect_button_text_size">16.0dip</dimen>
In strings.xml
Code:
<string name="big_button_barra">Display</string>
<string name="big_button_panel">Sound</string>
Add the res files in drawable and drawable-hdpi.
Recompile SystemUI and decompile for insert the value of ids in public.xml
Now there is the smali part. Go to smali/com/android/systemui/statusbar/phone and open PhoneStatusbar.smali
Add this field in instance fields:
Code:
.field private mBigButtonListener:Landroid/view/View$OnClickListener;
.field private mBigButtonListener2:Landroid/view/View$OnClickListener;
Add the red line at the end of the .method public constructor <init>()V
Code:
[COLOR="Red"]new-instance v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$X1;
invoke-direct {v0, p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$X1;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)V
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBigButtonListener:Landroid/view/View$OnClickListener;
new-instance v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$X2;
invoke-direct {v0, p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$X2;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)V
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBigButtonListener2:Landroid/view/View$OnClickListener;
[/COLOR]
return-void
.end method
Add the red line in .method protected makeStatusBarView()Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
Code:
iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
const v10, 0x7f0d0051
invoke-virtual {v9, v10}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;
move-result-object v9
iput-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mSettingsButton:Landroid/view/View;
iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mSettingsButton:Landroid/view/View;
iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mSettingsButtonListener:Landroid/view/View$OnClickListener;
invoke-virtual {v9, v10}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V
[COLOR="Red"]iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
const v10, 0x7f0d01ea
invoke-virtual {v9, v10}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;
move-result-object v9
check-cast v9, Landroid/widget/Button;
iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBigButtonListener:Landroid/view/View$OnClickListener;
invoke-virtual {v9, v10}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V
iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
const v10, 0x7f0d01eb
invoke-virtual {v9, v10}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;
move-result-object v9
check-cast v9, Landroid/widget/Button;
iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBigButtonListener2:Landroid/view/View$OnClickListener;
invoke-virtual {v9, v10}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V[/COLOR]
0x7f0d01ea is the public id of "sfinder_button_big"
0x7f0d01eb is the public id of "qconnect_button_big"
Now add the file of smali folder.
If you want to change the intent of the button, you must open the two smali files(PhoneStatusbar$X1 and PhoneStatusbar$X2) and change the parts highlighted in red, adding the names of the resulting applications and tasks that you want to open.
Code:
new-instance v2, Landroid/content/Intent;
invoke-direct {v2}, Landroid/content/Intent;-><init>()V
const-string v3, "android.intent.action.MAIN"
invoke-virtual {v2, v3}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;
const/high16 v4, 0x1000
invoke-virtual {v2, v4}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;
const-string v5, "[COLOR="red"]com.android.settings[/COLOR]"
const-string v6, "[COLOR="red"]com.android.settings.Settings$DisplaySettingsActivity[/COLOR]"
invoke-virtual {v2, v5, v6}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
move-result-object v2
invoke-virtual {v1, v2}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$X1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBar;
invoke-virtual {v1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->animateCollapse()V
After insert the smali file, recompile SystemUI, then add the meta-inf folder and the AndroidManifest.xml from the original SystemUI or sign the file, then recompile again.
That's it all, if you have trouble commented on this thread and give you a hand to solve
@rrgrrg
Sent from my GT-I9100 using XDA Premium 4 mobile app
request bro...for custom rom cm10.1
D2Y aka E said:
request bro...for custom rom cm10.1
Click to expand...
Click to collapse
I do not use the cm so I have to give the framework and the systemui
Can you mod this for s3 mini???
Sent from my GT-I8190N using XDA Premium 4 mobile app
error in compile apk.....(an error occured plz check the log (option 21)
??!!
Nice thanks
Add the red line in .method protected makeStatusBarView()Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
i not found this line and my system ui force stoped
fargh123 said:
Add the red line in .method protected makeStatusBarView()Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
i not found this line and my system ui force stoped
Click to expand...
Click to collapse
Search the below text alone
Code:
makeStatusBarView
You can find the method.
@ gerrys2 thanks for the guide.
But I would like to suggest one thing regarding adding ids.
You can mention in your thread that after adding smali , recompile SystemUI.apk
Then again decompile the modded SystemUI.apk so that the ids for those two button they can see in public.xml
For adding them in smali
@gerryS2 good job gerry:good:
Thanks for sharing
Thanks for sharing
Caproid said:
@rrgrrg
Sent from my GT-I9100 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
i prefer this guide
as its advantages are u set the function by yourself and u can remove them when u want :angel:
"After insert the smali file, recompile SystemUI, then add the meta-inf folder and the AndroidManifest.xml from the original SystemUI or sign the file, then recompile again" i didnt understand this step
bhavstech said:
"After insert the smali file, recompile SystemUI, then add the meta-inf folder and the AndroidManifest.xml from the original SystemUI or sign the file, then recompile again" i didnt understand this step
Click to expand...
Click to collapse
After insert the smali, Recompile systemUI and sign it
Thanks
gerryS2 said:
After insert the smali, Recompile systemUI and sign it
Click to expand...
Click to collapse
it didnt work i did that
after I insert smali and sign the apk my system ui give fc
Sent from my GT-I9100 using Tapatalk
fargh123 said:
after I insert smali and sign the apk my system ui give fc
Sent from my GT-I9100 using Tapatalk
Click to expand...
Click to collapse
Me too why?

[guide][tut][Updated 17/12/2015] Clock and Date mods for 5.x + (align,font and more)

Hello guys
Today i would like to present one tut regarding the clock and date mods
For MM click here
Mod contains:-
show/hide clock
Font styles
Bold
Condensed
Light
Light Italic
Normal
Use second clock
Shows seconds in clock
Clock color
Clock alignment
Right clock
Center clock
Left clock
am/pm style
No am/pm
small
normal
Date
Show/hide
small
normal
date style
Normal
Uppercase
Lowercase
Date format
All different and with customization
Fixed Am/PM glitches
Added font changer to max 24 DPI
Added new font styles
Light italic
Thin
This Italic
Condensed
Condensed Italic
Condensed Bold
Condensed Bold Italic
Medium
Medium Italic
Normal
Italic
Bold
Light
Bold Italic
Added Date Format
Left to Time
Right to Time
Requirements:-
Apktool
Deodexed systemui.apk and settings.apk
thinking and patience users/moders
First we start with SystemUI.apk Click here
Then we start with settings.apk Click here
Don't Forget to add credits if you used my work
Thanks to
the_vanya1 for basics
SystemUI.apk
1. First Decompile Your Systemui.apk
2. Download this Attachment View attachment SystemUI.zip
3. Extract from zip and replace the smali codes
4. Now look into SystemUI.apk\smali\com\android\systemui\statusbar\phone\PhoneStatusBar.smali
Find this method .method public showClock(Z)V
and Replace the complete method as below ( copy and replace the method )
Code:
.method public showClock(Z)V
.locals 10
.prologue
const/4 v9, -0x2
const/4 v1, 0x1
const/4 v2, 0x0
const/16 v4, 0x8
.line 3874
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
if-nez v0, :cond_1
.line 3894
:cond_0
:goto_0
return-void
.line 3875
:cond_1
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
.line 3876
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
const v5, 0x7f10008e #<public type="id" name="clock"
invoke-virtual {v0, v5}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
move-result-object v5
.line 3877
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
const v6, 0x7f1001c7 #<public type="id" name="center_clock"
invoke-virtual {v0, v6}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
move-result-object v6
.line 3878
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
const v7, 0x7f1001c8 #<public type="id" name="left_clock"
invoke-virtual {v0, v7}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
move-result-object v7
.line 3879
const-string v0, "status_bar_clock"
invoke-static {v3, v0, v1, v9}, Landroid/provider/Settings$System;->getIntForUser(Landroid/content/ContentResolver;Ljava/lang/String;II)I
move-result v0
if-ne v0, v1, :cond_5
move v0, v1
.line 3882
:goto_1
const-string v8, "statusbar_clock_style"
invoke-static {v3, v8, v2, v9}, Landroid/provider/Settings$System;->getIntForUser(Landroid/content/ContentResolver;Ljava/lang/String;II)I
move-result v8
.line 3885
if-nez v8, :cond_2
if-eqz v5, :cond_2
.line 3886
if-eqz p1, :cond_7
if-eqz v0, :cond_6
move v3, v2
:goto_2
invoke-virtual {v5, v3}, Landroid/view/View;->setVisibility(I)V
.line 3888
:cond_2
if-ne v8, v1, :cond_3
if-eqz v6, :cond_3
.line 3889
if-eqz p1, :cond_9
if-eqz v0, :cond_8
move v1, v2
:goto_3
invoke-virtual {v6, v1}, Landroid/view/View;->setVisibility(I)V
.line 3891
:cond_3
const/4 v1, 0x2
if-ne v8, v1, :cond_0
if-eqz v7, :cond_0
.line 3892
if-eqz p1, :cond_4
if-eqz v0, :cond_4
move v4, v2
:cond_4
invoke-virtual {v7, v4}, Landroid/view/View;->setVisibility(I)V
goto :goto_0
:cond_5
move v0, v2
.line 3879
goto :goto_1
:cond_6
move v3, v4
.line 3886
goto :goto_2
:cond_7
move v3, v4
goto :goto_2
:cond_8
move v1, v4
.line 3889
goto :goto_3
:cond_9
move v1, v4
goto :goto_3
.end method
5. Now find below code at systemui.apk/re/layout/status_bar.xml
Code:
<com.android.systemui.statusbar.StatusBarIconView android:id="@id/moreIcon" android:visibility="gone" android:layout_width="@dimen/status_bar_icon_size" android:layout_height="fill_parent" android:src="@drawable/stat_notify_more" />
Above that add this code
Code:
<com.android.keyguard.AlphaOptimizedLinearLayout android:gravity="center" android:orientation="horizontal" android:id="@+id/left_clock_layout" android:layout_width="wrap_content" android:layout_height="fill_parent">
<com.android.systemui.statusbar.policy.ClockLeft android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="center" android:id="@+id/left_clock" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:paddingEnd="4.0dip" />
</com.android.keyguard.AlphaOptimizedLinearLayout>
and look for this code
Code:
<ViewStub android:id="@id/ticker_stub" android:layout="@layout/status_bar_ticker" android:inflatedId="@id/ticker" android:layout_width="fill_parent" android:layout_height="fill_parent" />
Above this add this code
Code:
<com.android.keyguard.AlphaOptimizedLinearLayout android:gravity="center" android:orientation="horizontal" android:id="@+id/center_clock_layout" android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.policy.ClockCenter android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="center" android:id="@+id/center_clock" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
</com.android.keyguard.AlphaOptimizedLinearLayout>
6.Open systemui.apk/re/values/ids.xml ( and these codes )
Code:
<item type="id" name="left_clock_layout">false</item>
<item type="id" name="left_clock">false</item>
<item type="id" name="center_clock_layout">false</item>
<item type="id" name="center_clock">false</item>
7. Now compile the SystemUI.apk and decompile it again ( to merge the public ID's )
Now look into Clock.smali ( the mergerd code )
find this id 0x7f090019 and replace as per your public id
<public type="color" name="status_bar_clock_color" id="0x7f090019" />
and in PhoneStatusBar.smali
0x7f10008e #<public type="id" name="clock"
0x7f1001c7 #<public type="id" name="center_clock"
0x7f1001c8 #<public type="id" name="left_clock"
8. Now recompile/sign the Apk and replace the app and reboot
Now you need to work for Settings Click here
Settigns and result
After finishing the SystemUI.apk mod
move to here with settings
1. First Decompile the Settings.apk
2. Download this attachment View attachment Settings.zip
3. now place/merge the files in your settings
4. add this code any of your settings like in display.xml
( i had added in my own xml of my rom xml )
Code:
<PreferenceScreen android:title="@string/status_bar_clock_title" android:key="clock_style_pref" android:summary="@string/status_bar_clock_summary" android:fragment="com.android.settings.rz.clock.StatusBarClockStyle" />
5. open settings.apk\res\values​​\ arrays.xml and add below strings
Code:
<string-array name="clock_style_entries">
<item>@string/right_clock</item>
<item>@string/center_clock</item>
<item>@string/left_clock</item>
</string-array>
<string-array name="clock_style_values">
<item>0</item>
<item>1</item>
<item>2</item>
</string-array>
<string-array name="entries_status_bar_am_pm">
<item>@string/am_pm_clock_none</item>
<item>@string/am_pm_clock_small</item>
<item>@string/am_pm_clock_normal</item>
</string-array>
<string-array name="values_status_bar_am_pm">
<item>0</item>
<item>1</item>
<item>2</item>
</string-array>
<string-array name="clock_date_style_entries">
<item>@string/clock_date_style_normal</item>
<item>@string/clock_date_style_lowercase</item>
<item>@string/clock_date_style_uppercase</item>
</string-array>
<string-array name="clock_date_style_values">
<item>0</item>
<item>1</item>
<item>2</item>
</string-array>
<string-array name="clock_date_format_entries_values">
<item>dd/MM/yy</item>
<item>MM/dd/yy</item>
<item>yyyy-MM-dd</item>
<item>yyyy-dd-MM</item>
<item>dd-MM-yyyy</item>
<item>MM-dd-yyyy</item>
<item>MMM dd</item>
<item>MMM dd, yyyy</item>
<item>MMMM dd, yyyy</item>
<item>EEE</item>
<item>EEE dd</item>
<item>EEE dd/MM</item>
<item>EEE MM/dd</item>
<item>EEE dd MMM</item>
<item>EEE MMM dd</item>
<item>EEE MMMM dd</item>
<item>EEEE dd/MM</item>
<item>EEEE MM/dd</item>
<item>@string/clock_date_format_custom</item>
</string-array>
<string-array name="clock_date_display_entries">
<item>@string/clock_date_display_none</item>
<item>@string/clock_date_display_small</item>
<item>@string/clock_date_display_normal</item>
</string-array>
<string-array name="clock_date_display_values">
<item>0</item>
<item>1</item>
<item>2</item>
</string-array>
<string-array name="clock_font_style_entries">
<item>@string/clock_font_normal</item>
<item>@string/clock_font_italic</item>
<item>@string/clock_font_bold</item>
<item>@string/clock_font_bold_italic</item>
<item>@string/clock_font_light</item>
<item>@string/clock_font_light_italic</item>
<item>@string/clock_font_thin</item>
<item>@string/clock_font_thin_italic</item>
<item>@string/clock_font_condensed</item>
<item>@string/clock_font_condensed_italic</item>
<item>@string/clock_font_condensed_bold</item>
<item>@string/clock_font_condensed_bold_italic</item>
<item>@string/clock_font_medium</item>
<item>@string/clock_font_medium_italic</item>
</string-array>
<string-array name="clock_font_style_values">
<item>0</item>
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>5</item>
<item>6</item>
<item>7</item>
<item>8</item>
<item>9</item>
<item>10</item>
<item>11</item>
<item>12</item>
<item>13</item>
</string-array>
6. open settings.apk\res\values​​\ strings.xml and add below strings ( if you get repeated strings delete them )
Code:
<string name="right_clock">Right clock</string>
<string name="center_clock">Center clock</string>
<string name="dont_show">"Don't show"</string>
<string name="clock_title_enable">Clock alignment</string>
<string name="clock_enabled">Enabled</string>
<string name="clock_disabled">Disabled</string>
<string name="clock_color_title">Clock color</string>
<string name="clock_date_display">Date</string>
<string name="clock_date_display_summary">Display custom date before the clock</string>
<string name="clock_date_style">Date style</string>
<string name="clock_date_format">Date format</string>
<string name="clock_date_string_edittext_title">Must be in DateFormat eg. MM/dd/yy</string>
<string name="clock_date_string_edittext_summary">Enter string</string>
<string name="status_bar_clock_style_reset">Reset color</string>
<string name="status_bar_style_clock">Clock Style</string>
<string name="status_bar_clock_title">Clock and date style</string>
<string name="status_bar_clock_summary">Choose clock and date style</string>
<string name="status_bar_show_clock_title">Show clock</string>
<string name="status_bar_am_pm_title">AM/PM style</string>
<string name="am_pm_clock_none">NO AM/PM</string>
<string name="am_pm_clock_small">Small</string>
<string name="am_pm_clock_normal">Normal</string>
<string name="status_bar_am_pm_info">24-hour clock is enabled</string>
<string name="left_clock">Left clock</string>
<string name="clock_use_second">Use second clock</string>
<string name="clock_use_second_summary">Show second in clock</string>
<string name="clock_font_style_title">Clock font style</string>
<string name="clock_font_bold">Bold</string>
<string name="clock_font_condensed">Condensed</string>
<string name="clock_font_light">Light</string>
<string name="clock_font_light_italic">Light Italic</string>
<string name="clock_font_normal">Normal</string>
<string name="default_string">Default</string>
<string name="reset">Reset</string>
<string name="clock_date_style_normal">Normal</string>
<string name="clock_date_style_lowercase">Lowercase</string>
<string name="clock_date_style_uppercase">Uppercase</string>
<string name="clock_date_format_custom">Customization</string>
<string name="clock_date_display_none">No Date and clock</string>
<string name="clock_date_display_small">Small</string>
<string name="clock_date_display_normal">Normal</string>
<string name="status_bar_clock_style_reset_message">Reset clock color?</string>
<string name="clock_font_size_title">Font size</string>
<string name="clock_font_italic">Italic</string>
<string name="clock_font_bold_italic">Bold Italic</string>
<string name="clock_font_thin">Thin</string>
<string name="clock_font_thin_italic">Thin Italic</string>
<string name="clock_font_condensed_italic">Condensed Italic</string>
<string name="clock_font_condensed_bold">Condensed Bold</string>
<string name="clock_font_condensed_bold_italic">Condensed Bold Italic</string>
<string name="clock_font_medium">Medium</string>
<string name="clock_font_medium_italic">Medium Italic</string>
<string name="clock_date_right">Right of time</string>
<string name="clock_date_left">Left of time</string>
7. now compile the settings and decompile to replace your Public ID's
8. Replace the Id's (compare my public.xml in the archive)
9. After that recompile/sign the app and replace the app and reboot
You need Have SeekBar Preferences Click here ( if you already had this then dont add this )
You need Have Color Picker preferences Click here ( if you already had this then dont add this )
Result Click here
If you guys facing any problem just start Comparing with my files by download of this View attachment 3601301
Result on what options you will get
This what options you will get
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
soon i will add more fonts ( edit:- as i promised i had added )
for now this fonts are good enough
Awesome tutorial mate, soon as I get home will investigate the code????
Sent from my D6653 using Tapatalk
Awesome tut bro ^^
“Sent From MWE V7.0.0 On My Z3”
Error when compiling. see the log
That's what a Real DEV need to do. :good:
where i can find my public id
Marília de Oliveira said:
Error when compiling. see the log
Click to expand...
Click to collapse
just retry the again by adding the
point 5. Now find below code at systemui.apk/re/layout/status_bar.xml (in systemui )
Overlaping icon when I set clock to center
boncaunhaquynhanh said:
Overlaping icon when I set clock to center
Click to expand...
Click to collapse
More info + screenshot is relevant to know !
Pandemic said:
More info + screenshot is relevant to know !
Click to expand...
Click to collapse
like this bro. look at the clock
boncaunhaquynhanh said:
like this bro. look at the clock
Click to expand...
Click to collapse
Disable the icons in statusbar etc like GPS (location) etc then it should be fine
You have alot icons in statusbar in that case just wow !
venkat kamesh said:
just retry the again by adding the
point 5. Now find below code at systemui.apk/re/layout/status_bar.xml (in systemui )
Click to expand...
Click to collapse
It is still the error
Marília de Oliveira said:
It is still the error
Click to expand...
Click to collapse
adding id's is not a big task
i had wrote as easy as possible
try adding id for missed one dear ( if i reach home i will add )
venkat kamesh said:
adding id's is not a big task
i had wrote as easy as possible
try adding id for missed one dear ( if i reach home i will add )
Click to expand...
Click to collapse
Ok I will wait.
Marília de Oliveira said:
Ok I will wait.
Click to expand...
Click to collapse
done
venkat kamesh said:
done
Click to expand...
Click to collapse
Nice. Systemui recompiled, thank you. but I have one doubt in part of the settings. I wonder if and for me to create an XML called display.xml?
Marília de Oliveira said:
Nice. Systemui recompiled, thank you. but I have one doubt in part of the settings. I wonder if and for me to create an XML called display.xml?
Click to expand...
Click to collapse
No. You can add the line into display_settings.xml. So you will get the clock option control in Settings/display

[Guide][tut] [LP/MM] Cyanogenmod Battery Styles (stock/circle dotted/percentage/cm)

Hello guys
today i would like to post a small tut battery styles
as per users request
first i would like to thank
aliv Rom, Basar and Vanya Melnechenko from MAAADR group
from their source i had ported for LP/MM with small changes
This is specially for sony ( if for any other roms Please compare system_icon.xml )
Features:
Hide/Show Stock battery
Battery Styles
Icon
Percentage
Icon with Percentage
Icon with percentage (JB style)
Circle
Circle with percentage
Dotted Circle
Dotted circle with percentage
No battery
Battery color
Circle animation speed
Percent text color
precent text charging color
apply mods
For this all you required :-
Deodexed SystemUI.apk and patience
look for post #2
Systemui ( First part )
1. Decompile SystemUI.apk
2. Download this Attchment View attachment SystemUI.zip and merge
open systemui.apk/res/arrays.xml
before </resources> add this
Code:
<integer-array name="batterymeter_color_levels_1">
<item>4</item>
<item>15</item>
<item>100</item>
</integer-array>
<array name="batterymeter_color_values_1">
<item>#ffff3300</item>
<item>#ffff3300</item>
<item>#ffffffff</item>
</array>
<integer-array name="batterymeter_inverted_bolt_points">
<item>743</item>
<item>73</item>
<item>743</item>
<item>292</item>
<item>442</item>
<item>201</item>
<item>442</item>
<item>400</item>
<item>0</item>
<item>20</item>
<item>369</item>
<item>157</item>
<item>369</item>
<item>0</item>
</integer-array>
open systemui.apk/res/attrs.xml
before </resources> add this
Code:
<attr name="batteryView" format="string" />
open systemui.apk/res/colors.xml
before </resources> add this
Code:
<color name="batterymeter_critical">#ffff3300</color>
<color name="batterymeter_low">#ffff3300</color>
<color name="batterymeter_full">#ffffffff</color>
<color name="battery_text_color">#ffffffff</color>
<color name="statusbar_clock_color">#ffffffff</color>
open systemui.apk/res/styles.xmlbefore </resources> add this
Code:
<style name="TextAppearance.StatusBar.Battery" parent="@android:style/TextAppearance.StatusBar.Icon">
<item name="android:textSize">13.0dip</item>
<item name="android:textStyle">normal</item>
<item name="android:textColor">@color/status_bar_clock_color</item>
</style>
now compile and decompile for public ids
Now open com/android/systemui/statusbar/phone/phonestatusbar.smali
find this
Code:
Lcom/android/systemui/statusbar/phone/PhoneStatusBar$H;
before that add this line
Code:
Lcom/android/systemui/statusbar/phone/PhoneStatusBar$BatterySettingsObserver;,
now look for this
Code:
.field private mBackdropInterpolator:Landroid/view/animation/Interpolator;
below that add these lines
Code:
.field private mBattery:Lcom/android/systemui/BatteryMeterViewMod;
.field private mCircleBattery:Lcom/android/systemui/BatteryCircleMeterView;
find this access code
Code:
.method static synthetic access$7800(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)Landroid/widget/ImageView;
access$7800 may differ so dont worry
above that add this
Code:
.method static synthetic access$77000(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)V
.locals 0
.param p0, "x0" # Lcom/android/systemui/statusbar/phone/PhoneStatusBar;
.prologue
.line 155
invoke-direct {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->updateBatteryIcons()V
return-void
.end method
now look for this method
Code:
.method private updateClearAll()V
above that add this method
Code:
.method private updateBatteryIcons()V
.locals 2
.prologue
const/4 v1, 0x0
.line 723
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBattery:Lcom/android/systemui/BatteryMeterViewMod;
if-eqz v0, :cond_0
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mCircleBattery:Lcom/android/systemui/BatteryCircleMeterView;
if-eqz v0, :cond_0
.line 724
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBattery:Lcom/android/systemui/BatteryMeterViewMod;
invoke-virtual {v0, v1}, Lcom/android/systemui/BatteryMeterViewMod;->updateSettings(Z)V
.line 725
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mCircleBattery:Lcom/android/systemui/BatteryCircleMeterView;
invoke-virtual {v0, v1}, Lcom/android/systemui/BatteryCircleMeterView;->updateSettings(Z)V
.line 727
:cond_0
return-void
.end method
now look for this method
Code:
.method protected makeStatusBarView()Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
in that method
look for this line
Code:
invoke-virtual {v0, v3, v1}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
below that line add this code
Code:
move-object/from16 v0, p0
iget-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
const v2, 0x7f10021d
invoke-virtual {v1, v2}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
move-result-object v1
check-cast v1, Lcom/android/systemui/BatteryMeterViewMod;
move-object/from16 v0, p0
iput-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBattery:Lcom/android/systemui/BatteryMeterViewMod;
iget-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
const v2, 0x7f10021c
invoke-virtual {v1, v2}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
move-result-object v1
check-cast v1, Lcom/android/systemui/BatteryCircleMeterView;
move-object/from16 v0, p0
iput-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mCircleBattery:Lcom/android/systemui/BatteryCircleMeterView;
invoke-direct/range {p0 .. p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->updateBatteryIcons()V
change the ids compare with mine and replace with yours
now look for this method
Code:
.method public start()V
in that find this line
Code:
new-instance v2, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;
above that line add this
Code:
new-instance v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$BatterySettingsObserver;
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mHandler:Lcom/android/systemui/statusbar/BaseStatusBar$H;
invoke-direct {v0, p0, v1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$BatterySettingsObserver;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;Landroid/os/Handler;)V
invoke-virtual {v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$BatterySettingsObserver;->observe()V
save it and close
3. Now open com/android/systemui/R$styleable.smali
look for this
Code:
.field public static final AnalogClock:[I
below that add this
Code:
.field public static final BatteryIcon:[I
now look for this
Code:
sput-object v0, Lcom/android/systemui/R$styleable;->AnalogClock:[I
below add this
Code:
new-array v0, v3, [I
const v1, 0x7f01003c
aput v1, v0, v2
sput-object v0, Lcom/android/systemui/R$styleable;->BatteryIcon:[I
compare id from mine and replace
save it and close
compare my public ids and replace with your ids
from these files
com/android/systemui/BatteryCircleMeterView
com/android/systemui/BatteryMeterView
com/android/systemui/BatteryMeterView$BatteryTracker
and you are finally done
save it all and compile and replace
settings.apk final part editing
1. Download this app View attachment app-release.apk
2. Install the app
3. Have fun with this mod
no time to make settings
but one fine day i will add tut to add in settings app
Have fun
Dont forget to mention me if you used my work
Mod edit:
OP quote removed
wait for add to settings sir :fingers-crossed:
Work for systemui xperia X mod?
InitialL_Dee said:
wait for add to settings sir :fingers-crossed:
Click to expand...
Click to collapse
yhu dnt need to quote tha whole post just to post please.... edit please!
InitialL_Dee said:
wait for add to settings sir :fingers-crossed:
Click to expand...
Click to collapse
Hmm sure I will add but when I am free haha
Delete the quote bro
Make thread clean
vandiaz_sairavinz said:
Work for systemui xperia X mod?
Click to expand...
Click to collapse
Yes will work bro tested
@venkat kamesh thanks for the guide. I am going to have a busy weekend. ?
Sent from my SM-G935F using Tapatalk
Nice guide sir..
And By the way, did you ever try to port battery style from bliss pop 5.1..?
Screenshot please. thanks
venkat kamesh said:
vandiaz_sairavinz said:
Work for systemui xperia X mod?
Click to expand...
Click to collapse
Yes will work bro tested
Click to expand...
Click to collapse
I'm using Xperia X SystemUI, but my .smali doesn't have these lines:
Code:
invoke-virtual {v0, v3, v1}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
Code:
new-instance v2, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;
Is there something else I should be looking for?
@venkat kamesh
Hi bro
I can't find this line
Code:
invoke-virtual {v0, v3, v1}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
I am using Xperia X SystemUI. U told its working with X SystemUI too.
@Bloodlvst bro same here.
Awsm mod bro ?
Any guide(mod or theming) of xperia x systemui for cm12.1 ☺
Thx bro
Bloodlvst said:
I'm using Xperia X SystemUI, but my .smali doesn't have these lines:
Code:
invoke-virtual {v0, v3, v1}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
Code:
new-instance v2, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;
Is there something else I should be looking for?
Click to expand...
Click to collapse
Rajeev said:
@venkat kamesh
Hi bro
I can't find this line
Code:
invoke-virtual {v0, v3, v1}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
I am using Xperia X SystemUI. U told its working with X SystemUI too.
@Bloodlvst bro same here.
Click to expand...
Click to collapse
Instead of this
Code:
invoke-virtual {v0, v3, v1}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
Search for this
Code:
invoke-virtual/range {v4 .. v9}, Landroid/content/Context;->registerReceiverAsUser(Landroid/content/BroadcastReceiver;Landroid/os/UserHandle;Landroid/content/IntentFilter;Ljava/lang/String;Landroid/os/Handler;)Landroid/content/Intent;
Instead of this
Code:
new-instance v2, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;
Search for this
Code:
:cond_0
invoke-direct {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->addNavigationBar()V
Just search these lines instead of those two and do all stuff as said by op.
jitz975 said:
Just search these lines instead of those two and do all stuff as said by op.
Click to expand...
Click to collapse
Gave this a shot, but I'm getting force close in SystemUI.
Couple of notes - the 2 files at the end:
BatteryMeterView
BatteryMeterView$BatteryTracker
Am I editing those or am I editing:
BatteryMeterViewMod
BatteryMeterViewMod$BatteryTracker
I ask because the puiblic ID's in BatteryMeterView don't match at all with the public(compare).xml, but the "mod" ones do. Is there a step missing?
Hopefully it's just a small issue! :fingers-crossed:
Bloodlvst said:
Gave this a shot, but I'm getting force close in SystemUI.
Couple of notes - the 2 files at the end:
BatteryMeterView
BatteryMeterView$BatteryTracker
Am I editing those or am I editing:
BatteryMeterViewMod
BatteryMeterViewMod$BatteryTracker
I ask because the puiblic ID's in BatteryMeterView don't match at all with the public(compare).xml, but the "mod" ones do. Is there a step missing?
Hopefully it's just a small issue! :fingers-crossed:
Click to expand...
Click to collapse
Bro i did this mod, only using this guide and it worked at first go.
jitz975 said:
Bro i did this mod, only using this guide and it worked at first go.
Click to expand...
Click to collapse
Did you change the ID's in:
BatteryMeterView
BatteryMeterView$BatteryTracker
Or the ones in:
BatteryMeterViewMod
BatteryMeterViewMod$BatteryTracker
I'll give it another go!
Bloodlvst said:
Did you change the ID's in:
BatteryMeterView
BatteryMeterView$BatteryTracker
Or the ones in:
BatteryMeterViewMod
BatteryMeterViewMod$BatteryTracker
I'll give it another go!
Click to expand...
Click to collapse
Yes, id's are in these two
BatteryMeterViewMod
BatteryMeterViewMod$BatteryTracker, op missed that mod part
If using Xperia X UI, you will need to replace your system_icons.xml with the following code:
Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:gravity="center_vertical" android:id="@id/system_icons" android:layout_width="wrap_content" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
<com.android.keyguard.AlphaOptimizedLinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/statusIcons" android:layout_width="wrap_content" android:layout_height="fill_parent" />
<include android:id="@id/signal_cluster" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="0.0dip" layout="@layout/signal_cluster_view" />
<com.android.systemui.BatteryMeterViewMod android:id="@+id/battery_stock" android:visibility="gone" android:layout_width="10.5dip" android:layout_height="16.0dip" android:layout_marginBottom="1.0px" android:layout_marginStart="0.0dip" systemui:batteryView="statusbar" />
<com.android.systemui.BatteryCircleMeterView android:textAppearance="@style/TextAppearance.StatusBar.Battery" android:gravity="bottom" android:id="@+id/circle_battery" android:paddingLeft="0.0dip" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" systemui:batteryView="statusbar" />
<com.android.systemui.rz.LeftLayout android:layout_width="wrap_content" android:layout_height="wrap_content" key="battery_hide">
<LinearLayout android:gravity="center_vertical" android:id="@id/battery_group" android:layout_width="wrap_content" android:layout_height="wrap_content">
<com.sonymobile.systemui.BatteryLevelView android:textSize="@dimen/battery_level_text_size" android:textColor="#ffffffff" android:layout_gravity="center_vertical" android:id="@id/battery_level" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:importantForAccessibility="noHideDescendants" />
<com.android.systemui.BatteryMeterView android:id="@id/battery" android:layout_width="9.5dip" android:layout_height="14.5dip" android:layout_marginBottom="@dimen/battery_margin_bottom" android:layout_marginStart="@dimen/battery_margin_start" />
</LinearLayout>
</com.android.systemui.rz.LeftLayout>
</LinearLayout>
@venkat kamesh - Bro, is there any plans to make it so you don't need to restart systemUI to make changes? Or is this a limitation of Marshmallow?

[Guide][tut][MM] Gesture Anywhere [all devices][only MM]

Hello guys
After very long time here is a new TUT for MM
Requirements (deodexed):-
Framework.jar
Settings.apk
SystemUI.apk
NotePad++
Makesure you had Superuser mod
Patience.. if you dont have try to get it :silly:
First part
1. Download this View attachment framework.jar.zip
2. Decompile framework.jar
3. Merge the Code in your Framework.jar
4. Recompile and replace
Continued in next post
Systemui ( second part )
Decompile SystemUI.apk
1. Download this View attachment SystemUI.apk.zip and merge to your SystemUI.apk
Now open systemui.apk/res/values/colors.xml
Add this
Code:
<color name="gesture_overlay_background_fill_color">#80000000</color>
<color name="gesture_color">@android:color/holo_blue_light</color>
2. Compile and decompile
3. Open Systemui.apk/smali/com/android/systemui/statusbar/BaseStatusBar.smali
find this
Code:
.field private mFontScale:F
after that add this
Code:
.field protected mGestureAnywhereView:Lcom/android/systemui/pac/gestureanywhere/GestureAnywhereView;
.annotation runtime Landroid/annotation/ChaosLab;
classification = .enum Landroid/annotation/ChaosLab$Classification;->NEW_FIELD:Landroid/annotation/ChaosLab$Classification;
name = "GestureAnywhere"
.end annotation
.end field
find this
Code:
# virtual methods
After that add this
Code:
.method protected addGestureAnywhereView()V
.locals 3
.annotation runtime Landroid/annotation/ChaosLab;
classification = .enum Landroid/annotation/ChaosLab$Classification;->NEW_METHOD:Landroid/annotation/ChaosLab$Classification;
name = "GestureAnywhere"
.end annotation
.prologue
.line 2413
iget-object v0, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mContext:Landroid/content/Context;
const v1, 0x7f040059
const/4 v2, 0x0
invoke-static {v0, v1, v2}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
move-result-object v0
check-cast v0, Lcom/android/systemui/pac/gestureanywhere/GestureAnywhereView;
iput-object v0, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mGestureAnywhereView:Lcom/android/systemui/pac/gestureanywhere/GestureAnywhereView;
.line 2415
iget-object v0, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mWindowManager:Landroid/view/WindowManager;
iget-object v1, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mGestureAnywhereView:Lcom/android/systemui/pac/gestureanywhere/GestureAnywhereView;
const/4 v2, 0x3
invoke-virtual {p0, v2}, Lcom/android/systemui/statusbar/BaseStatusBar;->getGestureAnywhereViewLayoutParams(I)Landroid/view/WindowManager$LayoutParams;
move-result-object v2
invoke-interface {v0, v1, v2}, Landroid/view/WindowManager;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V
.line 2416
iget-object v0, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mGestureAnywhereView:Lcom/android/systemui/pac/gestureanywhere/GestureAnywhereView;
invoke-virtual {v0, p0}, Lcom/android/systemui/pac/gestureanywhere/GestureAnywhereView;->setStatusBar(Lcom/android/systemui/statusbar/BaseStatusBar;)V
.line 2417
return-void
.end method
Replace ids (compare from public that i gave in zip
Now look for this method
Code:
.method protected abstract getMaxKeyguardNotifications()I
After that method
Add this method
Code:
.method protected getGestureAnywhereViewLayoutParams(I)Landroid/view/WindowManager$LayoutParams;
.locals 6
.param p1, "gravity" # I
.annotation runtime Landroid/annotation/ChaosLab;
classification = .enum Landroid/annotation/ChaosLab$Classification;->NEW_METHOD:Landroid/annotation/ChaosLab$Classification;
name = "GestureAnywhere"
.end annotation
.prologue
.line 2427
new-instance v0, Landroid/view/WindowManager$LayoutParams;
const/4 v1, -0x2
const/4 v2, -0x1
const/16 v3, 0x7e1
const v4, 0x840068
const/4 v5, -0x3
invoke-direct/range {v0 .. v5}, Landroid/view/WindowManager$LayoutParams;-><init>(IIIII)V
.line 2438
.local v0, "lp":Landroid/view/WindowManager$LayoutParams;
iget v1, v0, Landroid/view/WindowManager$LayoutParams;->privateFlags:I
or-int/lit8 v1, v1, 0x40
iput v1, v0, Landroid/view/WindowManager$LayoutParams;->privateFlags:I
.line 2439
or-int/lit8 v1, p1, 0x30
iput v1, v0, Landroid/view/WindowManager$LayoutParams;->gravity:I
.line 2440
const-string v1, "GestureAnywhereView"
invoke-virtual {v0, v1}, Landroid/view/WindowManager$LayoutParams;->setTitle(Ljava/lang/CharSequence;)V
.line 2442
return-object v0
.end method
.method public getHandler()Landroid/os/Handler;
.locals 1
.prologue
.line 344
iget-object v0, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mHandler:Lcom/android/systemui/statusbar/BaseStatusBar$H;
if-eqz v0, :cond_0
iget-object v0, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mHandler:Lcom/android/systemui/statusbar/BaseStatusBar$H;
:goto_0
return-object v0
:cond_0
invoke-virtual {p0}, Lcom/android/systemui/statusbar/BaseStatusBar;->createHandler()Lcom/android/systemui/statusbar/BaseStatusBar$H;
move-result-object v0
goto :goto_0
.end method
save and close
4. Open SystemUI.apk/smali/com/android/systemui/statusbar/phone/PhoneStatusBar.smali
Find this method
Code:
.method protected makeStatusBarView()Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
after .local xx
add this
Code:
.annotation runtime Landroid/annotation/ChaosLab;
classification = .enum Landroid/annotation/ChaosLab$Classification;->CHANGE_CODE:Landroid/annotation/ChaosLab$Classification;
name = "GestureAnywhere"
.end annotation
Now find this line
Code:
invoke-direct/range {p0 .. p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->updateEmptyShadeView()V
after that add this line
Code:
invoke-virtual/range {p0 .. p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->addGestureAnywhereView()V
Save and Compile
Replace the Ids by comparing with mine that i gave in zip
and replace
For final part of Settings continued in next post #3
Settings (Final part)
Decompile your settings.apk
1. Download this View attachment Settings.apk.zip
Merge them to your settings
2. open settings.apk/res/values/arrays.xml
add this
Code:
<string-array name="gesture_anywhere_position_entries">
<item>@string/gesture_anywhere_position_left</item>
<item>@string/gesture_anywhere_position_right</item>
</string-array>
<string-array name="gesture_anywhere_position_values">
<item>3</item>
<item>5</item>
</string-array>
open settings.apk/res/values/colors.xml
add this
Code:
<color name="ga_gesture_color">#ff07998b</color>
<color name="icon_tint_color">@android:color/material_deep_teal_500</color>
open settings.apk/res/values/dimens.xml
add this
Code:
<dimen name="ga_gesture_thumbnail_inset">8.0dip</dimen>
<dimen name="ga_gesture_thumbnail_size">64.0dip</dimen>
<dimen name="shortcut_picker_left_padding">40.0dip</dimen>
open settings.apk/res/values/strings.xml
add this
Code:
<string name="gesture_anywhere_title">Gesture anywhere</string>
<string name="gesture_anywhere_enabled_title">Gesture anywhere</string>
<string name="gesture_anywhere_enabled_summary">Enable the Gesture anywhere feature</string>
<string name="gesture_anywhere_position_title">Location</string>
<string name="gesture_anywhere_position_left">Left edge</string>
<string name="gesture_anywhere_position_right">Right edge</string>
<string name="gesture_anywhere_gestures_title">Gestures</string>
<string name="gesture_anywhere_gestures_summary">Add, remove and edit gestures</string>
<string name="ga_button_add">Add gesture</string>
<string name="ga_button_reload">Reload</string>
<string name="ga_button_discard">Discard</string>
<string name="ga_button_done">Done</string>
<string name="ga_prompt_gesture_name">Name</string>
<string name="ga_error_missing_name">You must enter a name</string>
<string name="ga_save_success">Gesture saved in %s</string>
<string name="ga_rename_action">OK</string>
<string name="ga_cancel_action">Cancel</string>
<string name="ga_gestures_loading">Loading gestures...</string>
<string name="ga_gestures_empty">No gestures</string>
<string name="ga_gestures_activity">Gestures</string>
<string name="ga_gestures_edit">Edit</string>
<string name="ga_gestures_delete">Delete</string>
<string name="ga_gestures_delete_success">Gesture deleted</string>
<string name="ga_gestures_rename_title">Rename gesture</string>
<string name="ga_gestures_rename_label">Gesture name</string>
<string name="ga_gestures_error_loading">Could not load %s. Make sure you have storage available.</string>
<string name="trigger_category">Trigger region</string>
<string name="trigger_width_title">Trigger width</string>
<string name="trigger_width_summary">Adjust the width of the trigger area</string>
<string name="trigger_top_title">Trigger position</string>
<string name="trigger_top_summary">Adjust the vertical postion of the trigger area</string>
<string name="trigger_bottom_title">Trigger height</string>
<string name="trigger_bottom_summary">Adjust the height of the trigger area</string>
<string name="seekbar_default">Default</string>
<string name="profile_applist_title">Applications</string>
<string name="picker_activities">Activities</string>
<string name="select_custom_app_title">Select custom app</string>
<string name="select_custom_activity_title">Select custom activity</string>
open Settings.apk/AndroidManifest.xml
at the end before </applications>
add this
Code:
<activity android:name=".kryp.gestureanywhere.GestureAnywhereBuilderActivity"/>
<activity android:name=".kryp.gestureanywhere.GestureAnywhereCreateGestureActivity"/>
in any of your setting add this ( example in mine added to ...., settings.apk/res/xml/kryp_gesture.xml)
you can add to display_settings.xml or your wish
Code:
<PreferenceScreen android:layout="@layout/pac_gestureanywhere_preference" android:title="@string/gesture_anywhere_title" android:key="gesture_anywhere" android:fragment="com.android.settings.kryp.gestureanywhere.GestureAnywhereSettings" />
Compile and Decompile... replace Ids by comparing with the one i gave in zip
If you use my work just mention me... that makes me Happier
Regards
VK
Result
This is how it works and look like (my old video)
Its work in Lp 5.1 sir?
menjete said:
Its work in Lp 5.1 sir?
Click to expand...
Click to collapse
No just MM
---------------------------------------------------------------------
 @venkat kamesh thanks bro
Can someone plz point me to a similar guide for KK??
You are a life saver! I will surely try this now. This post deserves to be pinned. Also please try to make another guide for Nougat! thanks.
venkat kamesh said:
Replace ids (compare from public that i gave in zip
Save and Compile
Replace the Ids by comparing with mine that i gave in zip
and replace
For final part of Settings continued in next post #3
Click to expand...
Click to collapse
Can you please tell me what do those long list of ids mean and where do i replace them? Im new to this.
rushabshah32 said:
Can you please tell me what do those long list of ids mean and where do i replace them? Im new to this.
Click to expand...
Click to collapse
Mate not that hard btw here u go
SecSettings
GestureAnywhereBuilderActivity$GesturesAdapter.smali
const v3, 0x7f04016a ### <public type="layout" name="ga_gestures_item" id="0x7f04016a" />
GestureAnywhereBuilderActivity.smali
const v2, 0x7f0c103e #### <public type="string" name="ga_gestures_error_loading" id="0x7f0c103e" />
const v1, 0x7f120378 #### <public type="id" name="addButton" id="0x7f120378" />
const v1, 0x7f120379 ### <public type="id" name="reloadButton" id="0x7f120379" />
const v1, 0x7f0e0081 #### <public type="color" name="ga_gesture_color" id="0x7f0e0081" />
const v1, 0x7f0b00db ### <public type="dimen" name="ga_gesture_thumbnail_inset" id="0x7f0b00db" />
const v1, 0x7f0b00dc ### <public type="dimen" name="ga_gesture_thumbnail_size" id="0x7f0b00dc" />
const v2, 0x7f120378 ### <public type="id" name="addButton" id="0x7f120378" />
const v2, 0x7f120379 ### <public type="id" name="reloadButton" id="0x7f120379" />
GestureAnywhereBuilderActivity.smali
const v1, 0x7f0c103b ### <public type="string" name="ga_gestures_delete_success" id="0x7f0c103b" />
const v0, 0x7f04016b ### <public type="layout" name="ga_gestures_list" id="0x7f04016b" />
const v2, 0x7f0c1039 #### <public type="string" name="ga_gestures_edit" id="0x7f0c1039" />
const v2, 0x7f0c103a ### <public type="string" name="ga_gestures_delete" id="0x7f0c103a" />
const v1, 0x7f0c1037 ### <public type="string" name="ga_gestures_empty" id="0x7f0c1037" />
GestureAnywhereCreateGestureActivity.smali
const v1, 0x7f120377 ## <public type="id" name="gestures_overlay" id="0x7f120377" />
const v6, 0x7f040169 ### <public type="layout" name="ga_create_gesture" id="0x7f040169" />
const v6, 0x7f1200b7 ### <public type="id" name="done" id="0x7f1200b7" />
const v6, 0x7f120376 ## <public type="id" name="gesture_name" id="0x7f120376" />
const v6, 0x7f120377 ### <public type="id" name="gestures_overlay" id="0x7f120377" />
const v1, 0x7f120377 ### ## <public type="id" name="gestures_overlay" id="0x7f120377" />
GestureAnywhereSettings.smali
const v3, 0x7f08009a ### <public type="xml" name="gesture_anywhere" id="0x7f08009a" />
const v1, 0x7f0c1025 ### <public type="string" name="gesture_anywhere_title" id="0x7f0c1025" />
ShortcutPickHelper$AppExpandableAdapter.smali
const v3, 0x7f0b00dd ### <public type="dimen" name="shortcut_picker_left_padding" id="0x7f0b00dd" />
ShortcutPickHelper.smali
const v10, 0x7f0c1047 ## <public type="string" name="profile_applist_title" id="0x7f0c1047" />
const v10, 0x7f0c1048 ## <public type="string" name="picker_activities" id="0x7f0c1048" />
const v11, 0x7f0c104a ### <public type="string" name="select_custom_activity_title" id="0x7f0c104a" />
const v9, 0x7f0c1047 ### <public type="string" name="profile_applist_title" id="0x7f0c1047" />
const v9, 0x7f0c1048 ### <public type="string" name="picker_activities" id="0x7f0c1048" />
const v9, 0x7f020168 ## <public type="drawable" name="activities_icon" id="0x7f020168" />
const v10, 0x7f0c1049 ### <public type="string" name="select_custom_app_title" id="0x7f0c1049" />
SeekBarPreferenceCham.smali
const v3, 0x7f120338 #### <public type="id" name="seekBarPrefBarContainer" id="0x7f120338" />
const v4, 0x7f040168 #### <public type="layout" name="charmseek_bar_preference" id="0x7f040168" />
const v2, 0x7f0c1046 ### <public type="string" name="seekbar_default" id="0x7f0c1046" />
const v5, 0x7f120336 ### <public type="id" name="seekBarPrefValue" id="0x7f120336" />
const v5, 0x7f120335 ### <public type="id" name="seekBarPrefUnitsRight" id="0x7f120335" />
const v5, 0x7f120337 #### <public type="id" name="seekBarPrefUnitsLeft" id="0x7f120337" />
SystemUI.apk
GestureAnywhereView.smali
const v0, 0x7f100140 ### <public type="id" name="content" id="0x7f100140" />
const v0, 0x7f10017d ### <public type="id" name="gesture_overlay" id="0x7f10017d" />
const v0, 0x7f10017f ### <public type="id" name="cancel_gesturing" id="0x7f10017f" />
TriggerOverlayView.smali
const v0, 0x7f02041c ### <public type="drawable" name="trigger_region" id="0x7f02041c" />
thank you for hard work and time
can you make zip to flash
thereassaad said:
Mate not that hard btw here u go
.
.
.
Click to expand...
Click to collapse
Thanks a ton! With this all the steps worked smoothly. The last problem I've is this.. Re compiling framework.jar with the files in priced zip merged in it.
Code:
>apktool b framework.jar.out
I: Using Apktool 2.2.0
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
Exception in thread "main" org.jf.util.ExceptionWithContext: Unsigned short value out of range: 65536
at org.jf.dexlib2.writer.DexDataWriter.writeUshort(DexDataWriter.java:116)
at org.jf.dexlib2.writer.InstructionWriter.write(InstructionWriter.java:329)
at org.jf.dexlib2.writer.DexWriter.writeCodeItem(DexWriter.java:1027)
at org.jf.dexlib2.writer.DexWriter.writeDebugAndCodeItems(DexWriter.java:803)
at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter.java:252)
at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter.java:230)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:53)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:38)
at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:400)
at brut.androlib.Androlib.buildSources(Androlib.java:331)
at brut.androlib.Androlib.build(Androlib.java:287)
at brut.androlib.Androlib.build(Androlib.java:263)
at brut.apktool.Main.cmdBuild(Main.java:224)
at brut.apktool.Main.main(Main.java:84)
Really cool, Nougat?
DroidFreak32 said:
Thanks a ton! With this all the steps worked smoothly. The last problem I've is this.. Re compiling framework.jar with the files in priced zip merged in it.
Code:
>apktool b framework.jar.out
I: Using Apktool 2.2.0
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
Exception in thread "main" org.jf.util.ExceptionWithContext: Unsigned short value out of range: 65536
at org.jf.dexlib2.writer.DexDataWriter.writeUshort(DexDataWriter.java:116)
at org.jf.dexlib2.writer.InstructionWriter.write(InstructionWriter.java:329)
at org.jf.dexlib2.writer.DexWriter.writeCodeItem(DexWriter.java:1027)
at org.jf.dexlib2.writer.DexWriter.writeDebugAndCodeItems(DexWriter.java:803)
at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter.java:252)
at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter.java:230)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:53)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:38)
at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:400)
at brut.androlib.Androlib.buildSources(Androlib.java:331)
at brut.androlib.Androlib.build(Androlib.java:287)
at brut.androlib.Androlib.build(Androlib.java:263)
at brut.apktool.Main.cmdBuild(Main.java:224)
at brut.apktool.Main.main(Main.java:84)
Click to expand...
Click to collapse
Move all stuff in classes_3, same path
DroidFreak32 said:
Thanks a ton! With this all the steps worked smoothly. The last problem I've is this.. Re compiling framework.jar with the files in priced zip merged in it.
Code:
>apktool b framework.jar.out
I: Using Apktool 2.2.0
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
Exception in thread "main" org.jf.util.ExceptionWithContext: Unsigned short value out of range: 65536
at org.jf.dexlib2.writer.DexDataWriter.writeUshort(DexDataWriter.java:116)
at org.jf.dexlib2.writer.InstructionWriter.write(InstructionWriter.java:329)
at org.jf.dexlib2.writer.DexWriter.writeCodeItem(DexWriter.java:1027)
at org.jf.dexlib2.writer.DexWriter.writeDebugAndCodeItems(DexWriter.java:803)
at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter.java:252)
at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter.java:230)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:53)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:38)
at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:400)
at brut.androlib.Androlib.buildSources(Androlib.java:331)
at brut.androlib.Androlib.build(Androlib.java:287)
at brut.androlib.Androlib.build(Androlib.java:263)
at brut.apktool.Main.cmdBuild(Main.java:224)
at brut.apktool.Main.main(Main.java:84)
Click to expand...
Click to collapse
Look where u paste smali that provided by op just move them to classes3 with same folders path ..
please guide me how to get gesture anywhere in android oreo 8.1.
Amazing Tutorial, it works on my s6 MM
Fc systemUi how to fix
---------- Post added at 02:35 PM ---------- Previous post was at 02:02 PM ----------
java.lang.VerifyError: Verifier rejected class com.android.systemui.pac.gestureanywhere.GestureAnywhereView due to bad method void com.android.systemui.pac.gestureanywhere.GestureAnywhereView.enableNavButtons() (declaration of 'com.android.systemui.pac.gestureanywhere.GestureAnywhereView' appears in /system/priv-app/SystemUI/SystemUI.apk)
how to fix?

Categories

Resources