Gui*_*shh 37 android android-animation material-design
自5月以来,Google已在其网站上更新了材料设计指南.我在一个名为Feature discovery的新部分中看到了一个有趣而酷的设计模式.
我想实现动画"发现"导航抽屉按钮.导航抽屉和浮动操作按钮的最后一次Google Fit更新中有类似的动画.
通常,对于Android动画,Google提供了一个很棒且非常棒的UI指南,但是我们没有任何进一步的信息来为我们自己的应用程序开发它.
你知道是否有Android库的原生解决方案来实现这些动画?如果是,它是否适用于Android 5.0以下(API 21) - 它可以高于Android 4.1+?
编辑:我做了一个Github项目来实现相同的动画.你可以在这里找到它:https://github.com/Guimareshh/Feature-discovery-animations
谢谢 !
您需要制作自定义动画,否则您可以使用Ripple Effect + Reveal并将其设置为导航抽屉图标,
void enterReveal() {
// previously invisible view
final View myView = findViewById(R.id.my_view);
// get the center for the clipping circle
int cx = myView.getMeasuredWidth() / 2;
int cy = myView.getMeasuredHeight() / 2;
// get the final radius for the clipping circle
int finalRadius = Math.max(myView.getWidth(), myView.getHeight()) / 2;
// create the animator for this view (the start radius is zero)
Animator anim =
ViewAnimationUtils.createCircularReveal(myView, cx, cy, 0, finalRadius);
// make the view visible and start the animation
myView.setVisibility(View.VISIBLE);
anim.start();
}
Run Code Online (Sandbox Code Playgroud)
为了回答您的问题,Google 总是提供有趣的小部件组件的新示例。其中大多数只会添加到新版本的 Android 中。这有不同的原因。例如,因为新的小部件使用资源并且只能在具有更新的 UI 引擎的新版本 Android 上运行。和别的...
这就是为什么,没有 Google 官方 Reveal 动画,该动画仅适用于 Android 5.0 >。
但有很多向后移植:
查看所有可用的、非官方的 Android 反向移植Awesome Android UI。
当 Google 推出 Android Material 时,没有任何库可以容纳所有这些元素。但在很短的时间内,不同的开发人员编写了许多有用的库。但在流行之后,谷歌引入了该小部件的所有库。
因此,没有向后移植,谷歌很可能不会引入该小部件。但是听你的问题,我认为你可以使用上面链接的非官方向后移植来做到这一点。
| 归档时间: |
|
| 查看次数: |
3990 次 |
| 最近记录: |