Toast Animations with Icon For LP/MM

Guide Toast Animations With Icon by Jerson (Jersnet OS)



Download these files

Merge All Files that Give on the Guide

 Decompile framework-res.a pk

Open res/values/styles.xml

Add this codes before </resources>
<style name="Animation.Toast.Fade" parent="@style/Animation.Toast">
        <item name="windowEnterAnimation">@anim/fade_in</item>
        <item name="windowExitAnimation">@anim/fade_out</item>
    </style>
    <style name="Animation.Toast.SlideRight" parent="@style/Animation.Toast">
        <item name="windowEnterAnimation">@anim/slide_in_right</item>
        <item name="windowExitAnimation">@anim/slide_out_right</item>
    </style>
    <style name="Animation.Toast.SlideLeft" parent="@style/Animation.Toast">
        <item name="windowEnterAnimation">@anim/slide_in_left</item>
        <item name="windowExitAnimation">@anim/slide_out_left</item>
    </style>
    <style name="Animation.Toast.Xylon" parent="@style/Animation.Toast">
        <item name="windowEnterAnimation">@anim/xylon_toast_enter</item>
        <item name="windowExitAnimation">@anim/xylon_toast_exit</item>
    </style>
    <style name="Animation.Toast.Toko" parent="@style/Animation.Toast">
        <item name="windowEnterAnimation">@anim/toko_toast_enter</item>
        <item name="windowExitAnimation">@anim/toko_toast_exit</item>
    </style>
    <style name="Animation.Toast.Tn" parent="@style/Animation.Toast">
        <item name="windowEnterAnimation">@anim/tn_toast_enter</item>
        <item name="windowExitAnimation">@anim/tn_toast_exit</item>
    </style>
    <style name="Animation.Toast.Honami" parent="@style/Animation.Toast">
        <item name="windowEnterAnimation">@anim/honami_toast_enter</item>
        <item name="windowExitAnimation">@anim/honami_toast_exit</item>
    </style>
    <style name="Animation.Toast.FastFade" parent="@style/Animation.Toast">
        <item name="windowEnterAnimation">@anim/fast_fade_in</item>
        <item name="windowExitAnimation">@anim/fast_fade_out</item>
    </style>
    <style name="Animation.Toast.GrowFade" parent="@style/Animation.Toast">
        <item name="windowEnterAnimation">@anim/grow_fade_in</item>
        <item name="windowExitAnimation">@anim/fast_fade_out</item>
    </style>
    <style name="Animation.Toast.GrowFadeCenter" parent="@style/Animation.Toast">
        <item name="windowEnterAnimation">@anim/grow_fade_in_center</item>
        <item name="windowExitAnimation">@anim/fast_fade_out</item>
    </style>
    <style name="Animation.Toast.Translucent" parent="@style/Animation.Toast">
        <item name="windowEnterAnimation">@anim/translucent_enter</item>
        <item name="windowExitAnimation">@anim/translucent_exit</item>
    </style>
    <style name="Animation.Toast.GrowFadeBottom" parent="@style/Animation.Toast">
        <item name="windowEnterAnimation">@anim/grow_fade_in_from_bottom</item>
        <item name="windowExitAnimation">@anim/fast_fade_out</item>
    </style>
--------------------------------------------------------------------------
Recompile-Decompile again..
open public.xml, and leave it opened

 Decompile framework.jar
 Open smali/android/widget/Toast$TN.smali
Replace id below with public.xml framework-res.apk

framework_dec/smali_classes2/android/widget/Toast$TN.smali (15 hits)
Line 97 :     const v1, 0x1030004    # type="style" name="Animation.Toast"
Line 301:     const v8, 0x1020006    # type="id" name="icon"
Line 525:     const v8, 0x1030004    # type="style" name="Animation.Toast"
Line 535:     const v8, 0x10304c3    # type="style" name="Animation.Toast.Fade"
Line 545:     const v8, 0x10304c4    # type="style" name="Animation.Toast.SlideRight"
Line 555:     const v8, 0x10304c5    # type="style" name="Animation.Toast.SlideLeft"
Line 565:     const v8, 0x10304c6    # type="style" name="Animation.Toast.Xylon"
Line 575:     const v8, 0x10304c7    # type="style" name="Animation.Toast.Toko"
Line 585:     const v8, 0x10304c8    # type="style" name="Animation.Toast.Tn"
Line 595:     const v8, 0x10304c9    # type="style" name="Animation.Toast.Honami"
Line 605:     const v8, 0x10304ca    # type="style" name="Animation.Toast.FastFade"
Line 615:     const v8, 0x10304cb    # type="style" name="Animation.Toast.GrowFade"
Line 625:     const v8, 0x10304cc    # type="style" name="Animation.Toast.GrowFadeCenter"
Line 635:     const v8, 0x10304ce    # type="style" name="Animation.Toast.GrowFadeBottom"
Line 645:     const v8, 0x10304cd    # type="style" name="Animation.Toast.Translucent"


Recompile - Sign - Push
----------------------------------------------------------------------------------------------------------------------------------------------------
3.Decompile Settings.apk

res/xml/Display_settings.xml or on your interface

-Add Line
<PreferenceScreen android:id="@+id/animation_settings" android:title="@string/animation_settings" android:fragment="com.android.settings.jersnet.AnimationSettings" />

--------------------------------------------------------------------------
res/values/strings.xml
add the following lines before </resources>

<string name="misc_settings_title"><b>Miscellaneous</b></string>
<string name="animation_settings"><b>Animations</b></string>
    <string name="toast_title"><b>Toast</b></string>
    <string name="toast_icon_title">Toast icon</string>
    <string name="toast_animation_title">Toast animations</string>
    <string name="toast_animation_summary">Select and preview system toast animation</string>
    <string name="toast_none_animation">None</string>
    <string name="toast_default_animation">Default</string>
    <string name="toast_fade_animation">Fade animation</string>
    <string name="toast_SlideRight_animation">Slide right</string>
    <string name="toast_SlideLeft_animation">Slide left</string>
    <string name="toast_Xylon_animation">Xylon animation</string>
    <string name="toast_Toko_animation">Toko animation</string>
    <string name="toast_Tn_animation">Tn animation</string>
    <string name="toast_Honami_animation">Honami animation</string>
    <string name="toast_FastFade_animation">Fast fade</string>
    <string name="toast_GrowFade_animation">Grow fade</string>
    <string name="toast_GrowFadeCenter_animation">Grow fade center</string>
    <string name="toast_GrowFadeBottom_animation">Grow fade bottom</string>
    <string name="toast_Translucent_animation">Translucent animation</string>
    <string name="animation_settings_title">Animations</string>
--------------------------------------------------------------------------
res/values/arrays.xml
add the following lines before </resources>

<string-array name="toast_animation_entries">
        <item>@string/toast_none_animation</item>
        <item>@string/toast_default_animation</item>
        <item>@string/toast_fade_animation</item>
        <item>@string/toast_SlideRight_animation</item>
        <item>@string/toast_SlideLeft_animation</item>
        <item>@string/toast_Xylon_animation</item>
        <item>@string/toast_Toko_animation</item>
        <item>@string/toast_Tn_animation</item>
        <item>@string/toast_Honami_animation</item>
        <item>@string/toast_FastFade_animation</item>
        <item>@string/toast_GrowFade_animation</item>
        <item>@string/toast_GrowFadeCenter_animation</item>
        <item>@string/toast_GrowFadeBottom_animation</item>
        <item>@string/toast_Translucent_animation</item>
    </string-array>
    <string-array name="toast_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>
        <item>12</item>
        <item>13</item>
    </string-array>
--------------------------------------------------------------------------
Settings.apk\smali\com\android\settings
SettingsPreferenceFragment.smali

-copy and paste the line below
.field protected mContext:Landroid/content/Context;

-right after
.field private mContentResolver:Landroid/content/ContentResolver;

--------------------------------------------------------------------------
-copy and paste this line
.line 93
    invoke-virtual {p0}, Lcom/android/settings/SettingsPreferenceFragment;->getActivity()Landroid/app/Activity;

    move-result-object v1

    invoke-virtual {v1}, Landroid/app/Activity;->getApplicationContext()Landroid/content/Context;

    move-result-object v1

    iput-object v1, p0, Lcom/android/settings/SettingsPreferenceFragment;->mContext:Landroid/content/Context;

.line 94
    invoke-virtual {p0}, Lcom/android/settings/SettingsPreferenceFragment;->getActivity()Landroid/app/Activity;

    move-result-object v2

    invoke-virtual {v2}, Landroid/app/Activity;->getApplicationContext()Landroid/content/Context;

    move-result-object v2

    iput-object v2, p0, Lcom/android/settings/SettingsPreferenceFragment;->mContext:Landroid/content/Context;

-right after
    invoke-super {p0, p1}, Landroid/preference/PreferenceFragment;->onCreate(Landroid/os/Bundle;)V
--------------------------------------------------------------------------

Note: if you have FC Just Compare The Code for Correct Lines Codes

Recompile,Decompile
Open smali/com/android/settings/jersnet/AnimationSettings.smali
Replace id below conform with public.xml
const v1, 0x7f06006c public type="xml" name="jersnet_animation_settings" id="
Recompile - Sign - Push

Credits
- Jerson (For Making This Guide)
- Jersnet OS (Source Code)
- Ressurection Remix (For Code)
- You..!! (For Applying This Mods)

Post a Comment

0 Comments