Tibolte/HamburgerMenuDrawable
语言: Java
git: https://github.com/Tibolte/HamburgerMenuDrawable
HamburgerMenuDrawable
最近我发现了一些关于Dribble的文章,这些文章展示了一些动画菜单按钮,通常称为Burger按钮。 此页面说明了此示例:https://dribbble.com/shots/1654493-Hamburger-Icon-in-Framer?list = users&offset = 1
经过Flavien Laurent和他的项目TickPlusDrawable(https://github.com/flavienlaurent/tickplusdrawable)的一些搜索和帮助, 我发现了一个涉及子类化Drawable类的简单解决方案。然后我们只需要使用AnimatorSet和ObjectAnimator 使线条动画并使十字架和汉堡连续出现。结果如下:
Android的
在API 2.2+上测试,需要包含nineOldAndroid jar文件
执照
HamburgerMenuDrawable可在MIT许可下使用。有关详细信息,请参阅LICENSE文件。
本文使用googletrans自动翻译,仅供参考, 原文来自github.com
HamburgerMenuDrawable
Recently I came across some articles on Dribble which were showing some animated menu buttons, commonly called Burger buttons.
An example of this is illustrated on this page: https://dribbble.com/shots/1654493-Hamburger-Icon-in-Framer?list=users&offset=1
After a bit of search and help of Flavien Laurent and his project TickPlusDrawable (https://github.com/flavienlaurent/tickplusdrawable),
I found a simple solution involving subclassing the Drawable class. Then we just have to play with AnimatorSet and ObjectAnimator
to animate the lines and make a cross and a hamburger appear successively. Here is the result:
Android
Tested on APIs 2.2+, requires the nineOldAndroid jar file included
License
HamburgerMenuDrawable is available under the MIT license. See the LICENSE file for more info.