今天翻了下墙,解决了一直以来的疑惑问题:

为什么Android5.0以及6.0的recovery版本,机器人动画怎么就只有一张图片?

这个问题,我百思不得其解,看了很多网文,也只是有了个概念。

请参考以下文档,这是我从谷歌Android开源网拉下来的原文:

https://source.android.com/devices/tech/ota/device_code

Recovery UI images

Android 5.x

The recovery user interface consists images. Ideally, users never interact with the UI: During a normal update, the phone boots into recovery, fills the installation progress bar, and boots back into the new system without input from the user. In the event of a system update problem, the only user action that can be taken is to call customer care.

An image-only interface obviates the need for localization. However, as of Android 5.x the update can display a string of text (e.g. "Installing system update...") along with the image. For details, see Localized recovery text.

The installing animation is represented as a single PNG image with different frames of the animation interlaced by row (which is why Figure 2 appears squished). For example, for a 200x200 seven-frame animation, create a single 200x1400 image where first frame is rows 0, 7, 14, 21, ...; the second frame is rows 1, 8, 15, 22, ...; etc. The combined image includes a text chunk that indicates the number of animation frames and the number of frames per second (FPS). The toolbootable/recovery/interlace-frames.pytakes a set of input frames and combines them into the necessary composite image used by recovery.

efault images are available in different densities and are located inbootable/recovery/res$DENSITY/images(e.g.,bootable/recovery/res-hdpi/images). To use a static image during installation, you need only provide the icon_installing.png image and set the number of frames in the animation to 0 (the error icon is not animated; it is always a static image).

以上文档意思就是说,Android5.x以上的版本,机器人的动画是PNG图片和帧动画组成的,我们可以使用recovery目录下的interlace-frames.py这个python脚本来进行合成,具体的合成方法可以参考这位新浪网友的文章,亲身试过,问题已经解决,那么,既然可以这么来合成,我就可以把android原生态的动画给换了,因为这个机器人实在是丑。

Android 4.x and earlier

The Android 4.x and earlier recovery UI uses the error image (shown above) and the installing animation plus several overlay images:

During installation, the on-screen display is constructed by drawing the icon_installing.png image, then drawing one of the overlay frames on top of it at the proper offset. Here, a red box is superimposed to highlight where the overlay is placed on top of the base image:

Subsequent frames are displayed by drawing only the next overlay image atop what's already there; the base image is not redrawn.

The number of frames in the animation, desired speed, and x- and y-offsets of the overlay relative to the base are set by member variables of the ScreenRecoveryUI class. When using custom images instead of default images, override the Init() method in your subclass to change these values for your custom images (for details, see ScreenRecoveryUI). The script bootable/recovery/make-overlay.py can assist in converting a set of image frames to the "base image + overlay images" form needed by recovery, including computing of the necessary offsets.

Default images are located in bootable/recovery/res/images. To use a static image during installation, you need only provide the icon_installing.png image and set the number of frames in the animation to 0 (the error icon is not animated; it is always a static image).

上面说了这么多,其实也是把这上面的图片通过make-overlay.py这个python脚本来对4.x以及早期版本的android recovery的图片进行合成,中间让我们看到的转转转那个overlay的效果就是上面这些组图合成的,合成最终的图片存放在bootable/recovery/res/images这个路径下。

android 机器人动画,Android 5.X与Android4.X版本机器人动画的区别以及制作动画的方法...相关推荐

  1. 前端制作动画的几种方式(css3,js)

    制作动态的网页是是前端工程师必备的技能,很好的实现动画能够极大的提高用户体验,增强交互效果,那么动画有多少实现方式,一直对此有选择恐惧症的我就总结一下,以便在开发的时候选择最好的实现方式. 1.css ...

  2. HTML设置页面动画效果有几种,前端制作动画的几种方式(css3,js)

    制作动态的网页是是前端工程师必备的技能,很好的实现动画能够极大的提高用户体验,增强交互效果,那么动画有多少实现方式,一直对此有选择恐惧症的我就总结一下,以便在开发的时候选择最好的实现方式. 1.css ...

  3. Unity中制作动画

    1.创建一个 Cube 模型 2. 点击 Window->Animation->Animation 按钮,打开动画编辑面板(快捷键Ctrl+6) 3. 点击 Create 按钮,保存新建的 ...

  4. android 缩放透明动画,Android之高仿QQ6.6.0侧滑效果(背景动画、透明+沉浸式状态栏、渐变效果)...

    根据需求实现类似QQ侧滑效果,之前看到过很多实现方式通过SlidingMenu,但是既然官方推出了自己的专属控件,那么使用DrawerLayout就是不二选择.且看下文. 一.先来看看官方文档解释 D ...

  5. android窗口退出动画,如何在Android中为弹出窗口制作动画

    PopupWindow自定义布局更方便,并且显示位置自由,没有任何限制.使用下面的代码并享受动画.在此动画中,使用底部滑入和滑出,但是您只能更改滑入/滑出动画,并根据您的动画对应用程序中的任何位置进行 ...

  6. android jason动画,Android 动画之Lottie动画使用

    Android 动画之Lottie动画使用 一:简介 Lottie是Airbnb开源的一套跨平台的完整解决方案,设计师只需要使用After Effects(简称AE)设计动画之后,使用Lottic提供 ...

  7. Android常用控件之Fragment仿Android4.0设置界面

    Fragment是Android3.0新增的概念,是碎片的意思,它和Activity很相像,用来在一个Activity中描述一些行为或部分用户界面:使用多个Fragment可以在一个单独的Activi ...

  8. Android图片褪色,Android – 使用Alpha褪色动画闪烁图片

    我一直在努力了几天,在这一切,终于刚决定问.它很简单我必须缺少一些非常基本的东西. 我有一个XML布局页面定义了一个图像.我有两个anim XML页面,一个将alpha从0更改为1,另一个从1更改为0 ...

  9. android activity跳转多次闪退_Android实现Activity和Fragment的跳转动画

    1.使用overridePendingTransition方法实现Activity跳转动画 botton_in <?xml version="1.0" encoding=&q ...

最新文章

  1. 计算机机房建设目标是什么,计算机机房建设方案计划.doc
  2. 【Pytorch】expand()用法==》扩展某个维度
  3. ajax前台转换json数据库,基于jQuery的ajax功能实现web service的json转化
  4. 求序列最长不下降子序列_树状数组解决最长不下降子序列 讲讲主要思路就好...
  5. 分享15款很棒的 JavaScript 开发工具
  6. MSChart 控件
  7. 2018华为软件精英大赛
  8. ios7禁止屏幕旋转,强制竖屏
  9. ul阻燃标准有几个等级_UL94阻燃等级介绍及常见误区分析
  10. 阿里云开发者藏品计划【阿里云飞天5K纪念碑】
  11. JAVA藏宝阁游戏交易系统计算机毕业设计Mybatis+系统+数据库+调试部署
  12. 最新引流脚本之窃语漂流瓶引流脚本,如何使用窃语脚本
  13. 《通关!游戏设计之道(continue...)》
  14. 2022年度软考考试时间表已公布
  15. 设计一可控同步四进制可逆计数器, 其由输入X1, X2控制, 用D触发器和74151及必要的门电路实现
  16. linux开启dhcpclient服务,dhcp client 配置
  17. md5sum命令的灵活运用
  18. ubuntu系统制作ext4格式U盘
  19. VtigerCRM收件箱邮件打开失败JSLBL_Failed_To_Open_Email
  20. alpha测试和beta测试Gamma测试的区别是什么?

热门文章

  1. 如何打通“鱼塘” ?腾讯启动“SaaS技术联盟” 共建技术中台
  2. 防水耐脏,超大容量双肩包,限时拼团仅需49元
  3. 不少人暗搓搓的准备春招了,我有一些好东东和招聘信息给你
  4. 与云原生及开源大神们的第二次亲密接触 | 全议程重磅发布
  5. java 不能使用foreach_为什么我不能在Java Enumeration上使用foreach?
  6. iostat命令详解_对iostat输出结果的理解
  7. oracle默认导出路径linux,传统路径导出 VS 直接路径导出(oracle exp direct=y)
  8. windows 开启telnet 功能
  9. linux 统计当前目录下文件或者文件夹的数量
  10. SpringMVC 集成 mybatisPlus