Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[GUIDE][SMALI] How to port Mokee ListView Animation for CyanogenMod.11

OP Adi Aisiteru Reborn

18th March 2014, 09:24 AM   |  #1  
Adi Aisiteru Reborn's Avatar
OP Senior Member
Flag Bandar Lampung
Thanks Meter: 4,579
 
1,666 posts
Join Date:Joined: Apr 2013
Guide for CyanogenMod11 KOT49H


HOW TO PORT "Mokee ListView Animations" for CyanogenMod11 only !!

Hello guys, I want to share to you smali Guide how to port with settings. custom Mokee ListView Animation,.
credit to Mokee rom

ok lets go to Guide:
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


Settings.apk

Decompile your CM11 Settings.apk
1. Settings.apk\res\values\arrays.xml
add this to end of it before
Code:
</resources>
so it will be like this
Code:
<string-array name="listview_animation_entries">
        <item>@string/listview_off</item>
        <item>@string/listview_wave_left</item>
        <item>@string/listview_wave_right</item>
        <item>@string/listview_scale</item>
        <item>@string/listview_alpha</item>
        <item>@string/listview_stack_top</item>
        <item>@string/listview_stack_bottom</item>
        <item>@string/listview_unfold</item>
        <item>@string/listview_fold</item>
        <item>@string/listview_translate_left</item>
        <item>@string/listview_translate_right</item>
        <item>@string/listview_rotate</item>
    </string-array>
    <string-array name="listview_animation_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>
    </string-array>
    <string-array name="listview_interpolator_entries">
        <item>@string/listview_off</item>
        <item>@string/listview_accelerate_interpolator</item>
        <item>@string/listview_decelerate_interpolator</item>
        <item>@string/listview_accelerate_decelerate_interpolator</item>
        <item>@string/listview_anticipate_interpolator</item>
        <item>@string/listview_overshoot_interpolator</item>
        <item>@string/listview_anticipate_overshoot_interpolator</item>
        <item>@string/listview_bounce_interpolator</item>
    </string-array>
    <string-array name="listview_interpolator_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>
    </string-array>
</resources>
2. Settings.apk\res\values\strings.xml
add this to end of it before
Code:
</resources>
so it will be like this
Code:
<string name="listview_animation_title">ListView animation</string>
    <string name="listview_off">Off</string>
    <string name="listview_wave_left">Wave (left)</string>
    <string name="listview_wave_right">Wave (right)</string>
    <string name="listview_alpha">Alpha</string>
    <string name="listview_scale">Scale</string>
    <string name="listview_stack_top">Stack (top)</string>
    <string name="listview_stack_bottom">Stack (bottom)</string>
    <string name="listview_unfold">Unfold</string>
    <string name="listview_fold">Fold</string>
    <string name="listview_translate_left">Translate (left)</string>
    <string name="listview_translate_right">Translate (right)</string>
    <string name="listview_rotate">Rotate</string>
    <string name="listview_interpolator_title">ListView interpolator</string>
    <string name="listview_accelerate_interpolator">Accelerate</string>
    <string name="listview_decelerate_interpolator">Decelerate</string>
    <string name="listview_accelerate_decelerate_interpolator">Accelerate decelerate</string>
    <string name="listview_anticipate_interpolator">Anticipate</string>
    <string name="listview_overshoot_interpolator">Overshoot</string>
    <string name="listview_anticipate_overshoot_interpolator">Anticipate overshoot</string>
    <string name="listview_bounce_interpolator">Bounce</string>
</resources>
3. Settings.apk\res\xml\system_ui_settings.xml
add this line
Code:
<PreferenceScreen android:title="@string/listview_animation_title" android:key="listview_animation_settings" android:fragment="com.android.settings.adi.ListViewSettings" />
this is the example :
Code:
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen android:title="@string/system_interface_title"
  xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
    <PreferenceScreen android:title="@string/status_bar_title" android:key="status_bar" android:fragment="com.android.settings.cyanogenmod.StatusBar" />
    <PreferenceScreen android:title="@string/quick_settings_panel_title" android:key="quick_settings_panel" android:fragment="com.android.settings.quicksettings.QuickSettings" />
    <PreferenceScreen android:title="@string/notification_drawer_title" android:key="notification_drawer" android:fragment="com.android.settings.cyanogenmod.NotificationDrawer" />
    <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" />
        <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>
    <Preference android:key="touch_screen_gesture_settings">
        <intent android:targetPackage="com.cyanogenmod.settings.device" android:action="com.cyanogenmod.action.LAUNCH_TOUCHSCREEN_GESTURE_SETTINGS" android:targetClass="com.cyanogenmod.settings.device.TouchscreenGestureSettings" />
    </Preference>
    <PreferenceScreen android:title="@string/listview_animation_title" android:key="listview_animation_settings" android:fragment="com.android.settings.adi.ListViewSettings" />
    <PreferenceScreen android:title="@string/ram_bar" android:key="recents_panel" android:fragment="com.android.settings.adi.RecentsPanelSettings" />
    <PreferenceCategory android:title="@string/navigation_bar_category">
        <CheckBoxPreference android:title="@string/navbar_enable_bar" android:key="enable_nav_bar" android:summary="@string/navbar_enable_bar_summary" android:defaultValue="true" />
        <PreferenceScreen android:title="@string/navbar_style_dimen_title" android:key="navbar_dimen_settings" android:dependency="enable_nav_bar" android:fragment="com.android.settings.adi.NavbarDimenSettings" />
        <PreferenceScreen android:title="@string/navigation_bar_title" android:key="navigation_bar" android:dependency="enable_nav_bar" android:fragment="com.android.settings.cyanogenmod.NavBar" />
        <PreferenceScreen android:title="@string/navigation_ring_title" android:key="navigation_ring" android:dependency="enable_nav_bar" android:fragment="com.android.settings.cyanogenmod.NavRing" />
        <com.android.settings.cyanogenmod.SystemSettingCheckBoxPreference android:title="@string/navigation_bar_left_title" android:key="navigation_bar_left" android:summary="@string/navigation_bar_left_summary" android:dependency="enable_nav_bar" android:defaultValue="false" />
    </PreferenceCategory>
    <PreferenceCategory android:title="@string/hw_keys_title" android:key="hw_keys_on_navbar">
        <CheckBoxPreference android:title="@string/key_back_enabled" android:key="key_back_enabled" android:defaultValue="true" />
        <CheckBoxPreference android:title="@string/key_menu_enabled" android:key="key_menu_enabled" android:defaultValue="true" />
        <CheckBoxPreference android:title="@string/key_home_enabled" android:key="key_home_enabled" android:defaultValue="true" />
    </PreferenceCategory>
</PreferenceScreen>
4. Download attached file and merge to your decompiled Settings.apk, done and recompile it

5. Decompile the newly Recompiled APK again
- Next go to res/values/public.xml
open it with Notepad++
search for this line
Code:
<public type="xml" name="adi_mokee_listview_animations" id="??????????" />
and pay attention to this ??????????

leave it, but keep it open

6. from the second decompiled Settings.apk , go to Settings.apk\smali\com\android\settings\adi\ListVi ewSettings.smali
search for this line
Code:
const v6, 0x7f050076
change this ids value 0x7f050076 in the smali
from here
Code:
<public type="xml" name="adi_mokee_listview_animations" id="??????????" />
7. Done and recompile your settings.apk
Attached Files
File Type: zip ListView_Settings.apk.zip - [Click for QR Code] (3.1 KB, 888 views)
Last edited by Adi Aisiteru Reborn; 18th March 2014 at 09:38 AM.
The Following 25 Users Say Thank You to Adi Aisiteru Reborn For This Useful Post: [ View ]
18th March 2014, 09:24 AM   |  #2  
Adi Aisiteru Reborn's Avatar
OP Senior Member
Flag Bandar Lampung
Thanks Meter: 4,579
 
1,666 posts
Join Date:Joined: Apr 2013
framework.jar

1. Decompile your CM11 framework.jar
go to framework.jar\classout\android\widget\
remove all AbsListView.smali and its subs file
replace them with attached file

2. Decompile your CM11 framework-res.apk
go to \framework-res.apk\res\values\public.xml
search for this lines :

Code:
<public type="attr" name="absListViewStyle" id="0x010?????" />
Code:
<public type="style" name="Animation.TypingFilter" id="0x010?????" />
Code:
<public type="style" name="Animation.TypingFilterRestore" id="0x010?????" />
Code:
<public type="layout" name="typing_filter" id="0x010?????" />
Code:
<public type="drawable" name="list_selector_background" id="0x010?????" />
Code:
<public type="anim" name="accelerate_interpolator" id="0x010?????" />
Code:
<public type="anim" name="decelerate_interpolator" id="0x010?????" />
Code:
<public type="anim" name="accelerate_decelerate_interpolator" id="0x010?????" />
Code:
<public type="anim" name="anticipate_interpolator" id="0x010?????" />
Code:
<public type="anim" name="overshoot_interpolator" id="0x010?????" />
Code:
<public type="anim" name="anticipate_overshoot_interpolator" id="0x010?????" />
Code:
<public type="anim" name="bounce_interpolator" id="0x010?????" />
pay attention to the red highlight the last 5 digits of each line 0x010?????


3. open AbsListView.smali file I gave
and search for this
- const v0, 0x101006a
change the last 5 digits ids 1006a in the smali according to your own have in
Code:
<public type="attr" name="absListViewStyle" id="0x010?????" />
do it too to all of line below
- const v2, 0x10301ed
Code:
<public type="style" name="Animation.TypingFilter" id="0x010?????" />
- const v2, 0x10301ee
Code:
<public type="style" name="Animation.TypingFilterRestore" id="0x010?????" />
- const v1, 0x10900b8
Code:
<public type="layout" name="typing_filter" id="0x010?????" />
- const v1, 0x1080062
Code:
<public type="drawable" name="list_selector_background" id="0x010?????" />
- const v2, 0x10a0005
Code:
<public type="anim" name="accelerate_interpolator" id="0x010?????" />
- const v2, 0x10a0006
Code:
<public type="anim" name="decelerate_interpolator" id="0x010?????" />
- const v2, 0x10a0004
Code:
<public type="anim" name="accelerate_decelerate_interpolator" id="0x010?????" />
- const v2, 0x10a0007
Code:
<public type="anim" name="anticipate_interpolator" id="0x010?????" />
- const v2, 0x10a0008
Code:
<public type="anim" name="overshoot_interpolator" id="0x010?????" />
- const v2, 0x10a0009
Code:
<public type="anim" name="anticipate_overshoot_interpolator" id="0x010?????" />
- const v2, 0x10a000a
Code:
<public type="anim" name="bounce_interpolator" id="0x010?????" />
4. Done and compile your framework.jar
Attached Files
File Type: zip ListView_framework.jar.zip - [Click for QR Code] (92.4 KB, 791 views)
Last edited by Adi Aisiteru Reborn; 18th March 2014 at 09:34 AM.
The Following 14 Users Say Thank You to Adi Aisiteru Reborn For This Useful Post: [ View ]
18th March 2014, 09:25 AM   |  #3  
Adi Aisiteru Reborn's Avatar
OP Senior Member
Flag Bandar Lampung
Thanks Meter: 4,579
 
1,666 posts
Join Date:Joined: Apr 2013
That's it, have a nice moding

good luck

Screenshot
youtube : http://youtu.be/y_dhcNnueB8
Attached Thumbnails
Click image for larger version

Name:	Screenshot_2014-03-18-14-27-41.png
Views:	1334
Size:	35.7 KB
ID:	2636572   Click image for larger version

Name:	Screenshot_2014-03-18-14-27-57.png
Views:	1308
Size:	47.5 KB
ID:	2636573   Click image for larger version

Name:	Screenshot_2014-03-18-14-28-10.png
Views:	1103
Size:	49.9 KB
ID:	2636574   Click image for larger version

Name:	Screenshot_2014-03-18-14-41-57.png
Views:	1072
Size:	74.7 KB
ID:	2636595  
Last edited by Adi Aisiteru Reborn; 18th March 2014 at 09:42 AM.
The Following 3 Users Say Thank You to Adi Aisiteru Reborn For This Useful Post: [ View ]
18th March 2014, 09:25 AM   |  #4  
Adi Aisiteru Reborn's Avatar
OP Senior Member
Flag Bandar Lampung
Thanks Meter: 4,579
 
1,666 posts
Join Date:Joined: Apr 2013
Attention !

if you guys, having such of problem when compiling , try to use this smali file http://forum.xda-developers.com/show...2&postcount=14

credit to @lacoursiere18

don't forget to press his thanks button
Last edited by Adi Aisiteru Reborn; 20th March 2014 at 12:13 AM.
The Following 4 Users Say Thank You to Adi Aisiteru Reborn For This Useful Post: [ View ]
18th March 2014, 09:47 AM   |  #5  
dugeriss's Avatar
Senior Member
Flag Gunung Pati,Semarang
Thanks Meter: 220
 
224 posts
Join Date:Joined: Apr 2013
More
fertamax!!

hope work jb 4.1 om
Last edited by dugeriss; 18th March 2014 at 09:50 AM.
The Following User Says Thank You to dugeriss For This Useful Post: [ View ]
18th March 2014, 09:55 AM   |  #6  
Adi Aisiteru Reborn's Avatar
OP Senior Member
Flag Bandar Lampung
Thanks Meter: 4,579
 
1,666 posts
Join Date:Joined: Apr 2013
Quote:
Originally Posted by dugeriss

fertamax!!

hope work jb 4.1 om

if the framework jar smali file doesn't work on JB 4.1 .
try to use file from my JB 4.2/CM10.1 rom http://forum.xda-developers.com/show....php?t=2584348
18th March 2014, 09:59 AM   |  #7  
Adi Aisiteru Reborn's Avatar
OP Senior Member
Flag Bandar Lampung
Thanks Meter: 4,579
 
1,666 posts
Join Date:Joined: Apr 2013
also for non CyanogenMod 11, if you dont have
Settings.apk\res\xml\system_ui_settings.xml

you can put the line in other xml , eg.
display_settings.xml
system_settings.xml
etc
The Following User Says Thank You to Adi Aisiteru Reborn For This Useful Post: [ View ]
18th March 2014, 10:14 AM   |  #8  
D2Y aka E's Avatar
Senior Member
Flag muara wahau (borneo)
Thanks Meter: 52
 
262 posts
Join Date:Joined: Feb 2014
More
in doing comparisons of beanning v2 rom this can be anything not host
18th March 2014, 11:35 AM   |  #9  
Junior Member
Flag Jakarta
Thanks Meter: 1
 
13 posts
Join Date:Joined: May 2011
Thumbs up
I hope it will work at cm11 Gt-I9082 bro..
18th March 2014, 12:50 PM   |  #10  
Rhievaldo's Avatar
Recognized Contributor
Flag Gresik
Thanks Meter: 1,851
 
800 posts
Join Date:Joined: Jun 2013
More
Good job bro.... i think you should get Recognized Themer..

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

Advanced Search
Display Modes