ZeroGravityAnimation


Source link: https://github.com/sharish/ZeroGravityAnimation

ZeroGravityAnimation

Make random object fly on your screen.

The repo helps in easier development of flying random objects on random directions (or on specific directions) to give a goodUI experience for the user. Specifically made for gaming purpose, the repo will be highly useful for apps that deals with space related animations, thus named as ZeroGravityAnimation. The animation works with a class called OverTheTopLayer, that makes the object to fly on the top of the screen. A ViewGroup layout can be passed optionally that acts as a container for the animating objects.

####Sample:

The image illustrates the stars flying beneath the earth with the help of container layout while a meteor and a satellite flying on the top of screen through OverTheTopLayer.

####Usage:

int imgResource = R.drawable.star; // your animating object here int count = 1;  // # of objects to fly float scale = 0.2f; // scaling factor for the animating objects - value ranges from 0.0 to 1.0  // directions are optional and by default RANDOM will be picked Direction origin = Direction.LEFT; // animation origin direction - can also use Direction.TOP, Direction.BOTTOM, Direction.LEFT or Direction.RANDOM Direction destination = Direction.RIGHT; // same case as above for destination
ZeroGravityAnimation animation = new ZeroGravityAnimation();
 animation.setCount(count);
 animation.setScalingFactor(scale);
 animation.setOriginationDirection(origin);
 animation.setDestinationDirection(destination);
 animation.setImage(resId);
 animation.play(this);

#####Animation Listener: Default animation listener can used to collect events of this animation.

animation.setAnimationListener(new Animation.AnimationListener() {

  @Override

  public void onAnimationStart(Animation animation) {

}

@Override

  public void onAnimationEnd(Animation animation) {

}

@Override

  public void onAnimationRepeat(Animation animation) {

}

 
}

);
 ```  #####Animation Object Container Specification: Wanted you animation to take place beneath certain views - like the stars that fly beneath Earth in the above demo?  Make sure you design your layouts to have a container layout (FrameLayout) that lies below than the original views and use the following code

```java

ViewGroup container = (ViewGroup) findViewById(R.id.animation_container_layout);

 animation.play(this,container);
 ```  ###Apps using ZeroGravityAnimation: [Goldhunt Game](https://play.google.com/store/apps/details?id=com.cooltechworks.goldhunt)| ------------ | ![goldhuntdemo](https://cloud.githubusercontent.com/assets/13122232/9293580/3521f486-444e-11e5-9de2-3b9cab9a13f6.gif)|
  Developed By ============  * Harish Sridharan - <harish.sridhar@gmail.com>

 

Resources

Android Tinted Status Bars using Xposed.

AndroidSlidingUpPanel provides a simple way to add a draggable sliding up panel (popularized by Google Music, Google Maps and Rdio) to your Android application.

ConnectBot is a Secure Shell client for the Android platform. Its ultimate goal is to create a secure connection through which you can use a shell on a remote machine and transfer files back and forth to your phone.

Provides a logging wrapper around a WebViewClient, in order to figure out what is going on.

This happens by creating a DebugWebViewClient which logs events and passes them to an enclosed WebViewClient.

An Android Parallax ViewPager.

The advantage of this library is that the UI components within the adapter view can be individually moved at different speeds.

Basic implementation of Android Recycler View purely written in Kotlin.

Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes