[MOD][PORT][CM11] How to add custom scrolling animation

Search This thread

qoejohn

Senior Member
Feb 2, 2015
327
472
Yogyakarta Special Region
hi guys ,
I want to share a MOD that i ported from PAC man ROM..
This will give you ability to customize scroll on your phone.

This is one of the coolest features from PAC Man ROM. I want to remind you that this is NOT my work. I'M NOT what makes this feature.
all I do is port for CM11 to make them work :D
Anyone is able to use this mod, just please give proper credit to Devs of PAC Man ROM and me if you want ;)

Also I want to give a BIG THANKS to sir @ocoot - for very helpful hints, thanks um :eek:


So let's begin
first of all need some requirement for this MOD-GUIDE

REQUIREMENT:
- BRAIN
- Patient
- experience
- Know how to decompile/recompiling Apk and JAR file
- notepad++
- Tool for decompiling, : apkmanager/apktool/Virtous/apkmultitools/ or else
( i use apktool 1.5.2 )



SETTINGS.APK

first DECOMPILE Settings.apk
- Download attached file and merge it to your decompiled Settings.apk
- Go to Settings.apk/res/values/
add this lines to end of it before </resources>

attrs.xml add these :
Code:
    <attr name="unitsLeft" format="reference|string" />
    <attr name="unitsRight" format="reference|string" />
    <attr name="interval" format="integer" />
    <attr name="minimum" format="integer" />
    <attr name="maximum" format="integer" />
[COLOR="RoyalBlue"]</resources>[/COLOR]

ids.xml add these :
Code:
    <item type="id" name="hex">false</item>
    <item type="id" name="enter">false</item>
    <item type="id" name="white_panel">false</item>
    <item type="id" name="black_panel">false</item>
    <item type="id" name="cyan_panel">false</item>
    <item type="id" name="red_panel">false</item>
    <item type="id" name="green_panel">false</item>
    <item type="id" name="yellow_panel">false</item>
    <item type="id" name="old_color_panel">false</item>
    <item type="id" name="new_color_panel">false</item>
    <item type="id" name="seek_bar">false</item>
    <item type="id" name="seekBarPrefUnitsRightCham">false</item>
    <item type="id" name="seekBarPrefValueCham">false</item>
    <item type="id" name="seekBarPrefUnitsLeftCham">false</item>
    <item type="id" name="seekBarPrefBarContainerCham">false</item>
[COLOR="RoyalBlue"]</resources>[/COLOR]

strings.xml add these:
Code:
    <string name="press_color_to_apply">Press on color below to apply</string>
    <string name="arrow_right">→</string>
    <string name="arrow_down">↓</string>
    <string name="hex">Hex:</string>
    <string name="hex_hint">\#ff000000</string>
    <string name="set">Set</string>
    <string name="reset">Reset</string>
    <string name="animation_settings_title">Custom animations</string>
    <string name="scrolling_title">Scrolling</string>
    <string name="animation_fling_velocity_title">Fling Velocity</string>
    <string name="animation_scroll_friction_title">Scroll Friction</string>
    <string name="animation_overscroll_distance_title">Overscroll Distance</string>
    <string name="animation_overfling_distance_title">Overfling Distance</string>
    <string name="animation_no_scroll_title">Customizing scroll</string>
    <string name="animation_no_scroll_summary_on">Enabled</string>
    <string name="animation_no_scroll_summary_off">Disabled</string>
    <string name="overscroll_glow_title">Overscroll Color</string>
    <string name="animation_settings_reset_message">Reset animations to default?</string>
    <string name="animation_duration_summary">Set duration</string>
[COLOR="RoyalBlue"]</resources>[/COLOR]

save...

- Now go to res/xml/display_settings.xml
put this line :
Code:
[COLOR="Red"]<PreferenceScreen android:title="@string/scrolling_title" android:key="interface_animation_scroll" android:fragment="com.android.settings.pac.animations.ScrollAnimationInterfaceSettings" />[/COLOR]

Code:
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen android:title="@string/display_settings"
  xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
    <com.android.settings.BrightnessPreference android:persistent="false" android:title="@string/brightness" />
    [COLOR="Red"]<PreferenceScreen android:title="@string/scrolling_title" android:key="interface_animation_scroll" android:fragment="com.android.settings.pac.animations.ScrollAnimationInterfaceSettings" />[/COLOR]
    <PreferenceCategory android:title="@string/display_settings_title" android:key="display_prefs">
        <PreferenceScreen android:title="@string/display_rotation_title" android:key="display_rotation" android:fragment="com.android.settings.cyanogenmod.DisplayRotation" />
        <ListPreference android:persistent="false" android:entries="@array/screen_timeout_entries" android:title="@string/screen_timeout" android:key="screen_timeout" android:summary="@string/screen_timeout_summary" android:entryValues="@array/screen_timeout_values" />
        <com.android.settings.FontDialogPreference android:title="@string/title_font_size" android:key="font_size" android:summary="@string/summary_font_size" android:dialogTitle="@string/dialog_title_font_size" />
        <PreferenceScreen android:title="@string/screensaver_settings_title" android:key="screensaver" android:fragment="com.android.settings.DreamSettings" />
        <PreferenceScreen android:title="@string/wifi_display_settings_title" android:key="wifi_display" android:fragment="com.android.settings.wfd.WifiDisplaySettings" />
    </PreferenceCategory>
    <PreferenceCategory android:title="@string/power_menu_expanded_desktop" android:key="expanded_desktop_category">
        <ListPreference android:persistent="false" android:entries="@array/expanded_desktop_entries" android:title="@string/expanded_desktop_style" android:key="expanded_desktop" android:entryValues="@array/expanded_desktop_values" />
        <CheckBoxPreference android:persistent="true" android:title="@string/power_menu_expanded_desktop" android:key="expanded_desktop_no_navbar" />
        <com.android.settings.cyanogenmod.SystemSettingCheckBoxPreference android:title="@string/expanded_desktop_system_bars_visibility" android:key="expanded_desktop_system_bars_visibility" android:summary="@string/expanded_desktop_system_bars_visibility_summary" android:defaultValue="false" />
    </PreferenceCategory>
    <PreferenceCategory android:title="@string/lights_category_title" android:key="lights_prefs">
        <PreferenceScreen android:title="@string/notification_light_title" android:key="notification_pulse" android:fragment="com.android.settings.notificationlight.NotificationLightSettings" />
        <PreferenceScreen android:title="@string/battery_light_title" android:key="battery_light" android:fragment="com.android.settings.notificationlight.BatteryLightSettings" />
    </PreferenceCategory>
    <PreferenceCategory android:title="@string/advanced_settings" android:key="advanced_display_prefs">
        <CheckBoxPreference android:title="@string/adaptive_backlight_title" android:key="adaptive_backlight" android:summary="@string/adaptive_backlight_summary" android:defaultValue="true" />
        <CheckBoxPreference android:title="@string/sunlight_enhancement_title" android:key="sunlight_enhancement" android:summary="@string/sunlight_enhancement_summary" android:defaultValue="true" />
        <CheckBoxPreference android:title="@string/color_enhancement_title" android:key="color_enhancement" android:summary="@string/color_enhancement_summary" android:defaultValue="true" />
        <com.android.settings.cyanogenmod.SystemSettingCheckBoxPreference android:title="@string/double_tap_to_sleep_title" android:key="double_tap_sleep_gesture" android:summary="@string/double_tap_to_sleep_summary" android:defaultValue="false" />
        <CheckBoxPreference android:title="@string/double_tap_to_wake_title" android:key="double_tap_wake_gesture" />
        <com.android.settings.cyanogenmod.SystemSettingCheckBoxPreference android:title="@string/proximity_wake_title" android:key="proximity_on_wake" android:summary="@string/proximity_wake_summary" android:defaultValue="true" />
        <CheckBoxPreference android:title="@string/wake_when_plugged_or_unplugged_title" android:key="wake_when_plugged_or_unplugged" android:summary="@string/wake_when_plugged_or_unplugged_summary" android:defaultValue="false" />
        <com.android.settings.cyanogenmod.SystemSettingCheckBoxPreference android:title="@string/screen_animation_off_title" android:key="screen_off_animation" android:defaultValue="true" />
        <ListPreference android:entries="@array/screen_animation_style_entries" android:title="@string/screen_animation_style_title" android:key="screen_animation_style" android:entryValues="@array/screen_animation_style_values" />
        <PreferenceScreen android:title="@string/lcd_density_title" android:key="lcd_density_setup" android:fragment="com.android.settings.interface.fragments.DensityChanger" />
        <com.android.settings.hardware.DisplayColor android:persistent="false" android:title="@string/color_calibration_title" android:key="color_calibration" android:summary="@string/color_calibration_summary" android:dialogTitle="@string/color_calibration_title" />
        <com.android.settings.hardware.DisplayGamma android:persistent="false" android:title="@string/gamma_tuning_title_head" android:key="gamma_tuning" android:summary="@string/gamma_tuning_summary_head" android:dialogTitle="@string/gamma_tuning_title_head" />
        <PreferenceScreen android:persistent="false" android:title="@string/screencolor" android:key="screencolor_settings">
        <intent android:targetPackage="com.android.settings" android:action="android.intent.action.MAIN" android:targetClass="com.android.settings.ScreenColorSettings" />
        </PreferenceScreen>
        <Preference android:title="@string/radio_controls_title" android:key="advanced_display_settings">
        <intent android:targetPackage="com.cyanogenmod.settings.device" android:action="com.cyanogenmod.action.LAUNCH_DEVICE_SETTINGS" android:targetClass="com.cyanogenmod.settings.device.DisplaySettings" />
        </Preference>
    </PreferenceCategory>
</PreferenceScreen>

but you can put the line whereever you like,. ;)


- Recompile your Settings.apk

- Decompile the newly recompiled APK again
go to your secondly decompiled Settings.apk/res/values/public.xml and keep it open

Pay attention to this 0x7f?????? !!!

- Go to Settings.apk/smali/net/margaritov/preference/color picker/ColorPickerDialog.smali
search this -> const v2, 0x7f040103

1. change this -> 0x7f040103 , according to the value you got in your own public.xml
Code:
<public type="layout" name="dialog_color_picker" id="0x7f??????" />

do it too to all lines below, in the smali

2. const v2, 0x7f080c3c
Code:
<public type="string" name="dialog_color_picker" id="0x7f?????? />

3. const v2, 0x7f0d00c5
Code:
<public type="id" name="color_picker_view" id="0x7f?????? />

4. const v2, 0x7f0d0324
Code:
<public type="id" name="old_color_panel" id="0x7f?????? />

5. const v2, 0x7f0d0325
Code:
<public type="id" name="new_color_panel" id="0x7f?????? />

6. const v2, 0x7f0d031e
Code:
<public type="id" name="white_panel" id="0x7f?????? />

7. const v2, 0x7f0d031f
Code:
<public type="id" name="black_panel" id="0x7f?????? />

8. const v2, 0x7f0d0320
Code:
<public type="id" name="cyan_panel" id="0x7f?????? />

9. const v2, 0x7f0d0321
Code:
<public type="id" name="red_panel" id="0x7f?????? />

10. const v2, 0x7f0d0322
Code:
<public type="id" name="green_panel" id="0x7f?????? />

11. const v2, 0x7f0d0323
Code:
<public type="id" name="yellow_panel" id="0x7f?????? />

12. const v2, 0x7f0d031c
Code:
<public type="id" name="hex" id="0x7f?????? />

13. const v2, 0x7f0d031d
Code:
<public type="id" name="enter" id="0x7f?????? />

14. const v1, 0x7f0d0325
Code:
<public type="id" name="new_color_panel" id="0x7f?????? />


- Go to Settings.apk/smali/com/android/settings/pac/SeekBarPreferenceCham.smali
search this -> const v3, 0x7f0d032f

1. change this -> 0x7f0d032f , according to the value you got in your own public.xml
Code:
<public type="id" name="seekBarPrefBarContainerCham" id="0x7f?????? />

do it too to all lines below, in the smali

2. const v4, 0x7f040106
Code:
<public type="layout" name="seek_bar_preference_cham" id="0x7f?????? />

3. const v5, 0x7f0d032d
Code:
<public type="id" name="seekBarPrefValueCham" id="0x7f?????? />

4. const v5, 0x7f0d032c
Code:
<public type="id" name="seekBarPrefUnitsRightCham" id="0x7f?????? />

5. const v5, 0x7f0d032e
Code:
<public type="id" name="seekBarPrefUnitsLeftCham" id="0x7f?????? />

- Go to Settings.apk/smali/com/android/settings/pac/animations/ScrollAnimationInterfaceSettings.smali
search this -> const v1, 0x7f080c28

1. change this -> 0x7f080c28 , according to the value you got in your own public.xml
Code:
<public type="string" name="reset" id="0x7f?????? />

do it too to all lines below, in the smali

2. const v1, 0x7f080c9e
Code:
<public type="string" name="animation_settings_reset_message" id="0x7f?????? />

3. const v1, 0x7f0801e0
Code:
<public type="string" name="ok" id="0x7f?????? />

4. const v1, 0x7f080559
Code:
<public type="string" name="cancel" id="0x7f?????? />

5. const v7, 0x7f05007a
Code:
<public type="xml" name="scroll_animation_interface_settings" id="0x7f?????? />

6. const v1, 0x7f080c28
Code:
<public type="string" name="reset" id="0x7f?????? />

7. const v1, 0x7f0200a8
Code:
<public type="drawable" name="ic_settings_backup" id="0x7f?????? />


- Go to AndroidManifest.xml
add this lines to end of it before </application>
Code:
[COLOR="Red"]<activity android:name=".pac.animations.ScrollAnimationInterfaceSettings" />[/COLOR]

Code:
        - - - - - -
        - - - - - -
        - - - - - -
        <provider android:name="android.support.v4.content.FileProvider" android:exported="false" android:authorities="com.android.settings.files" android:grantUriPermissions="true">
            <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/file_paths" />
        </provider>
        <service android:label="LtoService" android:name=".cyanogenmod.LtoService" android:enabled="true" android:exported="false" />
        <service android:name=".search.SearchPopulator" />
        [COLOR="Red"]<activity android:name=".pac.animations.ScrollAnimationInterfaceSettings" />[/COLOR]
    </application>
</manifest>


- Done and recompile it,
- SIGN it ( you can use signer_keys on attachment )
- Push to system/priv-app/


next step on post #2
 

Attachments

  • Apktool_CM11_signer_keys.zip
    6.3 KB · Views: 233
  • Screenshot_2015-04-08-16-28-30.png
    Screenshot_2015-04-08-16-28-30.png
    129.9 KB · Views: 1,203
  • Settings.apk.zip
    35.3 KB · Views: 391
Last edited:

qoejohn

Senior Member
Feb 2, 2015
327
472
Yogyakarta Special Region
FRAMEWORK.JAR

- Decompile / Baksmali your framework.jar
- Download attached file and merge it to your decompiled framework.jar
- Go to smali/android/provider/Settings$System.smali

search
Code:
# static fields

add this :
Code:
.field public static final ANIMATION_CONTROLS_NO_SCROLL:Ljava/lang/String; = "animation_controls_no_scroll"
  
.field public static final CUSTOM_FLING_VELOCITY:Ljava/lang/String; = "custom_fling_velocity"

.field public static final CUSTOM_OVERFLING_DISTANCE:Ljava/lang/String; = "custom_overfling_distance"

.field public static final CUSTOM_OVERSCROLL_DISTANCE:Ljava/lang/String; = "custom_overscroll_distance"

.field public static final CUSTOM_SCROLL_FRICTION:Ljava/lang/String; = "custom_scroll_friction"
	
.field public static final OVERSCROLL_GLOW_COLOR:Ljava/lang/String; = "overscroll_glow_color"


- Now decompile your framework-res.apk ( we only need public.xml )
- Go to res/values/public.xml and keep it open
- Now open decompiled framework.jar then go to smali/android/view/ViewConfiguration.smali
search this -> const v12, 0x1110014

ATTENTION! id public for framework.jar
just TAKE the BLUE CODE
and SKIP the RED CODE

1. change this -> 0x1110014 , according to the value you got in your own public.xml of framework-res.apk
Code:
<public type="bool" name="config_ui_enableFadingMarquee" id="[COLOR="Blue"]0x[/COLOR][COLOR="Red"]0[/COLOR][COLOR="Blue"]???????[/COLOR] />

2. const v12, 0x1050008
Code:
<public type="dimen" name="config_viewConfigurationTouchSlop" id="[COLOR="Blue"]0x[/COLOR][COLOR="Red"]0[/COLOR][COLOR="Blue"]???????[/COLOR] />


- Go to framework.jar.out/smali/android/widget/EdgeEffect.smali
search this -> const v3, 0x10804a5

just TAKE the BLUE CODE
and SKIP the RED CODE

1. change this -> 0x10804a5 , according to the value you got in your own public.xml of framework-res.apk
Code:
<public type="drawable" name="overscroll_edge" id="[COLOR="Blue"]0x[/COLOR][COLOR="Red"]0[/COLOR][COLOR="Blue"]???????[/COLOR] />

2. const v3, 0x10804a6
Code:
<public type="drawable" name="overscroll_glow" id="[COLOR="Blue"]0x[/COLOR][COLOR="Red"]0[/COLOR][COLOR="Blue"]???????[/COLOR] />


- Save
- Recompile it
- Push or flash to system/framework/
 

Attachments

  • Screenshot_2015-04-08-16-30-22.png
    Screenshot_2015-04-08-16-30-22.png
    190.7 KB · Views: 489
  • Screenshot_2015-04-08-16-31-44.png
    Screenshot_2015-04-08-16-31-44.png
    148.5 KB · Views: 495
  • Screenshot_2015-04-08-18-50-11.png
    Screenshot_2015-04-08-18-50-11.png
    99.4 KB · Views: 487
  • framework.jar.zip
    8.5 KB · Views: 303
Last edited:

xtro-xda

Senior Member
Oct 4, 2012
93
41
thank you, great tutorial u got there dab :good:

just a little request,
if u got a free time, would u mind to share how to add network traffic to status bar ?
for cm / aosp rom.

I see ur work for Armani Multimod is great, but haven't really tried it yet because honestly, all I just need network traffic, LoL
but still, many thanks to you for sharing it
:D
 
Last edited:

qoejohn

Senior Member
Feb 2, 2015
327
472
Yogyakarta Special Region
thank you, great tutorial u got there dab :good:

just a little request,
if u got a free time, would u mind to share how to add network traffic to status bar ?
for cm / aosp rom.

I see ur work for Armani Multimod is great, but haven't really tried it yet because honestly, all I just need network traffic, LoL
but still, many thanks to you for sharing it
:D

thanks dab ;)

for network traffic on the status bar ,, you can see here
http://forum.xda-developers.com/showpost.php?p=58703754&postcount=1
or
http://forum.xda-developers.com/showthread.php?t=2620272
 
  • Like
Reactions: xtro-xda

Yousef Algadri

Senior Member
May 31, 2014
828
1,301
23
Jakarta
Sir i've try in StockROM KitKat its success and not bootloop but when i try to open apps (that makes Overscroll appear) Its always restarting my phone sir :( Can you know how to fix sir? :(
 

Atrankas

Senior Member
Nov 1, 2012
107
113
Toledo
Same here, @qoejohn. Tried on Note3 n9005 4.4.2 stock. The selector for overscroll glow color applies fine (modifing EdgeEffect.smali only) but when I mod the ViewConfiguration.smali, the phone gets hot reboot when I click on an app like root explorer. I'll keep on trying. Thanks again!

Enviado desde mi SM-N9005 mediante Tapatalk
 

Top Liked Posts

  • There are no posts matching your filters.
  • 8
    hi guys ,
    I want to share a MOD that i ported from PAC man ROM..
    This will give you ability to customize scroll on your phone.

    This is one of the coolest features from PAC Man ROM. I want to remind you that this is NOT my work. I'M NOT what makes this feature.
    all I do is port for CM11 to make them work :D
    Anyone is able to use this mod, just please give proper credit to Devs of PAC Man ROM and me if you want ;)

    Also I want to give a BIG THANKS to sir @ocoot - for very helpful hints, thanks um :eek:


    So let's begin
    first of all need some requirement for this MOD-GUIDE

    REQUIREMENT:
    - BRAIN
    - Patient
    - experience
    - Know how to decompile/recompiling Apk and JAR file
    - notepad++
    - Tool for decompiling, : apkmanager/apktool/Virtous/apkmultitools/ or else
    ( i use apktool 1.5.2 )



    SETTINGS.APK

    first DECOMPILE Settings.apk
    - Download attached file and merge it to your decompiled Settings.apk
    - Go to Settings.apk/res/values/
    add this lines to end of it before </resources>

    attrs.xml add these :
    Code:
        <attr name="unitsLeft" format="reference|string" />
        <attr name="unitsRight" format="reference|string" />
        <attr name="interval" format="integer" />
        <attr name="minimum" format="integer" />
        <attr name="maximum" format="integer" />
    [COLOR="RoyalBlue"]</resources>[/COLOR]

    ids.xml add these :
    Code:
        <item type="id" name="hex">false</item>
        <item type="id" name="enter">false</item>
        <item type="id" name="white_panel">false</item>
        <item type="id" name="black_panel">false</item>
        <item type="id" name="cyan_panel">false</item>
        <item type="id" name="red_panel">false</item>
        <item type="id" name="green_panel">false</item>
        <item type="id" name="yellow_panel">false</item>
        <item type="id" name="old_color_panel">false</item>
        <item type="id" name="new_color_panel">false</item>
        <item type="id" name="seek_bar">false</item>
        <item type="id" name="seekBarPrefUnitsRightCham">false</item>
        <item type="id" name="seekBarPrefValueCham">false</item>
        <item type="id" name="seekBarPrefUnitsLeftCham">false</item>
        <item type="id" name="seekBarPrefBarContainerCham">false</item>
    [COLOR="RoyalBlue"]</resources>[/COLOR]

    strings.xml add these:
    Code:
        <string name="press_color_to_apply">Press on color below to apply</string>
        <string name="arrow_right">→</string>
        <string name="arrow_down">↓</string>
        <string name="hex">Hex:</string>
        <string name="hex_hint">\#ff000000</string>
        <string name="set">Set</string>
        <string name="reset">Reset</string>
        <string name="animation_settings_title">Custom animations</string>
        <string name="scrolling_title">Scrolling</string>
        <string name="animation_fling_velocity_title">Fling Velocity</string>
        <string name="animation_scroll_friction_title">Scroll Friction</string>
        <string name="animation_overscroll_distance_title">Overscroll Distance</string>
        <string name="animation_overfling_distance_title">Overfling Distance</string>
        <string name="animation_no_scroll_title">Customizing scroll</string>
        <string name="animation_no_scroll_summary_on">Enabled</string>
        <string name="animation_no_scroll_summary_off">Disabled</string>
        <string name="overscroll_glow_title">Overscroll Color</string>
        <string name="animation_settings_reset_message">Reset animations to default?</string>
        <string name="animation_duration_summary">Set duration</string>
    [COLOR="RoyalBlue"]</resources>[/COLOR]

    save...

    - Now go to res/xml/display_settings.xml
    put this line :
    Code:
    [COLOR="Red"]<PreferenceScreen android:title="@string/scrolling_title" android:key="interface_animation_scroll" android:fragment="com.android.settings.pac.animations.ScrollAnimationInterfaceSettings" />[/COLOR]

    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <PreferenceScreen android:title="@string/display_settings"
      xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
        <com.android.settings.BrightnessPreference android:persistent="false" android:title="@string/brightness" />
        [COLOR="Red"]<PreferenceScreen android:title="@string/scrolling_title" android:key="interface_animation_scroll" android:fragment="com.android.settings.pac.animations.ScrollAnimationInterfaceSettings" />[/COLOR]
        <PreferenceCategory android:title="@string/display_settings_title" android:key="display_prefs">
            <PreferenceScreen android:title="@string/display_rotation_title" android:key="display_rotation" android:fragment="com.android.settings.cyanogenmod.DisplayRotation" />
            <ListPreference android:persistent="false" android:entries="@array/screen_timeout_entries" android:title="@string/screen_timeout" android:key="screen_timeout" android:summary="@string/screen_timeout_summary" android:entryValues="@array/screen_timeout_values" />
            <com.android.settings.FontDialogPreference android:title="@string/title_font_size" android:key="font_size" android:summary="@string/summary_font_size" android:dialogTitle="@string/dialog_title_font_size" />
            <PreferenceScreen android:title="@string/screensaver_settings_title" android:key="screensaver" android:fragment="com.android.settings.DreamSettings" />
            <PreferenceScreen android:title="@string/wifi_display_settings_title" android:key="wifi_display" android:fragment="com.android.settings.wfd.WifiDisplaySettings" />
        </PreferenceCategory>
        <PreferenceCategory android:title="@string/power_menu_expanded_desktop" android:key="expanded_desktop_category">
            <ListPreference android:persistent="false" android:entries="@array/expanded_desktop_entries" android:title="@string/expanded_desktop_style" android:key="expanded_desktop" android:entryValues="@array/expanded_desktop_values" />
            <CheckBoxPreference android:persistent="true" android:title="@string/power_menu_expanded_desktop" android:key="expanded_desktop_no_navbar" />
            <com.android.settings.cyanogenmod.SystemSettingCheckBoxPreference android:title="@string/expanded_desktop_system_bars_visibility" android:key="expanded_desktop_system_bars_visibility" android:summary="@string/expanded_desktop_system_bars_visibility_summary" android:defaultValue="false" />
        </PreferenceCategory>
        <PreferenceCategory android:title="@string/lights_category_title" android:key="lights_prefs">
            <PreferenceScreen android:title="@string/notification_light_title" android:key="notification_pulse" android:fragment="com.android.settings.notificationlight.NotificationLightSettings" />
            <PreferenceScreen android:title="@string/battery_light_title" android:key="battery_light" android:fragment="com.android.settings.notificationlight.BatteryLightSettings" />
        </PreferenceCategory>
        <PreferenceCategory android:title="@string/advanced_settings" android:key="advanced_display_prefs">
            <CheckBoxPreference android:title="@string/adaptive_backlight_title" android:key="adaptive_backlight" android:summary="@string/adaptive_backlight_summary" android:defaultValue="true" />
            <CheckBoxPreference android:title="@string/sunlight_enhancement_title" android:key="sunlight_enhancement" android:summary="@string/sunlight_enhancement_summary" android:defaultValue="true" />
            <CheckBoxPreference android:title="@string/color_enhancement_title" android:key="color_enhancement" android:summary="@string/color_enhancement_summary" android:defaultValue="true" />
            <com.android.settings.cyanogenmod.SystemSettingCheckBoxPreference android:title="@string/double_tap_to_sleep_title" android:key="double_tap_sleep_gesture" android:summary="@string/double_tap_to_sleep_summary" android:defaultValue="false" />
            <CheckBoxPreference android:title="@string/double_tap_to_wake_title" android:key="double_tap_wake_gesture" />
            <com.android.settings.cyanogenmod.SystemSettingCheckBoxPreference android:title="@string/proximity_wake_title" android:key="proximity_on_wake" android:summary="@string/proximity_wake_summary" android:defaultValue="true" />
            <CheckBoxPreference android:title="@string/wake_when_plugged_or_unplugged_title" android:key="wake_when_plugged_or_unplugged" android:summary="@string/wake_when_plugged_or_unplugged_summary" android:defaultValue="false" />
            <com.android.settings.cyanogenmod.SystemSettingCheckBoxPreference android:title="@string/screen_animation_off_title" android:key="screen_off_animation" android:defaultValue="true" />
            <ListPreference android:entries="@array/screen_animation_style_entries" android:title="@string/screen_animation_style_title" android:key="screen_animation_style" android:entryValues="@array/screen_animation_style_values" />
            <PreferenceScreen android:title="@string/lcd_density_title" android:key="lcd_density_setup" android:fragment="com.android.settings.interface.fragments.DensityChanger" />
            <com.android.settings.hardware.DisplayColor android:persistent="false" android:title="@string/color_calibration_title" android:key="color_calibration" android:summary="@string/color_calibration_summary" android:dialogTitle="@string/color_calibration_title" />
            <com.android.settings.hardware.DisplayGamma android:persistent="false" android:title="@string/gamma_tuning_title_head" android:key="gamma_tuning" android:summary="@string/gamma_tuning_summary_head" android:dialogTitle="@string/gamma_tuning_title_head" />
            <PreferenceScreen android:persistent="false" android:title="@string/screencolor" android:key="screencolor_settings">
            <intent android:targetPackage="com.android.settings" android:action="android.intent.action.MAIN" android:targetClass="com.android.settings.ScreenColorSettings" />
            </PreferenceScreen>
            <Preference android:title="@string/radio_controls_title" android:key="advanced_display_settings">
            <intent android:targetPackage="com.cyanogenmod.settings.device" android:action="com.cyanogenmod.action.LAUNCH_DEVICE_SETTINGS" android:targetClass="com.cyanogenmod.settings.device.DisplaySettings" />
            </Preference>
        </PreferenceCategory>
    </PreferenceScreen>

    but you can put the line whereever you like,. ;)


    - Recompile your Settings.apk

    - Decompile the newly recompiled APK again
    go to your secondly decompiled Settings.apk/res/values/public.xml and keep it open

    Pay attention to this 0x7f?????? !!!

    - Go to Settings.apk/smali/net/margaritov/preference/color picker/ColorPickerDialog.smali
    search this -> const v2, 0x7f040103

    1. change this -> 0x7f040103 , according to the value you got in your own public.xml
    Code:
    <public type="layout" name="dialog_color_picker" id="0x7f??????" />

    do it too to all lines below, in the smali

    2. const v2, 0x7f080c3c
    Code:
    <public type="string" name="dialog_color_picker" id="0x7f?????? />

    3. const v2, 0x7f0d00c5
    Code:
    <public type="id" name="color_picker_view" id="0x7f?????? />

    4. const v2, 0x7f0d0324
    Code:
    <public type="id" name="old_color_panel" id="0x7f?????? />

    5. const v2, 0x7f0d0325
    Code:
    <public type="id" name="new_color_panel" id="0x7f?????? />

    6. const v2, 0x7f0d031e
    Code:
    <public type="id" name="white_panel" id="0x7f?????? />

    7. const v2, 0x7f0d031f
    Code:
    <public type="id" name="black_panel" id="0x7f?????? />

    8. const v2, 0x7f0d0320
    Code:
    <public type="id" name="cyan_panel" id="0x7f?????? />

    9. const v2, 0x7f0d0321
    Code:
    <public type="id" name="red_panel" id="0x7f?????? />

    10. const v2, 0x7f0d0322
    Code:
    <public type="id" name="green_panel" id="0x7f?????? />

    11. const v2, 0x7f0d0323
    Code:
    <public type="id" name="yellow_panel" id="0x7f?????? />

    12. const v2, 0x7f0d031c
    Code:
    <public type="id" name="hex" id="0x7f?????? />

    13. const v2, 0x7f0d031d
    Code:
    <public type="id" name="enter" id="0x7f?????? />

    14. const v1, 0x7f0d0325
    Code:
    <public type="id" name="new_color_panel" id="0x7f?????? />


    - Go to Settings.apk/smali/com/android/settings/pac/SeekBarPreferenceCham.smali
    search this -> const v3, 0x7f0d032f

    1. change this -> 0x7f0d032f , according to the value you got in your own public.xml
    Code:
    <public type="id" name="seekBarPrefBarContainerCham" id="0x7f?????? />

    do it too to all lines below, in the smali

    2. const v4, 0x7f040106
    Code:
    <public type="layout" name="seek_bar_preference_cham" id="0x7f?????? />

    3. const v5, 0x7f0d032d
    Code:
    <public type="id" name="seekBarPrefValueCham" id="0x7f?????? />

    4. const v5, 0x7f0d032c
    Code:
    <public type="id" name="seekBarPrefUnitsRightCham" id="0x7f?????? />

    5. const v5, 0x7f0d032e
    Code:
    <public type="id" name="seekBarPrefUnitsLeftCham" id="0x7f?????? />

    - Go to Settings.apk/smali/com/android/settings/pac/animations/ScrollAnimationInterfaceSettings.smali
    search this -> const v1, 0x7f080c28

    1. change this -> 0x7f080c28 , according to the value you got in your own public.xml
    Code:
    <public type="string" name="reset" id="0x7f?????? />

    do it too to all lines below, in the smali

    2. const v1, 0x7f080c9e
    Code:
    <public type="string" name="animation_settings_reset_message" id="0x7f?????? />

    3. const v1, 0x7f0801e0
    Code:
    <public type="string" name="ok" id="0x7f?????? />

    4. const v1, 0x7f080559
    Code:
    <public type="string" name="cancel" id="0x7f?????? />

    5. const v7, 0x7f05007a
    Code:
    <public type="xml" name="scroll_animation_interface_settings" id="0x7f?????? />

    6. const v1, 0x7f080c28
    Code:
    <public type="string" name="reset" id="0x7f?????? />

    7. const v1, 0x7f0200a8
    Code:
    <public type="drawable" name="ic_settings_backup" id="0x7f?????? />


    - Go to AndroidManifest.xml
    add this lines to end of it before </application>
    Code:
    [COLOR="Red"]<activity android:name=".pac.animations.ScrollAnimationInterfaceSettings" />[/COLOR]

    Code:
            - - - - - -
            - - - - - -
            - - - - - -
            <provider android:name="android.support.v4.content.FileProvider" android:exported="false" android:authorities="com.android.settings.files" android:grantUriPermissions="true">
                <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/file_paths" />
            </provider>
            <service android:label="LtoService" android:name=".cyanogenmod.LtoService" android:enabled="true" android:exported="false" />
            <service android:name=".search.SearchPopulator" />
            [COLOR="Red"]<activity android:name=".pac.animations.ScrollAnimationInterfaceSettings" />[/COLOR]
        </application>
    </manifest>


    - Done and recompile it,
    - SIGN it ( you can use signer_keys on attachment )
    - Push to system/priv-app/


    next step on post #2
    7
    FRAMEWORK.JAR

    - Decompile / Baksmali your framework.jar
    - Download attached file and merge it to your decompiled framework.jar
    - Go to smali/android/provider/Settings$System.smali

    search
    Code:
    # static fields

    add this :
    Code:
    .field public static final ANIMATION_CONTROLS_NO_SCROLL:Ljava/lang/String; = "animation_controls_no_scroll"
      
    .field public static final CUSTOM_FLING_VELOCITY:Ljava/lang/String; = "custom_fling_velocity"
    
    .field public static final CUSTOM_OVERFLING_DISTANCE:Ljava/lang/String; = "custom_overfling_distance"
    
    .field public static final CUSTOM_OVERSCROLL_DISTANCE:Ljava/lang/String; = "custom_overscroll_distance"
    
    .field public static final CUSTOM_SCROLL_FRICTION:Ljava/lang/String; = "custom_scroll_friction"
    	
    .field public static final OVERSCROLL_GLOW_COLOR:Ljava/lang/String; = "overscroll_glow_color"


    - Now decompile your framework-res.apk ( we only need public.xml )
    - Go to res/values/public.xml and keep it open
    - Now open decompiled framework.jar then go to smali/android/view/ViewConfiguration.smali
    search this -> const v12, 0x1110014

    ATTENTION! id public for framework.jar
    just TAKE the BLUE CODE
    and SKIP the RED CODE

    1. change this -> 0x1110014 , according to the value you got in your own public.xml of framework-res.apk
    Code:
    <public type="bool" name="config_ui_enableFadingMarquee" id="[COLOR="Blue"]0x[/COLOR][COLOR="Red"]0[/COLOR][COLOR="Blue"]???????[/COLOR] />

    2. const v12, 0x1050008
    Code:
    <public type="dimen" name="config_viewConfigurationTouchSlop" id="[COLOR="Blue"]0x[/COLOR][COLOR="Red"]0[/COLOR][COLOR="Blue"]???????[/COLOR] />


    - Go to framework.jar.out/smali/android/widget/EdgeEffect.smali
    search this -> const v3, 0x10804a5

    just TAKE the BLUE CODE
    and SKIP the RED CODE

    1. change this -> 0x10804a5 , according to the value you got in your own public.xml of framework-res.apk
    Code:
    <public type="drawable" name="overscroll_edge" id="[COLOR="Blue"]0x[/COLOR][COLOR="Red"]0[/COLOR][COLOR="Blue"]???????[/COLOR] />

    2. const v3, 0x10804a6
    Code:
    <public type="drawable" name="overscroll_glow" id="[COLOR="Blue"]0x[/COLOR][COLOR="Red"]0[/COLOR][COLOR="Blue"]???????[/COLOR] />


    - Save
    - Recompile it
    - Push or flash to system/framework/
    1
    pertamax sir :)
    1
    thank you, great tutorial u got there dab :good:

    just a little request,
    if u got a free time, would u mind to share how to add network traffic to status bar ?
    for cm / aosp rom.

    I see ur work for Armani Multimod is great, but haven't really tried it yet because honestly, all I just need network traffic, LoL
    but still, many thanks to you for sharing it
    :D

    thanks dab ;)

    for network traffic on the status bar ,, you can see here
    http://forum.xda-developers.com/showpost.php?p=58703754&postcount=1
    or
    http://forum.xda-developers.com/showthread.php?t=2620272
    1
    ok sir ;)
    good luck ... cemungudz :D

    thanks... :highfive:
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone