为此使用了什么样的动画?
任何熟悉模拟器的人都会知道,在加载阶段,AVD 的“屏幕”会显示“android”一词,如下图所示...
突出
显示(图像中的字母 DRO 上)从左到右“扫描”以充当不确定的进度指示器。
我不做太多图形工作,所以我不熟悉不同的动画技术。这种类型的动画常见吗?如果常见,它的名字是什么?
我想在我的主要活动的标题栏中实现类似的东西。打开时,它将对活动名称进行一次突出显示“扫描”。除了为用户体验添加一点“浮华”之外,没有任何真正的目的。
Anyone familiar with the emulator will know that during the loading phase the 'screen' of the AVD shows the word 'android' as in the image below...
The highlight (on the letters DRO in the image) 'scans' from left to right to act as an indeterminate progress indicator.
I don't do much graphics work so I'm not familiar with different animation techniques. Is that type of animation a common one and if so, what is it's name?
I'd like to implement something similar in my main activity's title bar. When opened, it would do a single highlight 'scan' of the activity name. No real purpose other than to add a bit of 'glitz' to the UX.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这很可能是一个位图动画(精灵动画)或两个图像,其中一个是放在顶部的效果层。
精灵动画只是放置一个预渲染的图像集,其中帧仅以指定的速率切换。
另一种选择是部分透明的蒙版,它在背景图像上从左到右进行动画处理。
为了说明第二点:
因此,您只需在背景图像上绘制蒙版,Alpha 混合就会处理剩下的事情。
最简单的方法可能是将 imageview 从 0-mask.width 的位置动画到 background.width+mask.width 的位置。
如果您希望蒙版更加动态,您可能需要生成并渲染它,例如在自定义视图中,在
onDraw
中将其绘制到画布上。如果使用 AnimationSet(或 Animator,具体取决于 Android 目标)将其与旋转结合起来,可以使效果更酷一些。
That is most likely a bitmap animation (sprite animation) or two images where one is the effect layer put on top.
A sprite animation is simply put a prerendered imageset where the frames are just switched at a specified rate.
The other alternative is a partly transparent mask that is animated over the background image from left to right.
To illustrate the second point:
So you simply draw the mask over the background image and alpha blending will take care of the rest.
The simplest way is probably to animate an imageview from a position that is 0-mask.width to a position that is background.width+mask.width.
If you want the mask to be more dynamic you will probably want to generate and render it for example in a custom view where you draw in
onDraw
to a canvas.You could make the effect a bit cooler if you combine it with a rotation using an AnimationSet (or Animator depending on Android target).