[Android Themes] lacoursiere18:
Hi guys,

I would like to share a Mod/Animations that I ported from PAC man ROM.. This will enable a IME(Keyboard) Animations and you will be able to test them and change them on the fly!!

This was originally done on the VZW NOTE 2, if you wish to use my files for another phone/brand go right ahead, just PLEASE credit the people i did!

This mod will enable your keyboard to have all different types of Enter and Exit Animations, along with different animations for the Interpolator and speed of the animation..

Here is a video of what I mean..

[YOUTUBE]HqeoocgBFyA&feature[/YOUTUBE]​

I started looking into this bc I thought it was a pretty cool feature. I want to remind you that this is NOT my work. I DID NOT create these animations..All I did was port them over to TW 4.3 to make them work:laugh:

Anyone is able to use this mod, just please give proper credit to Devs of PAC Man ROM & Xylon ROM, [MENTION=5402474]zst123[/MENTION] for open source XUI MOD Xposed Module and me if you want ;)

ALSO I want to give a BIG THANKS to:

[MENTION=4041997]dwitherell[/MENTION] - for always being there to help and for a sounding bored (LOLLL)

[MENTION=4986903]Deckoz2302[/MENTION] - you already know

[MENTION=3053298]Stryke_the_Orc[/MENTION] - logcat thread and a 2nd eye

And too everyone else whos guides I've used to teach me and all the things I know now and am planning to learn along the way

WARNING!!! THIS IS GUIDE IS NOT FOR NOVICE USERS/MODDERS/THEMERS ETC...THERE ARE A LOT OF EDITS IN RES FOLDERS AND SMALI!! IF YOU GET STOCK PLEASE PLEASE POST A LOG OR THE ERROR! I WILL TRY TO BE AS NOOB FRIENDLY AS POSSIBLE BUT THIS IS NOT A NOOB GUIDE/MOD!

PS:This guide may not be PERFECT.. There maybe somethings that I added that this mod may not need..or use.. But i added them for the sake of not missing anything..So if you see something and are like "Why did he add those ids, strings, layouts etc" WHATEVER..Just ignore it or don't use them.. I will try to be as accurate as possible.

So let's begin..

What you'll need:

Note Pad++

Apktool and knowledge on how to read errors

framework-res.apk

SecSettings.apk

framework.jar

PATIENCE

Let's start with SecSettings, decompile it goto res/values..

strings.xml add these:

<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_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>
<string name="listview_cycle_interpolator">Cycle</string>
<string name="listview_linear_interpolator">Linear</string>
<string name="animation_default">Default</string>
<string name="animation_fade">Fade</string>
<string name="animation_slide_right">Slide in right</string>
<string name="animation_slide_left">Slide in left</string>
<string name="animation_slide_right_no_fade">Slide in right (No fade)</string>
<string name="animation_slide_left_no_fade">Slide in left (No fade)</string>
<string name="animation_slide_up">Slide in bottom</string>
<string name="animation_slide_down">Slide in top</string>
<string name="animation_translucent">Translucent</string>
<string name="animation_grow_shrink">Grow in (Top)</string>
<string name="animation_grow_shrink_center">Grow in (Center)</string>
<string name="animation_grow_shrink_bottom">Grow in (Bottom)</string>
<string name="animation_grow_shrink_left">Grow in (Left)</string>
<string name="animation_grow_shrink_right">Grow in (Right)</string>
<string name="ime_animation_title">IME animations</string>
<string name="ime_animation_summary">Set keyboard animations</string>
<string name="ime_animation_test_title">Test IME Animation Here</string>
<string name="ime_enter_animation_title">Enter Animation</string>
<string name="ime_exit_animation_title">Exit Animation</string>
<string name="ime_interpolator_title">Interpolator</string>
<string name="ime_duration_title">IME Duration</string>
<string name="animation_duration_title">Animation duration</string>
<string name="animation_duration_summary">Set duration</string>
<string name="animation_settings_reset_message">Reset all animation settings to default?</string>

Save..

ids.xml add these:

<item type="id" name="seekBarPrefUnitsRight">false</item>
<item type="id" name="seekBarPrefValue">false</item>
<item type="id" name="seekBarPrefUnitsLeft">false</item>
<item type="id" name="seekBarPrefBarContainer">false</item>

Save..

arrays.xml add these:

<string-array name="listview_animation_entries">
<item [MENTION=251364]Str[/MENTION]ing/listview_off</item>
<item [MENTION=251364]Str[/MENTION]ing/listview_wave_left</item>
<item [MENTION=251364]Str[/MENTION]ing/listview_wave_right</item>
<item [MENTION=251364]Str[/MENTION]ing/listview_scale</item>
<item [MENTION=251364]Str[/MENTION]ing/listview_alpha</item>
<item [MENTION=251364]Str[/MENTION]ing/listview_stack_top</item>
<item [MENTION=251364]Str[/MENTION]ing/listview_stack_bottom</item>
<item [MENTION=251364]Str[/MENTION]ing/listview_unfold</item>
<item [MENTION=251364]Str[/MENTION]ing/listview_fold</item>
<item [MENTION=251364]Str[/MENTION]ing/listview_translate_left</item>
<item [MENTION=251364]Str[/MENTION]ing/listview_translate_right</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>
</string-array>
<string-array name="listview_interpolator_entries">
<item [MENTION=251364]Str[/MENTION]ing/listview_off</item>
<item [MENTION=251364]Str[/MENTION]ing/listview_accelerate_interpolator</item>
<item [MENTION=251364]Str[/MENTION]ing/listview_decelerate_interpolator</item>
<item [MENTION=251364]Str[/MENTION]ing/listview_accelerate_decelerate_interpolator</item>
<item [MENTION=251364]Str[/MENTION]ing/listview_anticipate_interpolator</item>
<item [MENTION=251364]Str[/MENTION]ing/listview_overshoot_interpolator</item>
<item [MENTION=251364]Str[/MENTION]ing/listview_anticipate_overshoot_interpolator</item>
<item [MENTION=251364]Str[/MENTION]ing/listview_bounce_interpolator</item>
<item [MENTION=251364]Str[/MENTION]ing/listview_cycle_interpolator</item>
<item [MENTION=251364]Str[/MENTION]ing/listview_linear_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>
<item>8</item>
<item>9</item>
</string-array>
<string-array name="anim_controls_entries">
<item [MENTION=251364]Str[/MENTION]ing/animation_default</item>
<item [MENTION=251364]Str[/MENTION]ing/animation_fade</item>
<item [MENTION=251364]Str[/MENTION]ing/animation_slide_right</item>
<item [MENTION=251364]Str[/MENTION]ing/animation_slide_left</item>
<item [MENTION=251364]Str[/MENTION]ing/animation_slide_right_no_fade</item>
<item [MENTION=251364]Str[/MENTION]ing/animation_slide_left_no_fade</item>
<item [MENTION=251364]Str[/MENTION]ing/animation_slide_up</item>
<item [MENTION=251364]Str[/MENTION]ing/animation_slide_down</item>
<item [MENTION=251364]Str[/MENTION]ing/animation_translucent</item>
<item [MENTION=251364]Str[/MENTION]ing/animation_grow_shrink</item>
<item [MENTION=251364]Str[/MENTION]ing/animation_grow_shrink_center</item>
<item [MENTION=251364]Str[/MENTION]ing/animation_grow_shrink_bottom</item>
<item [MENTION=251364]Str[/MENTION]ing/animation_grow_shrink_left</item>
<item [MENTION=251364]Str[/MENTION]ing/animation_grow_shrink_right</item>
</string-array>
<string-array name="anim_controls_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>

Save..

attrs.xml add these:

<attr name="interval" format="integer" />
<attr name="unitsLeft" format="reference|string" />
<attr name="unitsRight" format="reference|string" />
<attr name="maximum" format="integer" />
<attr name="minimum" format="integer" />

Save..

Now go to res/xml/ and where ever you want to add the preference screen to change the animations.. I added it to a xml that we (N3bula) have specifically for keyboard mods..Add this line

<PreferenceScreen android:title= [MENTION=251364]Str[/MENTION]ing/ime_animation_title" android:key="interface_animation_scroll" android:summary= [MENTION=251364]Str[/MENTION]ing/ime_animation_summary" android:fragment="com.android.settings.pac.KeyboardAnimationInterfaceSettings" />

Goto android/settings/SubSettings.smali

Search

.method public constructor

add this below .end method

.method private popFragment()Z
.locals 2

.prologue
.line 46
invoke-virtual {p0}, Lcom/android/settings/SubSettings;->getFragmentManager()Landroid/app/FragmentManager;

move-result-object v0

.line 47
.local v0, "fm":Landroid/app/FragmentManager;
invoke-virtual {v0}, Landroid/app/FragmentManager;->getBackStackEntryCount()I

move-result v1

if-lez v1, :cond_0

.line 48
invoke-virtual {v0}, Landroid/app/FragmentManager;->popBackStack()V

.line 49
const/4 v1, 0x1

.line 51
:goto_0
return v1

:cond_0
const/4 v1, 0x0

goto :goto_0
.end method

Then search

# virtual methods

Add this below it:

.method protected isValidFragment(Ljava/lang/String;)Z
.locals 3
.param p1, "fragmentName" # Ljava/lang/String;

.prologue
.line 41
const-string v0, "SubSettings"

new-instance v1, Ljava/lang/StringBuilder;

invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

const-string v2, "Launching fragment "

invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

move-result-object v1

invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

move-result-object v1

invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

move-result-object v1

invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

.line 42
const/4 v0, 0x1

return v0
.end method

Find

.method public onNavigateUp()Z

Add blue:

.method public onNavigateUp()Z
.locals 1

.prologue
.line 27
[COLOR="Blue"]invoke-direct {p0}, Lcom/android/settings/SubSettings;->popFragment()Z

move-result v0

if-nez v0, :cond_0
[/COLOR]
invoke-virtual {p0}, Lcom/android/settings/SubSettings;->finish()V

.line 28
[COLOR="blue"]:cond_0[/COLOR]
const/4 v0, 0x1

return v0
.end method

Now extract the zip below and add all the contents to their respected folders..

SecSettings.zip

Once you have them in place compile the apk, then decompile it so you can pull your new public id's in res/values/public.xml

Here is my public.xml please go through all the smali you added and search for all the 0x7******* (public ids) When you find one search my public.xml for it, find the name, then search your NEW public.xml for that name and id. Then change the id to YOUR NEW ONE. (Please if you don't understand how to do this, then this mod is NOT for you..either that or you need to search and find out what I am talking about. I will not post every id with the name bc there are A LOT)

Now moving on, framework-res.apk, decompile it...go to res/arrays add these..

<string-array name="anim_controls_entries">
<item [MENTION=251364]Str[/MENTION]ing/animation_default</item>
<item [MENTION=251364]Str[/MENTION]ing/animation_fade</item>
<item [MENTION=251364]Str[/MENTION]ing/animation_slide_right</item>
<item [MENTION=251364]Str[/MENTION]ing/animation_slide_left</item>
<item [MENTION=251364]Str[/MENTION]ing/animation_slide_right_no_fade</item>
<item [MENTION=251364]Str[/MENTION]ing/animation_slide_left_no_fade</item>
<item [MENTION=251364]Str[/MENTION]ing/animation_slide_up</item>
<item [MENTION=251364]Str[/MENTION]ing/animation_slide_down</item>
<item [MENTION=251364]Str[/MENTION]ing/animation_translucent</item>
<item [MENTION=251364]Str[/MENTION]ing/animation_grow_shrink</item>
<item [MENTION=251364]Str[/MENTION]ing/animation_grow_shrink_center</item>
<item [MENTION=251364]Str[/MENTION]ing/animation_grow_shrink_bottom</item>
<item [MENTION=251364]Str[/MENTION]ing/animation_grow_shrink_left</item>
<item [MENTION=251364]Str[/MENTION]ing/animation_grow_shrink_right</item>
</string-array>
<string-array name="anim_controls_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>

Save..

Then go to res/strings.xml add these:

<string name="animation_fade">Fade</string>
<string name="animation_slide_right">Slide in right</string>
<string name="animation_slide_left">Slide in left</string>
<string name="animation_slide_right_no_fade">Slide in right (No fade)</string>
<string name="animation_slide_left_no_fade">Slide in left (No fade)</string>
<string name="animation_slide_up">Slide in bottom</string>
<string name="animation_slide_down">Slide in top</string>
<string name="animation_default">Default</string>
<string name="animation_translucent">Translucent</string>
<string name="animation_grow_shrink">Grow in (Top)</string>
<string name="animation_grow_shrink_center">Grow in (Center)</string>
<string name="animation_grow_shrink_bottom">Grow in (Bottom)</string>
<string name="animation_grow_shrink_left">Grow in (Left)</string>
<string name="animation_grow_shrink_right">Grow in (Right)</string>
<string name="action_null">Blank</string>

Save..

Now extract the zip below and add them in their respected folder(s)..

framework-res.zip

Compile it and then decompile it, you will need to generate a new public.xml for framework.jar which is the next step..

Goto POST#2