https://github.com/m1ga/ti.viewanimation
https://github.com/m1ga/ti.viewanimation
andorid animation titanium-mobile titanium-module
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/m1ga/ti.viewanimation
- Owner: m1ga
- License: mit
- Created: 2021-11-07T21:20:55.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-11-07T23:00:03.000Z (over 3 years ago)
- Last Synced: 2025-01-27T07:11:55.526Z (4 months ago)
- Topics: andorid, animation, titanium-mobile, titanium-module
- Language: Java
- Homepage:
- Size: 111 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ti.viewanimation
![]()
Using [AndroidViewAnimations](https://github.com/daimajia/AndroidViewAnimations) in Titanium
## Example
```js
const VIEW_ANIMATION = require("ti.viewanimation");
var ani;
const win = Ti.UI.createWindow();
const view = Ti.UI.createView({
width: 200,
height: 200,
backgroundColor: "red"
});
win.add(view);
win.addEventListener("open", function(e) {
ani = VIEW_ANIMATION.animate({
view: view,
type: VIEW_ANIMATION.RUBBERBAND,
duration: 500,
repeat: -1 //
});// stop animation after 3 seconds
setTimeout(function(){
ani.stop();
}, 3000)
})win.open();
```## Methods
* animate({view, duration, repeat, repeatMode, type, delay}) -> returns animation### animation methods
* stop()### animation properties
* isRunning
* isStarted## Events
* start
* cancel
* done## Constants
use the following animation type constants:
* FLASH
* PULSE
* RUBBERBAND
* SHAKE
* SWING
* WOBBLE
* BOUNCE
* TADA
* STANDUP
* WAVE
* HINGE
* ROLLIN
* ROLLOUT
* LANDING
* TAKINGOFF
* DROPOUT
* BOUNCEIN
* BOUNCEINDOWN
* BOUNCEINLEFT
* BOUNCEINRIGHT
* BOUNCEINUP
* FADEIN
* FADEINUP
* FADEINDOWN
* FADEINLEFT
* FADEINRIGHT
* FADEOUTDOWN
* FADEOUTLEFT
* FADEOUTRIGHT
* FADEOUTUP
* FLIPINX
* FLIPOUTX
* FLIPOUTY
* ROTATEIN
* ROTATEINDOWNLEFT
* ROTATEINDOWNRIGHT
* ROTATEINUPLEFT
* ROTATEINUPRIGHT
* ROTATEOUTDOWNLEFT
* ROTATEOUTDOWNRIGHT
* ROTATEOUTUPLEFT
* ROTATEOUTUPRIGHT
* SLIDEINLEFT
* SLIDEINRIGHT
* SLIDEINUP
* SLIDEINDOWN
* SLIDEOUTLEFT
* SLIDEOUTRIGHT
* SLIDEOUTUP
* SLIDEOUTDOWN
* ZOOMIN
* ZOOMINDOWN
* ZOOMINLEFT
* ZOOMINRIGHT
* ZOOMINUP
* ZOOMOUTDOWN
* ZOOMOUTLEFT
* ZOOMOUTRIGHT
* ZOOMOUTUPrepeatMode:
* REPEAT_RESTART
* REPEAT_REVERSE