您的位置:首页 > 移动开发 > Android开发

android系统特效详解和修改方法

2014-10-16 14:04 507 查看
安卓系统特效相关文件: 存在于:framework-res.apk 反编译后的\framework-res\res\anim文件夹内!
anim文件夹下所有的文件都是特效文件
原理 反编译framework-res.apk 替换anim文件夹下的文件达到修改特效的目的!
然后再重建framework-res.apk替换到手机,修改权限重启

特效文件名称.xml 对应的相关特效

fade_out 最近任务 下滑状态栏的日期 移除

fade_in 最近任务 下滑状态栏的日期 移除

status_bar_enter 状态栏 移除

status_bar_exitr 状态栏 弹出

wallpaper_open_exit 应用程序退出 前一个页面 移除

wallpaper_open_ente 应用程序退出 前一个页面 弹出

wallpaper_close_exie 应用程序打开 前一个页面 移除

wallpaper_close_enter 应用程序打开 后一个页面 弹出

options_panel_exi 选项菜单 移除

options_panel_enter 选项菜单 弹出

translucent_exit 文本选择光标 移除

translucent_enter 文本选择光标 弹出

toast_exit 提示窗口 移除

toast_enter 提示窗口 弹出

input_method_exit 输入法面板 移除

input_method_enter 输入法面板 弹出

lock_screen_exit 解锁时锁屏窗口 移除

activity_open_exit 活动 退出 前一个页面移除

activity_open_ente 活动 退出 前一个页面进入

activity_close_exit 活动 打开 前一个页面移除

activity_close_enter 活动 打开 前一个页面进入

dialog_exit 窗口 移除

dialog_enter 窗口 弹出

1.反编译framework-res.apk
1.打开你需要修改的特效文件(我随便打开一个)可以看到一下代码
<?xml version="1.0" encoding="utf-8"?>
<set android:interpolator="@anim/decelerate_interpolator"
xmlns:android="http://schemas.android.com/apk/res/android">
<translate android:duration="150" android:fromYDelta="0.0%" android:toYDelta="-100.0" />
<scale android:duration="100" android:pivotX="50.0%" android:pivotY="50.0%" android:startOffset="200" android:fromXScale="1.0" android:toXScale="0.05" android:fromYScale="1.0" android:toYScale="1.0" />
</set>

复制代码
3.看上面代码的这一句!
android:duration="150"
这一句代码的 150 就代表这个特效持续的时间! 数值越小,速度越快!!

但是,不是所有的android:duration=后面都是数字! 有可能是这种!!
android:duration="@integer/config_shortAnimTime"
这个就是说它持续的时间引用了integer中的 config_shortAnimTime的值
像这种就有两中修改的方法!
1;直接把
android:duration="@integer/config_shortAnimTime"
修改为
android:duration="150"
数字150 可以自定!!

2;打开\framework-res\res\values\integers.xml文件
找到这句
<integer name="config_shortAnimTime">100</integer>
修改这句对应的数值就可以了
注意,第二种方法会修改所有引用integer的特效!!
这样也可以用于修改全局特效速度!!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: