All Projects → xmuSistone → Android Snake Menu

xmuSistone / Android Snake Menu

imitate Tumblr's menu, dragging animations look like a snake

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Android Snake Menu

Sppagemenu
分页菜单,功能非常齐全,满足绝大多数APP,简书地址:
Stars: ✭ 402 (-31.16%)
Mutual labels:  menu
Wmzdropdownmenu
🌹一个能几乎实现所有App各种类型筛选菜单的控件,可悬浮,目前已实现闲鱼/美团/Boss直聘/京东/饿了么/淘宝/拼多多/赶集网/美图外卖等等的筛选菜单,可以自由调用代理实现自己想组装的筛选功能和UI,且控件的生命周期自动管理,悬浮自动管理🌹(A control that can implement almost all types of filtering menus of all apps)
Stars: ✭ 503 (-13.87%)
Mutual labels:  menu
Nestedtouchscrollinglayout
🎱处理子 View,父 View 嵌套滚动,成本比 support v4 NestedScrolling 低,放心食用~
Stars: ✭ 557 (-4.62%)
Mutual labels:  viewgroup
Dlwidgetmenu
Versatile solution for displaying widget menus. Easily adjustable with custom layouts and/or animations.
Stars: ✭ 416 (-28.77%)
Mutual labels:  menu
3dsnakear
Well known game Snake written in Swift using ARKit.
Stars: ✭ 453 (-22.43%)
Mutual labels:  snake
Kotlinextensions.com
A handy collection of most commonly used Kotlin extensions to boost your productivity.
Stars: ✭ 522 (-10.62%)
Mutual labels:  viewgroup
Radialmenu
A highly customizable radial menu that's very easy to setup.
Stars: ✭ 371 (-36.47%)
Mutual labels:  menu
React Contexify
Add a context menu to your react app with ease
Stars: ✭ 575 (-1.54%)
Mutual labels:  menu
Superslide.js
A flexible, smooth, GPU accelerated sliding menu for your next PWA
Stars: ✭ 496 (-15.07%)
Mutual labels:  menu
Jgmenu
A simple X11 menu
Stars: ✭ 523 (-10.45%)
Mutual labels:  menu
Sliding Panel
Android sliding panel that is part of the view hierarchy, not above it.
Stars: ✭ 433 (-25.86%)
Mutual labels:  viewgroup
Godot Gametemplate
Template with all necessary stuff taken care, just create your games main features.
Stars: ✭ 435 (-25.51%)
Mutual labels:  menu
Arduinomenu
Arduino generic menu/interactivity system
Stars: ✭ 520 (-10.96%)
Mutual labels:  menu
Wmzpagecontroller
分页控制器,替换UIPageController方案,具备完整的生命周期,多种指示器样式,多种标题样式,可悬浮,支持ios13暗黑模式(仿优酷,爱奇艺,今日头条,简书,京东等多种标题菜单) (Pagination controller with full life cycle, multiple indicator styles, multiple title styles)
Stars: ✭ 405 (-30.65%)
Mutual labels:  menu
Fabrevealmenu Master
A general purpose android UI library to show a user show menu in accordance of Floating action button with material design guidelines.
Stars: ✭ 558 (-4.45%)
Mutual labels:  menu
Hamburger React
Animated hamburger menu icons for React (1.5 KB) 🍔
Stars: ✭ 391 (-33.05%)
Mutual labels:  menu
Autoconnect
An Arduino library for ESP8266/ESP32 WLAN configuration at runtime with the Web interface
Stars: ✭ 513 (-12.16%)
Mutual labels:  menu
Vhboommenubutton
A menu which can ... BOOM! - iOS
Stars: ✭ 577 (-1.2%)
Mutual labels:  menu
Sidemenu
Simple side/slide menu control for iOS, no code necessary! Lots of customization. Add it to your project in 5 minutes or less.
Stars: ✭ 5,267 (+801.88%)
Mutual labels:  menu
Snake
🚀thinkphp5.1 + layui 实现的带rbac的基础管理后台,方便快速开发法使用
Stars: ✭ 526 (-9.93%)
Mutual labels:  snake

android-snake-menu

imitate Tumblr's menu, dragging animations look like a snake

unexpected episode

I found another repository some time ago which implemments the same dragging effects. Besides, its unfold later-menu effects is much more consistent with original Tumblr effects. You can jump to this repository - here.

something irrelated

Several days ago, I installed the tumblr app into my genymotion device, and I was totally shocked by its amazing snake-menu animation which is quite smooth and fluent. Since I cannot clearly describe its visual effects, you’d better install this app and try it yourself.

Ok, I am always the one who would like to imitate beautiful things. And I was terribly curious about how its animation is implemented.

captured images

PREVIEW

implement principle

So, at the first sight, do you have any idea about how this animation appears?

As you know, there are 6 imageviews: P1, P2, P3, P4, P5, P6, and P6 is the top-most imageview which is enabled to be dragged. You can easily figure it out that: P1 follows P2, P2 follows P3, P3 follows P4, P4 follows P5, P5 follows P6.

First of all, I used ViewDragHelper to make P6 draggable.

Then, ViewDragHelper.CallBack can tell us some information about P6’s status, such as dragging, released, and P6’s position change and so on. To lighten the parent ViewGroup’s job, I create a ViewTrackController to process P6’s status.

Afterwards, ViewTrackController is responsible for dealing with all the linkage animations: every time P6’s position changes, causes P5’s target position changes. Every time P5’s position change causes P4’s target position changes. The rest imageviews can be done in the same manner.

To make the animation pleasing to the eyes, facebook’s rebound sdk encounters with ViewTrackController. While reviewing the source code, you will find that each imageview has a SpringListener and a fllower-SpringListener. Obviously, P6’s follower is P5, P5’s follower is P4, P4’s follower is P3, etc… P6’s position change will notify P5’s follower-SpringListener, P5’s position change will notify P4’s follower-SpringListener, etc… That’s to say, P6’s position change leads the rest imageviews animate automatically.

Finally, the animated snake-menu is implemented by this way.

contact me

The source code is easy to read. If you have any problems or advice, please leave me a message on the issues, or contact my email: [email protected]. Besides, welcome for pull requests.

demo apk download

apk download (right in this github repository)

Version: 1.0

  • Pilot version

License

Copyright 2016, xmuSistone

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].