├── .gitignore
├── .travis.yml
├── License
├── README.md
├── build.gradle
├── demo
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ └── main
│ ├── AndroidManifest.xml
│ ├── java
│ └── com
│ │ └── daimajia
│ │ └── androidanimations
│ │ ├── EffectAdapter.java
│ │ ├── ExampleActivity.java
│ │ └── MyActivity.java
│ └── res
│ ├── drawable-hdpi
│ └── ic_launcher.png
│ ├── drawable-mdpi
│ └── ic_launcher.png
│ ├── drawable-xhdpi
│ └── ic_launcher.png
│ ├── drawable-xxhdpi
│ └── ic_launcher.png
│ ├── layout
│ ├── activity_my.xml
│ ├── example.xml
│ └── item.xml
│ ├── menu
│ └── my.xml
│ ├── values-w820dp
│ └── dimens.xml
│ └── values
│ ├── dimens.xml
│ ├── strings.xml
│ └── styles.xml
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── library
├── .gitignore
├── build.gradle
├── gradle-mvn-push.gradle
├── gradle.properties
├── proguard-rules.pro
└── src
│ └── main
│ ├── AndroidManifest.xml
│ └── java
│ └── com
│ └── daimajia
│ └── androidanimations
│ └── library
│ ├── BaseViewAnimator.java
│ ├── Techniques.java
│ ├── YoYo.java
│ ├── attention
│ ├── BounceAnimator.java
│ ├── FlashAnimator.java
│ ├── PulseAnimator.java
│ ├── RubberBandAnimator.java
│ ├── ShakeAnimator.java
│ ├── StandUpAnimator.java
│ ├── SwingAnimator.java
│ ├── TadaAnimator.java
│ ├── WaveAnimator.java
│ └── WobbleAnimator.java
│ ├── bouncing_entrances
│ ├── BounceInAnimator.java
│ ├── BounceInDownAnimator.java
│ ├── BounceInLeftAnimator.java
│ ├── BounceInRightAnimator.java
│ └── BounceInUpAnimator.java
│ ├── fading_entrances
│ ├── FadeInAnimator.java
│ ├── FadeInDownAnimator.java
│ ├── FadeInLeftAnimator.java
│ ├── FadeInRightAnimator.java
│ └── FadeInUpAnimator.java
│ ├── fading_exits
│ ├── FadeOutAnimator.java
│ ├── FadeOutDownAnimator.java
│ ├── FadeOutLeftAnimator.java
│ ├── FadeOutRightAnimator.java
│ └── FadeOutUpAnimator.java
│ ├── flippers
│ ├── FlipInXAnimator.java
│ ├── FlipOutXAnimator.java
│ ├── FlipOutYAnimator.java
│ └── FlipYAnimator.java
│ ├── rotating_entrances
│ ├── RotateInAnimator.java
│ ├── RotateInDownLeftAnimator.java
│ ├── RotateInDownRightAnimator.java
│ ├── RotateInUpLeftAnimator.java
│ └── RotateInUpRightAnimator.java
│ ├── rotating_exits
│ ├── RotateOutAnimator.java
│ ├── RotateOutDownLeftAnimator.java
│ ├── RotateOutDownRightAnimator.java
│ ├── RotateOutUpLeftAnimator.java
│ └── RotateOutUpRightAnimator.java
│ ├── sliders
│ ├── SlideInDownAnimator.java
│ ├── SlideInLeftAnimator.java
│ ├── SlideInRightAnimator.java
│ ├── SlideInUpAnimator.java
│ ├── SlideOutDownAnimator.java
│ ├── SlideOutLeftAnimator.java
│ ├── SlideOutRightAnimator.java
│ └── SlideOutUpAnimator.java
│ ├── specials
│ ├── HingeAnimator.java
│ ├── RollInAnimator.java
│ └── RollOutAnimator.java
│ ├── zooming_entrances
│ ├── ZoomInAnimator.java
│ ├── ZoomInDownAnimator.java
│ ├── ZoomInLeftAnimator.java
│ ├── ZoomInRightAnimator.java
│ └── ZoomInUpAnimator.java
│ └── zooming_exits
│ ├── ZoomOutAnimator.java
│ ├── ZoomOutDownAnimator.java
│ ├── ZoomOutLeftAnimator.java
│ ├── ZoomOutRightAnimator.java
│ └── ZoomOutUpAnimator.java
└── settings.gradle
/.gitignore:
--------------------------------------------------------------------------------
1 | .gradle
2 | /local.properties
3 | /.idea/workspace.xml
4 | .DS_Store
5 | /build
6 | # built application files
7 | *.apk
8 | *.ap_
9 |
10 | # files for the dex VM
11 | *.dex
12 |
13 | # Java class files
14 | *.class
15 | .DS_Store
16 |
17 | # generated files
18 | bin/
19 | gen/
20 | Wiki/
21 |
22 | # Local configuration file (sdk path, etc)
23 | local.properties
24 |
25 | # Eclipse project files
26 | .classpath
27 | .project
28 | .settings/
29 |
30 | # Proguard folder generated by Eclipse
31 | proguard/
32 |
33 | #Android Studio
34 | build/
35 |
36 | # Intellij project files
37 | *.iml
38 | *.ipr
39 | *.iws
40 | .idea/
41 |
42 | #gradle
43 | .gradle/
44 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: java
2 | jdk: oraclejdk7
3 | env:
4 | matrix:
5 | - ANDROID_TARGET=android-20 ANDROID_ABI=armeabi-v7a
6 |
7 | before_install:
8 | # Install base Android SDK
9 | - sudo apt-get update -qq
10 | - if [ `uname -m` = x86_64 ]; then sudo apt-get install -qq --force-yes libgd2-xpm ia32-libs ia32-libs-multiarch > /dev/null; fi
11 | - wget http://dl.google.com/android/android-sdk_r23-linux.tgz
12 | - tar xzf android-sdk_r23-linux.tgz
13 | - export ANDROID_HOME=$PWD/android-sdk-linux
14 | - export PATH=${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools
15 |
16 | # Gradle
17 | - wget http://services.gradle.org/distributions/gradle-1.12-bin.zip
18 | - unzip gradle-1.12-bin.zip
19 | - export GRADLE_HOME=$PWD/gradle-1.12
20 | - export PATH=$GRADLE_HOME/bin:$PATH
21 |
22 | # Install required components
23 | # For a full list, run `android list sdk -a --extended`
24 | # Note that sysimg-19 downloads only ARM, because only the first license query is accepted.
25 | - echo yes | android update sdk --filter platform-tools --no-ui --force > /dev/null
26 | - echo yes | android update sdk --all --filter build-tools-20.0.0 --no-ui --force > /dev/null
27 | - echo yes | android update sdk --filter android-20 --no-ui --force > /dev/null
28 | - echo yes | android update sdk --filter sys-img-x86-android-19 --no-ui --force > /dev/null
29 | - echo yes | android update sdk --filter extra-android-support --no-ui --force > /dev/null
30 | - echo yes | android update sdk --filter extra-android-m2repository --no-ui --force > /dev/null
31 |
32 | install:
33 | - ./gradlew assemble
--------------------------------------------------------------------------------
/License:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 daimajia
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Android View Animations [](https://travis-ci.org/daimajia/AndroidAnimations)
2 |
3 | One day, I saw [an iOS library](https://github.com/ArtFeel/AFViewShaker), which is a view shaker, it's very beautiful. I think Android also need one, and should be better.
4 |
5 | So, I started to collect animation effects... and in two days, this project born.
6 |
7 | # Demo
8 |
9 | 
10 |
11 | [Download Demo](https://github.com/daimajia/AndroidViewAnimations/releases/download/v1.0.5/demo-v1.0.5.apk)
12 | # Usage
13 |
14 | For making animations more real, I created another project named [Android Easing Functions](https://github.com/daimajia/AnimationEasingFunctions) which is an implementations of [easing functions](http://easings.net/) on Android. So, we need to dependent that project.
15 |
16 | ## Step 1
17 |
18 | ```groovy
19 | dependencies {
20 | compile 'com.nineoldandroids:library:2.4.0'
21 | compile 'com.daimajia.easing:library:1.0.0@aar'
22 | compile 'com.daimajia.androidanimations:library:1.0.6@aar'
23 | }
24 | ```
25 | or Maven
26 |
27 | ```xml
28 |
29 | com.nineoldandroids
30 | library
31 | 2.4.0
32 |
33 |
34 | com.daimajia.androidanimation
35 | library
36 | 1.0.6
37 | apklib
38 |
39 |
40 | com.daimajia.easing
41 | library
42 | 1.0.0
43 | apklib
44 |
45 | ```
46 |
47 | ## Step 2
48 |
49 | Just like play Yo-yo.
50 |
51 | ```java
52 | YoYo.with(Techniques.Tada)
53 | .duration(700)
54 | .playOn(findViewById(R.id.edit_area));
55 | ```
56 |
57 | ### Effects
58 | #### Attension
59 | `Flash`, `Pulse`, `RubberBand`, `Shake`, `Swing`, `Wobble`, `Bounce`, `Tada`, `StandUp`, `Wave`
60 |
61 | #### Special
62 | `Hinge`, `RollIn`, `RollOut`
63 |
64 | #### Bounce
65 | `BounceIn`, `BounceInDown`, `BounceInLeft`, `BounceInRight`, `BounceInUp`
66 |
67 | #### Fade
68 | `FadeIn`, `FadeInUp`, `FadeInDown`, `FadeInLeft`, `FadeInRight`
69 |
70 | `FadeOut`, `FadeOutDown`, `FadeOutLeft`, `FadeOutRight`, `FadeOutUp`
71 |
72 | #### Flip
73 | `FlipInX`, `FlipOutX`, `FlipOutY`
74 |
75 | #### Rotate
76 | `RotateIn`, `RotateInDownLeft`, `RotateInDownRight`, `RotateInUpLeft`, `RotateInUpRight`
77 |
78 | `RotateOut`, `RotateOutDownLeft`, `RotateOutDownRight`, `RotateOutUpLeft`, `RotateOutUpRight`
79 |
80 | #### Slide
81 | `SlideInLeft`, `SlideInRight`, `SlideInUp`, `SlideInDown`
82 |
83 | `SlideOutLeft`, `SlideOutRight`, `SlideOutUp`, `SlideOutDown`
84 |
85 | #### Zoom
86 | `ZoomIn`, `ZoomInDown`, `ZoomInLeft`, `ZoomInRight`, `ZoomInUp`
87 |
88 | `ZoomOut`, `ZoomOutDown`, `ZoomOutLeft`, `ZoomOutRight`, `ZoomOutUp`
89 |
90 | Welcome contribute your amazing animation effect. :-D
91 |
92 | #Thanks
93 |
94 | - [AFViewShaker](https://github.com/ArtFeel/AFViewShaker)
95 | - [Animate.css](https://github.com/daneden/animate.css)
96 |
97 | #About me
98 |
99 | A student in mainland China.
100 |
101 | Welcome to [offer me an internship](mailto:daimajia@gmail.com).
102 | If you have any new idea about this project, feel free to [contact me](mailto:daimajia@gmail.com).
103 |
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | mavenCentral()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:0.12.+'
9 | classpath 'com.jakewharton.sdkmanager:gradle-plugin:0.10.+'
10 | // NOTE: Do not place your application dependencies here; they belong
11 | // in the individual module build.gradle files
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | mavenCentral()
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/demo/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/demo/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'android-sdk-manager'
2 | apply plugin: 'android'
3 |
4 | android {
5 | compileSdkVersion 20
6 | buildToolsVersion "20"
7 |
8 | defaultConfig {
9 | applicationId "com.daimajia.androidanimations"
10 | minSdkVersion 8
11 | targetSdkVersion 20
12 | versionCode 1
13 | versionName "1.0"
14 | }
15 | buildTypes {
16 | release {
17 | runProguard false
18 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
19 | }
20 | }
21 | lintOptions{
22 | abortOnError false
23 | }
24 | }
25 |
26 | dependencies {
27 | compile fileTree(dir: 'libs', include: ['*.jar'])
28 | compile 'com.nineoldandroids:library:2.4.0'
29 | compile project(':library')
30 | }
31 |
--------------------------------------------------------------------------------
/demo/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /Applications/Android Studio.app/sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/demo/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
10 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/demo/src/main/java/com/daimajia/androidanimations/EffectAdapter.java:
--------------------------------------------------------------------------------
1 | package com.daimajia.androidanimations;
2 |
3 | import android.content.Context;
4 | import android.view.LayoutInflater;
5 | import android.view.View;
6 | import android.view.ViewGroup;
7 | import android.widget.BaseAdapter;
8 | import android.widget.TextView;
9 |
10 | import com.daimajia.androidanimations.library.Techniques;
11 |
12 | public class EffectAdapter extends BaseAdapter {
13 |
14 | private Context mContext;
15 |
16 | public EffectAdapter(Context context){
17 | mContext = context;
18 | }
19 |
20 | @Override
21 | public int getCount() {
22 | return Techniques.values().length;
23 | }
24 |
25 | @Override
26 | public Object getItem(int position) {
27 | return Techniques.values()[position].getAnimator();
28 | }
29 |
30 | @Override
31 | public long getItemId(int position) {
32 | return position;
33 | }
34 |
35 | @Override
36 | public View getView(final int position, View convertView, ViewGroup parent) {
37 | View v = LayoutInflater.from(mContext).inflate(R.layout.item,null,false);
38 | TextView t = (TextView)v.findViewById(R.id.list_item_text);
39 | Object o = getItem(position);
40 | int start = o.getClass().getName().lastIndexOf(".") + 1;
41 | String name = o.getClass().getName().substring(start);
42 | t.setText(name);
43 | v.setTag(o);
44 | return v;
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/demo/src/main/java/com/daimajia/androidanimations/ExampleActivity.java:
--------------------------------------------------------------------------------
1 | package com.daimajia.androidanimations;
2 |
3 | import android.app.Activity;
4 | import android.os.Bundle;
5 | import android.view.View;
6 | import android.widget.TextView;
7 |
8 | import com.daimajia.androidanimations.library.Techniques;
9 | import com.daimajia.androidanimations.library.YoYo;
10 |
11 | public class ExampleActivity extends Activity {
12 | @Override
13 | protected void onCreate(Bundle savedInstanceState) {
14 | super.onCreate(savedInstanceState);
15 | setContentView(R.layout.example);
16 |
17 | final TextView t = (TextView) findViewById(R.id.notice);
18 | t.setText("Please input your Email and Password");
19 |
20 | findViewById(R.id.submit).setOnClickListener(new View.OnClickListener() {
21 | @Override
22 | public void onClick(View v) {
23 |
24 | YoYo.with(Techniques.Tada)
25 | .duration(700)
26 | .playOn(findViewById(R.id.edit_area));
27 |
28 | t.setText("Wrong password!");
29 | }
30 | });
31 |
32 | final TextView t2 = (TextView) findViewById(R.id.notice2);
33 | t2.setText("Please input your Email and Password");
34 |
35 | findViewById(R.id.submit2).setOnClickListener(new View.OnClickListener() {
36 | @Override
37 | public void onClick(View v) {
38 |
39 | YoYo.with(Techniques.Shake).playOn(findViewById(R.id.edit_area2));
40 |
41 | t2.setText("Wrong password!");
42 | }
43 | });
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/demo/src/main/java/com/daimajia/androidanimations/MyActivity.java:
--------------------------------------------------------------------------------
1 | package com.daimajia.androidanimations;
2 |
3 | import android.app.Activity;
4 | import android.content.Intent;
5 | import android.os.Bundle;
6 | import android.view.Menu;
7 | import android.view.MenuItem;
8 | import android.view.View;
9 | import android.view.animation.AccelerateInterpolator;
10 | import android.widget.AdapterView;
11 | import android.widget.ListView;
12 |
13 | import com.daimajia.androidanimations.library.BaseViewAnimator;
14 |
15 | public class MyActivity extends Activity {
16 |
17 | private ListView mListView;
18 | private EffectAdapter mAdapter;
19 | private View mTarget;
20 |
21 | @Override
22 | protected void onCreate(Bundle savedInstanceState) {
23 | super.onCreate(savedInstanceState);
24 | setContentView(R.layout.activity_my);
25 | mListView = (ListView)findViewById(R.id.list_items);
26 | mTarget = findViewById(R.id.hello_world);
27 | mAdapter = new EffectAdapter(this);
28 | mListView.setAdapter(mAdapter);
29 | mListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
30 | @Override
31 | public void onItemClick(AdapterView> parent, View view, int position, long id) {
32 | ((BaseViewAnimator) (view.getTag())).setDuration(800)
33 | .setInterpolator(new AccelerateInterpolator())
34 | .animate(mTarget);
35 | }
36 | });
37 | }
38 |
39 |
40 | @Override
41 | public boolean onCreateOptionsMenu(Menu menu) {
42 | // Inflate the menu; this adds items to the action bar if it is present.
43 | getMenuInflater().inflate(R.menu.my, menu);
44 | return true;
45 | }
46 |
47 | @Override
48 | public boolean onOptionsItemSelected(MenuItem item) {
49 | // Handle action bar item clicks here. The action bar will
50 | // automatically handle clicks on the Home/Up button, so long
51 | // as you specify a parent activity in AndroidManifest.xml.
52 | int id = item.getItemId();
53 | if (id == R.id.action_settings) {
54 | startActivity(new Intent(this,ExampleActivity.class));
55 | return true;
56 | }
57 | return super.onOptionsItemSelected(item);
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/demo/src/main/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/etao-open-source/AndroidViewAnimations/52dddde4795d9d81247397d8181c3d63e8a5d696/demo/src/main/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/demo/src/main/res/drawable-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/etao-open-source/AndroidViewAnimations/52dddde4795d9d81247397d8181c3d63e8a5d696/demo/src/main/res/drawable-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/demo/src/main/res/drawable-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/etao-open-source/AndroidViewAnimations/52dddde4795d9d81247397d8181c3d63e8a5d696/demo/src/main/res/drawable-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/demo/src/main/res/drawable-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/etao-open-source/AndroidViewAnimations/52dddde4795d9d81247397d8181c3d63e8a5d696/demo/src/main/res/drawable-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/demo/src/main/res/layout/activity_my.xml:
--------------------------------------------------------------------------------
1 |
10 |
11 |
19 |
24 |
25 |
--------------------------------------------------------------------------------
/demo/src/main/res/layout/example.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
14 |
18 |
22 |
23 |
24 |
29 |
33 |
38 |
39 |
40 |
46 |
50 |
54 |
55 |
56 |
61 |
65 |
70 |
71 |
72 |
73 |
--------------------------------------------------------------------------------
/demo/src/main/res/layout/item.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/demo/src/main/res/menu/my.xml:
--------------------------------------------------------------------------------
1 |
10 |
--------------------------------------------------------------------------------
/demo/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/demo/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 |
6 |
--------------------------------------------------------------------------------
/demo/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | AndroidAnimations
5 | Hello world!
6 | Example
7 |
8 |
9 |
--------------------------------------------------------------------------------
/demo/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Settings specified in this file will override any Gradle settings
5 | # configured through the IDE.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
19 |
20 |
21 | VERSION_NAME=1.0.6
22 | VERSION_CODE=7
23 | GROUP=com.daimajia.androidanimations
24 |
25 | POM_DESCRIPTION=Collect android animations
26 | POM_URL=https://github.com/daimajia/AndroidAnimations
27 | POM_SCM_URL=https://github.com/daimajia/AndroidAnimations
28 | POM_SCM_CONNECTION=scm:https://github.com/daimajia/AndroidAnimations.git
29 | POM_SCM_DEV_CONNECTION=scm:https://github.com/daimajia/AndroidAnimations.git
30 | POM_LICENCE_NAME=MIT
31 | POM_LICENCE_URL=http://opensource.org/licenses/MIT
32 | POM_LICENCE_DIST=repo
33 | POM_DEVELOPER_ID=daimajia
34 | POM_DEVELOPER_NAME=daimajia
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/etao-open-source/AndroidViewAnimations/52dddde4795d9d81247397d8181c3d63e8a5d696/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Sat Jun 28 18:37:32 CST 2014
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-all.zip
7 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # For Cygwin, ensure paths are in UNIX format before anything is touched.
46 | if $cygwin ; then
47 | [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
48 | fi
49 |
50 | # Attempt to set APP_HOME
51 | # Resolve links: $0 may be a link
52 | PRG="$0"
53 | # Need this for relative symlinks.
54 | while [ -h "$PRG" ] ; do
55 | ls=`ls -ld "$PRG"`
56 | link=`expr "$ls" : '.*-> \(.*\)$'`
57 | if expr "$link" : '/.*' > /dev/null; then
58 | PRG="$link"
59 | else
60 | PRG=`dirname "$PRG"`"/$link"
61 | fi
62 | done
63 | SAVED="`pwd`"
64 | cd "`dirname \"$PRG\"`/" >&-
65 | APP_HOME="`pwd -P`"
66 | cd "$SAVED" >&-
67 |
68 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
69 |
70 | # Determine the Java command to use to start the JVM.
71 | if [ -n "$JAVA_HOME" ] ; then
72 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
73 | # IBM's JDK on AIX uses strange locations for the executables
74 | JAVACMD="$JAVA_HOME/jre/sh/java"
75 | else
76 | JAVACMD="$JAVA_HOME/bin/java"
77 | fi
78 | if [ ! -x "$JAVACMD" ] ; then
79 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
80 |
81 | Please set the JAVA_HOME variable in your environment to match the
82 | location of your Java installation."
83 | fi
84 | else
85 | JAVACMD="java"
86 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
87 |
88 | Please set the JAVA_HOME variable in your environment to match the
89 | location of your Java installation."
90 | fi
91 |
92 | # Increase the maximum file descriptors if we can.
93 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
94 | MAX_FD_LIMIT=`ulimit -H -n`
95 | if [ $? -eq 0 ] ; then
96 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
97 | MAX_FD="$MAX_FD_LIMIT"
98 | fi
99 | ulimit -n $MAX_FD
100 | if [ $? -ne 0 ] ; then
101 | warn "Could not set maximum file descriptor limit: $MAX_FD"
102 | fi
103 | else
104 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
105 | fi
106 | fi
107 |
108 | # For Darwin, add options to specify how the application appears in the dock
109 | if $darwin; then
110 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
111 | fi
112 |
113 | # For Cygwin, switch paths to Windows format before running java
114 | if $cygwin ; then
115 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
116 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
117 |
118 | # We build the pattern for arguments to be converted via cygpath
119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
120 | SEP=""
121 | for dir in $ROOTDIRSRAW ; do
122 | ROOTDIRS="$ROOTDIRS$SEP$dir"
123 | SEP="|"
124 | done
125 | OURCYGPATTERN="(^($ROOTDIRS))"
126 | # Add a user-defined pattern to the cygpath arguments
127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
129 | fi
130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
131 | i=0
132 | for arg in "$@" ; do
133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
135 |
136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
138 | else
139 | eval `echo args$i`="\"$arg\""
140 | fi
141 | i=$((i+1))
142 | done
143 | case $i in
144 | (0) set -- ;;
145 | (1) set -- "$args0" ;;
146 | (2) set -- "$args0" "$args1" ;;
147 | (3) set -- "$args0" "$args1" "$args2" ;;
148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
154 | esac
155 | fi
156 |
157 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
158 | function splitJvmOpts() {
159 | JVM_OPTS=("$@")
160 | }
161 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
162 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
163 |
164 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
165 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/library/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/library/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'android-library'
2 |
3 | android {
4 | compileSdkVersion 20
5 | buildToolsVersion "20.0.0"
6 |
7 | defaultConfig {
8 | applicationId "com.daimajia.androidanimations.library"
9 | minSdkVersion 8
10 | targetSdkVersion 20
11 | versionCode 7
12 | versionName "1.0.6"
13 | }
14 | buildTypes {
15 | release {
16 | runProguard false
17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18 | }
19 | }
20 | }
21 |
22 | dependencies {
23 | compile fileTree(dir: 'libs', include: ['*.jar'])
24 | compile 'com.nineoldandroids:library:2.4.0'
25 | compile 'com.daimajia.easing:library:1.0.0@aar'
26 | }
27 | apply from: './gradle-mvn-push.gradle'
--------------------------------------------------------------------------------
/library/gradle-mvn-push.gradle:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2013 Chris Banes
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | apply plugin: 'maven'
18 | apply plugin: 'signing'
19 |
20 | def isReleaseBuild() {
21 | return VERSION_NAME.contains("SNAPSHOT") == false
22 | }
23 |
24 | def getReleaseRepositoryUrl() {
25 | return hasProperty('RELEASE_REPOSITORY_URL') ? RELEASE_REPOSITORY_URL
26 | : "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
27 | }
28 |
29 | def getSnapshotRepositoryUrl() {
30 | return hasProperty('SNAPSHOT_REPOSITORY_URL') ? SNAPSHOT_REPOSITORY_URL
31 | : "https://oss.sonatype.org/content/repositories/snapshots/"
32 | }
33 |
34 | def getRepositoryUsername() {
35 | return hasProperty('NEXUS_USERNAME') ? NEXUS_USERNAME : ""
36 | }
37 |
38 | def getRepositoryPassword() {
39 | return hasProperty('NEXUS_PASSWORD') ? NEXUS_PASSWORD : ""
40 | }
41 |
42 | afterEvaluate { project ->
43 | uploadArchives {
44 | repositories {
45 | mavenDeployer {
46 | beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
47 |
48 | pom.groupId = GROUP
49 | pom.artifactId = POM_ARTIFACT_ID
50 | pom.version = VERSION_NAME
51 |
52 | repository(url: getReleaseRepositoryUrl()) {
53 | authentication(userName: getRepositoryUsername(), password: getRepositoryPassword())
54 | }
55 | snapshotRepository(url: getSnapshotRepositoryUrl()) {
56 | authentication(userName: getRepositoryUsername(), password: getRepositoryPassword())
57 | }
58 |
59 | pom.project {
60 | name POM_NAME
61 | packaging POM_PACKAGING
62 | description POM_DESCRIPTION
63 | url POM_URL
64 |
65 | scm {
66 | url POM_SCM_URL
67 | connection POM_SCM_CONNECTION
68 | developerConnection POM_SCM_DEV_CONNECTION
69 | }
70 |
71 | licenses {
72 | license {
73 | name POM_LICENCE_NAME
74 | url POM_LICENCE_URL
75 | distribution POM_LICENCE_DIST
76 | }
77 | }
78 |
79 | developers {
80 | developer {
81 | id POM_DEVELOPER_ID
82 | name POM_DEVELOPER_NAME
83 | }
84 | }
85 | }
86 | }
87 | }
88 | }
89 |
90 | signing {
91 | required { isReleaseBuild() && gradle.taskGraph.hasTask("uploadArchives") }
92 | sign configurations.archives
93 | }
94 |
95 | task apklib(type: Zip){
96 | appendix = extension = 'apklib'
97 |
98 | from 'AndroidManifest.xml'
99 | into('res') {
100 | from 'res'
101 | }
102 | into('src') {
103 | from 'src'
104 | }
105 | }
106 |
107 | task jar(type: Jar) {
108 | from android.sourceSets.main.java
109 | }
110 |
111 | task androidJavadocs(type: Javadoc) {
112 | source = android.sourceSets.main
113 | classpath += project.files(android.getBootClasspath() .join(File.pathSeparator))
114 | }
115 |
116 | task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) {
117 | classifier = 'javadoc'
118 | from androidJavadocs.destinationDir
119 | }
120 |
121 | task androidSourcesJar(type: Jar) {
122 | classifier = 'sources'
123 | from android.sourceSets.main
124 | }
125 |
126 | artifacts {
127 | archives androidSourcesJar
128 | archives androidJavadocsJar
129 | archives apklib
130 | archives jar
131 | }
132 | }
133 |
--------------------------------------------------------------------------------
/library/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Settings specified in this file will override any Gradle settings
5 | # configured through the IDE.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
19 |
20 | POM_NAME=AndroidAnimations Library
21 | POM_ARTIFACT_ID=library
22 | POM_PACKAGING=aar
23 |
--------------------------------------------------------------------------------
/library/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /Applications/Android Studio.app/sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/library/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/library/src/main/java/com/daimajia/androidanimations/library/BaseViewAnimator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License (MIT)
3 | *
4 | * Copyright (c) 2014 daimajia
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | package com.daimajia.androidanimations.library;
26 |
27 | import android.view.View;
28 | import android.view.animation.Interpolator;
29 |
30 | import com.nineoldandroids.animation.Animator.AnimatorListener;
31 | import com.nineoldandroids.animation.AnimatorSet;
32 | import com.nineoldandroids.view.ViewHelper;
33 |
34 | public abstract class BaseViewAnimator {
35 |
36 | public static final long DURATION = 1000;
37 |
38 | private AnimatorSet mAnimatorSet;
39 | private long mDuration = DURATION;
40 |
41 | {
42 | mAnimatorSet = new AnimatorSet();
43 | }
44 |
45 |
46 | protected abstract void prepare(View target);
47 |
48 | public void animate(View target) {
49 | reset(target);
50 | prepare(target);
51 | start();
52 | }
53 |
54 | /**
55 | * reset the view to default status
56 | *
57 | * @param target
58 | */
59 | public void reset(View target) {
60 | ViewHelper.setAlpha(target, 1);
61 | ViewHelper.setScaleX(target, 1);
62 | ViewHelper.setScaleY(target, 1);
63 | ViewHelper.setTranslationX(target, 0);
64 | ViewHelper.setTranslationY(target, 0);
65 | ViewHelper.setRotation(target, 0);
66 | ViewHelper.setRotationY(target, 0);
67 | ViewHelper.setRotationX(target, 0);
68 | ViewHelper.setPivotX(target, target.getMeasuredWidth() / 2.0f);
69 | ViewHelper.setPivotY(target, target.getMeasuredHeight() / 2.0f);
70 | }
71 |
72 | /**
73 | * start to animate
74 | */
75 | public void start() {
76 | mAnimatorSet.setDuration(mDuration);
77 | mAnimatorSet.start();
78 | }
79 |
80 | public BaseViewAnimator setDuration(long duration) {
81 | mDuration = duration;
82 | return this;
83 | }
84 |
85 | public BaseViewAnimator setStartDelay(long delay) {
86 | getAnimatorAgent().setStartDelay(delay);
87 | return this;
88 | }
89 |
90 | public long getStartDelay() {
91 | return mAnimatorSet.getStartDelay();
92 | }
93 |
94 | public BaseViewAnimator addAnimatorListener(AnimatorListener l) {
95 | mAnimatorSet.addListener(l);
96 | return this;
97 | }
98 |
99 | public void removeAnimatorListener(AnimatorListener l) {
100 | mAnimatorSet.removeListener(l);
101 | }
102 |
103 | public void removeAllListener() {
104 | mAnimatorSet.removeAllListeners();
105 | }
106 |
107 | public BaseViewAnimator setInterpolator(Interpolator interpolator) {
108 | mAnimatorSet.setInterpolator(interpolator);
109 | return this;
110 | }
111 |
112 | public long getDuration() {
113 | return mAnimatorSet.getDuration();
114 | }
115 |
116 | public AnimatorSet getAnimatorAgent() {
117 | return mAnimatorSet;
118 | }
119 |
120 | }
121 |
--------------------------------------------------------------------------------
/library/src/main/java/com/daimajia/androidanimations/library/Techniques.java:
--------------------------------------------------------------------------------
1 |
2 | /*
3 | * The MIT License (MIT)
4 | *
5 | * Copyright (c) 2014 daimajia
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in all
15 | * copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 | * SOFTWARE.
24 | */
25 |
26 | package com.daimajia.androidanimations.library;
27 |
28 | import com.daimajia.androidanimations.library.attention.BounceAnimator;
29 | import com.daimajia.androidanimations.library.attention.FlashAnimator;
30 | import com.daimajia.androidanimations.library.attention.PulseAnimator;
31 | import com.daimajia.androidanimations.library.attention.RubberBandAnimator;
32 | import com.daimajia.androidanimations.library.attention.ShakeAnimator;
33 | import com.daimajia.androidanimations.library.attention.StandUpAnimator;
34 | import com.daimajia.androidanimations.library.attention.SwingAnimator;
35 | import com.daimajia.androidanimations.library.attention.TadaAnimator;
36 | import com.daimajia.androidanimations.library.attention.WaveAnimator;
37 | import com.daimajia.androidanimations.library.attention.WobbleAnimator;
38 | import com.daimajia.androidanimations.library.bouncing_entrances.BounceInAnimator;
39 | import com.daimajia.androidanimations.library.bouncing_entrances.BounceInDownAnimator;
40 | import com.daimajia.androidanimations.library.bouncing_entrances.BounceInLeftAnimator;
41 | import com.daimajia.androidanimations.library.bouncing_entrances.BounceInRightAnimator;
42 | import com.daimajia.androidanimations.library.bouncing_entrances.BounceInUpAnimator;
43 | import com.daimajia.androidanimations.library.fading_entrances.FadeInAnimator;
44 | import com.daimajia.androidanimations.library.fading_entrances.FadeInDownAnimator;
45 | import com.daimajia.androidanimations.library.fading_entrances.FadeInLeftAnimator;
46 | import com.daimajia.androidanimations.library.fading_entrances.FadeInRightAnimator;
47 | import com.daimajia.androidanimations.library.fading_entrances.FadeInUpAnimator;
48 | import com.daimajia.androidanimations.library.fading_exits.FadeOutAnimator;
49 | import com.daimajia.androidanimations.library.fading_exits.FadeOutDownAnimator;
50 | import com.daimajia.androidanimations.library.fading_exits.FadeOutLeftAnimator;
51 | import com.daimajia.androidanimations.library.fading_exits.FadeOutRightAnimator;
52 | import com.daimajia.androidanimations.library.fading_exits.FadeOutUpAnimator;
53 | import com.daimajia.androidanimations.library.flippers.FlipInXAnimator;
54 | import com.daimajia.androidanimations.library.flippers.FlipOutXAnimator;
55 | import com.daimajia.androidanimations.library.flippers.FlipOutYAnimator;
56 | import com.daimajia.androidanimations.library.rotating_entrances.RotateInAnimator;
57 | import com.daimajia.androidanimations.library.rotating_entrances.RotateInDownLeftAnimator;
58 | import com.daimajia.androidanimations.library.rotating_entrances.RotateInDownRightAnimator;
59 | import com.daimajia.androidanimations.library.rotating_entrances.RotateInUpLeftAnimator;
60 | import com.daimajia.androidanimations.library.rotating_entrances.RotateInUpRightAnimator;
61 | import com.daimajia.androidanimations.library.rotating_exits.RotateOutAnimator;
62 | import com.daimajia.androidanimations.library.rotating_exits.RotateOutDownLeftAnimator;
63 | import com.daimajia.androidanimations.library.rotating_exits.RotateOutDownRightAnimator;
64 | import com.daimajia.androidanimations.library.rotating_exits.RotateOutUpLeftAnimator;
65 | import com.daimajia.androidanimations.library.rotating_exits.RotateOutUpRightAnimator;
66 | import com.daimajia.androidanimations.library.sliders.SlideInDownAnimator;
67 | import com.daimajia.androidanimations.library.sliders.SlideInLeftAnimator;
68 | import com.daimajia.androidanimations.library.sliders.SlideInRightAnimator;
69 | import com.daimajia.androidanimations.library.sliders.SlideInUpAnimator;
70 | import com.daimajia.androidanimations.library.sliders.SlideOutDownAnimator;
71 | import com.daimajia.androidanimations.library.sliders.SlideOutLeftAnimator;
72 | import com.daimajia.androidanimations.library.sliders.SlideOutRightAnimator;
73 | import com.daimajia.androidanimations.library.sliders.SlideOutUpAnimator;
74 | import com.daimajia.androidanimations.library.specials.HingeAnimator;
75 | import com.daimajia.androidanimations.library.specials.RollInAnimator;
76 | import com.daimajia.androidanimations.library.specials.RollOutAnimator;
77 | import com.daimajia.androidanimations.library.zooming_entrances.ZoomInAnimator;
78 | import com.daimajia.androidanimations.library.zooming_entrances.ZoomInDownAnimator;
79 | import com.daimajia.androidanimations.library.zooming_entrances.ZoomInLeftAnimator;
80 | import com.daimajia.androidanimations.library.zooming_entrances.ZoomInRightAnimator;
81 | import com.daimajia.androidanimations.library.zooming_entrances.ZoomInUpAnimator;
82 | import com.daimajia.androidanimations.library.zooming_exits.ZoomOutAnimator;
83 | import com.daimajia.androidanimations.library.zooming_exits.ZoomOutDownAnimator;
84 | import com.daimajia.androidanimations.library.zooming_exits.ZoomOutLeftAnimator;
85 | import com.daimajia.androidanimations.library.zooming_exits.ZoomOutRightAnimator;
86 | import com.daimajia.androidanimations.library.zooming_exits.ZoomOutUpAnimator;
87 |
88 | public enum Techniques {
89 |
90 | Flash(FlashAnimator.class),
91 | Pulse(PulseAnimator.class),
92 | RubberBand(RubberBandAnimator.class),
93 | Shake(ShakeAnimator.class),
94 | Swing(SwingAnimator.class),
95 | Wobble(WobbleAnimator.class),
96 | Bounce(BounceAnimator.class),
97 | Tada(TadaAnimator.class),
98 | StandUp(StandUpAnimator.class),
99 | Wave(WaveAnimator.class),
100 |
101 | Hinge(HingeAnimator.class),
102 | RollIn(RollInAnimator.class),
103 | RollOut(RollOutAnimator.class),
104 |
105 | BounceIn(BounceInAnimator.class),
106 | BounceInDown(BounceInDownAnimator.class),
107 | BounceInLeft(BounceInLeftAnimator.class),
108 | BounceInRight(BounceInRightAnimator.class),
109 | BounceInUp(BounceInUpAnimator.class),
110 |
111 | FadeIn(FadeInAnimator.class),
112 | FadeInUp(FadeInUpAnimator.class),
113 | FadeInDown(FadeInDownAnimator.class),
114 | FadeInLeft(FadeInLeftAnimator.class),
115 | FadeInRight(FadeInRightAnimator.class),
116 |
117 | FadeOut(FadeOutAnimator.class),
118 | FadeOutDown(FadeOutDownAnimator.class),
119 | FadeOutLeft(FadeOutLeftAnimator.class),
120 | FadeOutRight(FadeOutRightAnimator.class),
121 | FadeOutUp(FadeOutUpAnimator.class),
122 |
123 | FlipInX(FlipInXAnimator.class),
124 | FlipOutX(FlipOutXAnimator.class),
125 |
126 | FlipOutY(FlipOutYAnimator.class),
127 | RotateIn(RotateInAnimator.class),
128 | RotateInDownLeft(RotateInDownLeftAnimator.class),
129 | RotateInDownRight(RotateInDownRightAnimator.class),
130 | RotateInUpLeft(RotateInUpLeftAnimator.class),
131 | RotateInUpRight(RotateInUpRightAnimator.class),
132 |
133 | RotateOut(RotateOutAnimator.class),
134 | RotateOutDownLeft(RotateOutDownLeftAnimator.class),
135 | RotateOutDownRight(RotateOutDownRightAnimator.class),
136 | RotateOutUpLeft(RotateOutUpLeftAnimator.class),
137 | RotateOutUpRight(RotateOutUpRightAnimator.class),
138 |
139 | SlideInLeft(SlideInLeftAnimator.class),
140 | SlideInRight(SlideInRightAnimator.class),
141 | SlideInUp(SlideInUpAnimator.class),
142 | SlideInDown(SlideInDownAnimator.class),
143 |
144 | SlideOutLeft(SlideOutLeftAnimator.class),
145 | SlideOutRight(SlideOutRightAnimator.class),
146 | SlideOutUp(SlideOutUpAnimator.class),
147 | SlideOutDown(SlideOutDownAnimator.class),
148 |
149 | ZoomIn(ZoomInAnimator.class),
150 | ZoomInDown(ZoomInDownAnimator.class),
151 | ZoomInLeft(ZoomInLeftAnimator.class),
152 | ZoomInRight(ZoomInRightAnimator.class),
153 | ZoomInUp(ZoomInUpAnimator.class),
154 |
155 | ZoomOut(ZoomOutAnimator.class),
156 | ZoomOutDown(ZoomOutDownAnimator.class),
157 | ZoomOutLeft(ZoomOutLeftAnimator.class),
158 | ZoomOutRight(ZoomOutRightAnimator.class),
159 | ZoomOutUp(ZoomOutUpAnimator.class);
160 |
161 | private Class animatorClazz;
162 |
163 | private Techniques(Class clazz) {
164 | animatorClazz = clazz;
165 | }
166 |
167 | public BaseViewAnimator getAnimator() {
168 | try {
169 | return (BaseViewAnimator) animatorClazz.newInstance();
170 | } catch (Exception e) {
171 | throw new Error("Can not init animatorClazz instance");
172 | }
173 | }
174 | }
175 |
--------------------------------------------------------------------------------
/library/src/main/java/com/daimajia/androidanimations/library/YoYo.java:
--------------------------------------------------------------------------------
1 |
2 | /*
3 | * The MIT License (MIT)
4 | *
5 | * Copyright (c) 2014 daimajia
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in all
15 | * copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 | * SOFTWARE.
24 | */
25 |
26 | package com.daimajia.androidanimations.library;
27 |
28 | import android.view.View;
29 | import android.view.animation.Interpolator;
30 |
31 | import com.nineoldandroids.animation.Animator;
32 |
33 | import java.util.ArrayList;
34 | import java.util.List;
35 |
36 | public class YoYo {
37 |
38 | private static final long DURATION = BaseViewAnimator.DURATION;
39 | private static final long NO_DELAY = 0;
40 |
41 | private Techniques techniques;
42 | private long duration;
43 | private long delay;
44 | private Interpolator interpolator;
45 | private List callbacks;
46 | private View target;
47 |
48 | private YoYo(AnimationComposer animationComposer) {
49 | techniques = animationComposer.techniques;
50 | duration = animationComposer.duration;
51 | delay = animationComposer.delay;
52 | interpolator = animationComposer.interpolator;
53 | callbacks = animationComposer.callbacks;
54 | target = animationComposer.target;
55 | }
56 |
57 | public static AnimationComposer with(Techniques techniques) {
58 | return new AnimationComposer(techniques);
59 | }
60 |
61 | public static final class AnimationComposer {
62 |
63 | private List callbacks = new ArrayList();
64 |
65 | private Techniques techniques;
66 | private long duration = DURATION;
67 | private long delay = NO_DELAY;
68 | private Interpolator interpolator;
69 | private View target;
70 |
71 | private AnimationComposer(Techniques techniques) {
72 | this.techniques = techniques;
73 | }
74 |
75 | public AnimationComposer duration(long duration) {
76 | this.duration = duration;
77 | return this;
78 | }
79 |
80 | public AnimationComposer delay(long delay) {
81 | this.delay = delay;
82 | return this;
83 | }
84 |
85 | public AnimationComposer interpolate(Interpolator interpolator) {
86 | this.interpolator = interpolator;
87 | return this;
88 | }
89 |
90 |
91 | public AnimationComposer withListener(Animator.AnimatorListener listener) {
92 | callbacks.add(listener);
93 | return this;
94 | }
95 |
96 | public void playOn(View target) {
97 | this.target = target;
98 | new YoYo(this).play();
99 | }
100 |
101 | }
102 |
103 | private void play() {
104 | final BaseViewAnimator animator = techniques.getAnimator();
105 |
106 | animator.setDuration(duration)
107 | .setInterpolator(interpolator)
108 | .setStartDelay(delay);
109 |
110 | if (callbacks.size() > 0) {
111 | for (Animator.AnimatorListener callback : callbacks) {
112 | animator.addAnimatorListener(callback);
113 | }
114 | }
115 |
116 | animator.animate(target);
117 | }
118 |
119 | }
120 |
--------------------------------------------------------------------------------
/library/src/main/java/com/daimajia/androidanimations/library/attention/BounceAnimator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License (MIT)
3 | *
4 | * Copyright (c) 2014 daimajia
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | package com.daimajia.androidanimations.library.attention;
26 |
27 | import android.view.View;
28 |
29 | import com.daimajia.androidanimations.library.BaseViewAnimator;
30 | import com.nineoldandroids.animation.ObjectAnimator;
31 |
32 | public class BounceAnimator extends BaseViewAnimator {
33 | @Override
34 | public void prepare(View target) {
35 | getAnimatorAgent().playTogether(
36 | ObjectAnimator.ofFloat(target,"translationY",0,0,-30,0,-15,0,0)
37 | );
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/library/src/main/java/com/daimajia/androidanimations/library/attention/FlashAnimator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License (MIT)
3 | *
4 | * Copyright (c) 2014 daimajia
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | package com.daimajia.androidanimations.library.attention;
26 |
27 | import android.view.View;
28 |
29 | import com.daimajia.androidanimations.library.BaseViewAnimator;
30 | import com.nineoldandroids.animation.ObjectAnimator;
31 |
32 | public class FlashAnimator extends BaseViewAnimator{
33 | @Override
34 | public void prepare(View target) {
35 | getAnimatorAgent().playTogether(
36 | ObjectAnimator.ofFloat(target,"alpha",1,0,1,0,1)
37 | );
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/library/src/main/java/com/daimajia/androidanimations/library/attention/PulseAnimator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License (MIT)
3 | *
4 | * Copyright (c) 2014 daimajia
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | package com.daimajia.androidanimations.library.attention;
26 |
27 | import android.view.View;
28 |
29 | import com.daimajia.androidanimations.library.BaseViewAnimator;
30 | import com.nineoldandroids.animation.ObjectAnimator;
31 |
32 | public class PulseAnimator extends BaseViewAnimator {
33 | @Override
34 | public void prepare(View target) {
35 | getAnimatorAgent().playTogether(
36 | ObjectAnimator.ofFloat(target, "scaleY", 1, 1.1f, 1),
37 | ObjectAnimator.ofFloat(target, "scaleX", 1, 1.1f, 1)
38 | );
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/library/src/main/java/com/daimajia/androidanimations/library/attention/RubberBandAnimator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License (MIT)
3 | *
4 | * Copyright (c) 2014 daimajia
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | package com.daimajia.androidanimations.library.attention;
26 |
27 | import android.view.View;
28 |
29 | import com.daimajia.androidanimations.library.BaseViewAnimator;
30 | import com.nineoldandroids.animation.ObjectAnimator;
31 |
32 | public class RubberBandAnimator extends BaseViewAnimator {
33 | @Override
34 | public void prepare(View target) {
35 | getAnimatorAgent().playTogether(
36 | ObjectAnimator.ofFloat(target, "scaleX", 1, 1.25f, 0.75f, 1.15f, 1),
37 | ObjectAnimator.ofFloat(target, "scaleY", 1, 0.75f, 1.25f, 0.85f, 1)
38 | );
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/library/src/main/java/com/daimajia/androidanimations/library/attention/ShakeAnimator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License (MIT)
3 | *
4 | * Copyright (c) 2014 daimajia
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | package com.daimajia.androidanimations.library.attention;
26 |
27 |
28 | import android.view.View;
29 |
30 | import com.daimajia.androidanimations.library.BaseViewAnimator;
31 | import com.nineoldandroids.animation.ObjectAnimator;
32 |
33 | public class ShakeAnimator extends BaseViewAnimator {
34 | @Override
35 | public void prepare(View target) {
36 | getAnimatorAgent().playTogether(
37 | ObjectAnimator.ofFloat(target, "translationX", 0, 25, -25, 25, -25,15, -15, 6, -6, 0)
38 | );
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/library/src/main/java/com/daimajia/androidanimations/library/attention/StandUpAnimator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License (MIT)
3 | *
4 | * Copyright (c) 2014 daimajia
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | package com.daimajia.androidanimations.library.attention;
26 |
27 | import android.view.View;
28 |
29 | import com.daimajia.androidanimations.library.BaseViewAnimator;
30 | import com.nineoldandroids.animation.ObjectAnimator;
31 |
32 |
33 |
34 | public class StandUpAnimator extends BaseViewAnimator{
35 | @Override
36 | protected void prepare(View target) {
37 | float x = (target.getWidth() - target.getPaddingLeft() - target.getPaddingRight())/2
38 | + target.getPaddingLeft();
39 | float y = target.getHeight() - target.getPaddingBottom();
40 | getAnimatorAgent().playTogether(
41 | ObjectAnimator.ofFloat(target,"pivotX",x,x,x,x,x),
42 | ObjectAnimator.ofFloat(target,"pivotY",y,y,y,y,y),
43 | ObjectAnimator.ofFloat(target,"rotationX",55,-30,15,-15,0)
44 | );
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/library/src/main/java/com/daimajia/androidanimations/library/attention/SwingAnimator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License (MIT)
3 | *
4 | * Copyright (c) 2014 daimajia
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | package com.daimajia.androidanimations.library.attention;
26 |
27 | import android.view.View;
28 |
29 | import com.daimajia.androidanimations.library.BaseViewAnimator;
30 | import com.nineoldandroids.animation.ObjectAnimator;
31 |
32 | public class SwingAnimator extends BaseViewAnimator {
33 | @Override
34 | public void prepare(View target) {
35 | getAnimatorAgent().playTogether(
36 | ObjectAnimator.ofFloat(target, "rotation", 0, 10, -10, 6, -6, 3, -3, 0)
37 | );
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/library/src/main/java/com/daimajia/androidanimations/library/attention/TadaAnimator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License (MIT)
3 | *
4 | * Copyright (c) 2014 daimajia
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | package com.daimajia.androidanimations.library.attention;
26 |
27 | import android.view.View;
28 |
29 | import com.daimajia.androidanimations.library.BaseViewAnimator;
30 | import com.nineoldandroids.animation.ObjectAnimator;
31 |
32 | public class TadaAnimator extends BaseViewAnimator {
33 | @Override
34 | public void prepare(View target) {
35 | getAnimatorAgent().playTogether(
36 | ObjectAnimator.ofFloat(target,"scaleX",1,0.9f,0.9f,1.1f,1.1f,1.1f,1.1f,1.1f,1.1f,1),
37 | ObjectAnimator.ofFloat(target,"scaleY",1,0.9f,0.9f,1.1f,1.1f,1.1f,1.1f,1.1f,1.1f,1),
38 | ObjectAnimator.ofFloat(target,"rotation",0 ,-3 , -3, 3, -3, 3, -3,3,-3,0)
39 | );
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/library/src/main/java/com/daimajia/androidanimations/library/attention/WaveAnimator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License (MIT)
3 | *
4 | * Copyright (c) 2014 daimajia
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | package com.daimajia.androidanimations.library.attention;
26 |
27 | import android.view.View;
28 |
29 | import com.daimajia.androidanimations.library.BaseViewAnimator;
30 | import com.nineoldandroids.animation.ObjectAnimator;
31 |
32 | public class WaveAnimator extends BaseViewAnimator{
33 | @Override
34 | protected void prepare(View target) {
35 | float x = (target.getWidth() - target.getPaddingLeft() - target.getPaddingRight())/2
36 | + target.getPaddingLeft();
37 | float y = target.getHeight() - target.getPaddingBottom();
38 | getAnimatorAgent().playTogether(
39 | ObjectAnimator.ofFloat(target, "rotation", 12,-12,3,-3,0),
40 | ObjectAnimator.ofFloat(target, "pivotX", x, x,x,x,x),
41 | ObjectAnimator.ofFloat(target, "pivotY", y, y,y,y,y)
42 | );
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/library/src/main/java/com/daimajia/androidanimations/library/attention/WobbleAnimator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License (MIT)
3 | *
4 | * Copyright (c) 2014 daimajia
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | package com.daimajia.androidanimations.library.attention;
26 |
27 | import android.view.View;
28 |
29 | import com.daimajia.androidanimations.library.BaseViewAnimator;
30 | import com.nineoldandroids.animation.ObjectAnimator;
31 |
32 | public class WobbleAnimator extends BaseViewAnimator {
33 | @Override
34 | public void prepare(View target) {
35 | float width = target.getWidth();
36 | float one = (float)(width/100.0);
37 | getAnimatorAgent().playTogether(
38 | ObjectAnimator.ofFloat(target, "translationX", 0 * one, -25 * one, 20 * one, -15 * one, 10 * one, -5 * one, 0 * one,0),
39 | ObjectAnimator.ofFloat(target, "rotation", 0, -5, 3, -3, 2, -1,0)
40 | );
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/library/src/main/java/com/daimajia/androidanimations/library/bouncing_entrances/BounceInAnimator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License (MIT)
3 | *
4 | * Copyright (c) 2014 daimajia
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | package com.daimajia.androidanimations.library.bouncing_entrances;
26 |
27 | import android.view.View;
28 |
29 | import com.daimajia.androidanimations.library.BaseViewAnimator;
30 | import com.nineoldandroids.animation.ObjectAnimator;
31 |
32 | public class BounceInAnimator extends BaseViewAnimator {
33 | @Override
34 | public void prepare(View target) {
35 | getAnimatorAgent().playTogether(
36 | ObjectAnimator.ofFloat(target,"alpha",0,1, 1 ,1),
37 | ObjectAnimator.ofFloat(target,"scaleX",0.3f,1.05f,0.9f,1),
38 | ObjectAnimator.ofFloat(target,"scaleY",0.3f,1.05f,0.9f,1)
39 | );
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/library/src/main/java/com/daimajia/androidanimations/library/bouncing_entrances/BounceInDownAnimator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License (MIT)
3 | *
4 | * Copyright (c) 2014 daimajia
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | package com.daimajia.androidanimations.library.bouncing_entrances;
26 |
27 | import android.view.View;
28 |
29 | import com.daimajia.androidanimations.library.BaseViewAnimator;
30 | import com.nineoldandroids.animation.ObjectAnimator;
31 |
32 | public class BounceInDownAnimator extends BaseViewAnimator {
33 | @Override
34 | public void prepare(View target) {
35 | getAnimatorAgent().playTogether(
36 | ObjectAnimator.ofFloat(target,"alpha",0,1,1,1),
37 | ObjectAnimator.ofFloat(target,"translationY",-target.getHeight(),30,-10,0)
38 | );
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/library/src/main/java/com/daimajia/androidanimations/library/bouncing_entrances/BounceInLeftAnimator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License (MIT)
3 | *
4 | * Copyright (c) 2014 daimajia
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | package com.daimajia.androidanimations.library.bouncing_entrances;
26 |
27 | import android.view.View;
28 |
29 | import com.daimajia.androidanimations.library.BaseViewAnimator;
30 | import com.nineoldandroids.animation.ObjectAnimator;
31 |
32 | public class BounceInLeftAnimator extends BaseViewAnimator {
33 | @Override
34 | public void prepare(View target) {
35 | getAnimatorAgent().playTogether(
36 | ObjectAnimator.ofFloat(target,"translationX",-target.getWidth(),30,-10,0),
37 | ObjectAnimator.ofFloat(target,"alpha",0,1,1,1)
38 | );
39 | }
40 | }
41 |
42 |
--------------------------------------------------------------------------------
/library/src/main/java/com/daimajia/androidanimations/library/bouncing_entrances/BounceInRightAnimator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License (MIT)
3 | *
4 | * Copyright (c) 2014 daimajia
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | package com.daimajia.androidanimations.library.bouncing_entrances;
26 |
27 | import android.view.View;
28 |
29 | import com.daimajia.androidanimations.library.BaseViewAnimator;
30 | import com.nineoldandroids.animation.ObjectAnimator;
31 |
32 | public class BounceInRightAnimator extends BaseViewAnimator{
33 | @Override
34 | public void prepare(View target) {
35 | getAnimatorAgent().playTogether(
36 | ObjectAnimator.ofFloat(target,"translationX",target.getMeasuredWidth()+target.getWidth(),-30,10,0),
37 | ObjectAnimator.ofFloat(target,"alpha",0,1,1,1)
38 | );
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/library/src/main/java/com/daimajia/androidanimations/library/bouncing_entrances/BounceInUpAnimator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License (MIT)
3 | *
4 | * Copyright (c) 2014 daimajia
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | package com.daimajia.androidanimations.library.bouncing_entrances;
26 |
27 | import android.view.View;
28 |
29 | import com.daimajia.androidanimations.library.BaseViewAnimator;
30 | import com.nineoldandroids.animation.ObjectAnimator;
31 |
32 | public class BounceInUpAnimator extends BaseViewAnimator {
33 | @Override
34 | public void prepare(View target) {
35 | getAnimatorAgent().playTogether(
36 | ObjectAnimator.ofFloat(target,"translationY",target.getMeasuredHeight(), -30,10,0),
37 | ObjectAnimator.ofFloat(target,"alpha",0,1,1,1)
38 | );
39 | }
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/library/src/main/java/com/daimajia/androidanimations/library/fading_entrances/FadeInAnimator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License (MIT)
3 | *
4 | * Copyright (c) 2014 daimajia
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | package com.daimajia.androidanimations.library.fading_entrances;
26 |
27 | import android.view.View;
28 |
29 | import com.daimajia.androidanimations.library.BaseViewAnimator;
30 | import com.nineoldandroids.animation.ObjectAnimator;
31 |
32 | public class FadeInAnimator extends BaseViewAnimator {
33 | @Override
34 | public void prepare(View target) {
35 | getAnimatorAgent().playTogether(
36 | ObjectAnimator.ofFloat(target,"alpha",0,1)
37 | );
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/library/src/main/java/com/daimajia/androidanimations/library/fading_entrances/FadeInDownAnimator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License (MIT)
3 | *
4 | * Copyright (c) 2014 daimajia
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | package com.daimajia.androidanimations.library.fading_entrances;
26 |
27 | import android.view.View;
28 |
29 | import com.daimajia.androidanimations.library.BaseViewAnimator;
30 | import com.nineoldandroids.animation.ObjectAnimator;
31 |
32 | public class FadeInDownAnimator extends BaseViewAnimator {
33 | @Override
34 | public void prepare(View target) {
35 | getAnimatorAgent().playTogether(
36 | ObjectAnimator.ofFloat(target, "alpha", 0, 1),
37 | ObjectAnimator.ofFloat(target, "translationY", -20, 0)
38 | );
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/library/src/main/java/com/daimajia/androidanimations/library/fading_entrances/FadeInLeftAnimator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License (MIT)
3 | *
4 | * Copyright (c) 2014 daimajia
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | package com.daimajia.androidanimations.library.fading_entrances;
26 |
27 | import android.view.View;
28 |
29 | import com.daimajia.androidanimations.library.BaseViewAnimator;
30 | import com.nineoldandroids.animation.ObjectAnimator;
31 |
32 | public class FadeInLeftAnimator extends BaseViewAnimator {
33 | @Override
34 | public void prepare(View target) {
35 | getAnimatorAgent().playTogether(
36 | ObjectAnimator.ofFloat(target, "alpha", 0, 1),
37 | ObjectAnimator.ofFloat(target, "translationX", -20, 0)
38 | );
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/library/src/main/java/com/daimajia/androidanimations/library/fading_entrances/FadeInRightAnimator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License (MIT)
3 | *
4 | * Copyright (c) 2014 daimajia
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | package com.daimajia.androidanimations.library.fading_entrances;
26 |
27 | import android.view.View;
28 |
29 | import com.daimajia.androidanimations.library.BaseViewAnimator;
30 | import com.nineoldandroids.animation.ObjectAnimator;
31 |
32 | public class FadeInRightAnimator extends BaseViewAnimator {
33 | @Override
34 | public void prepare(View target) {
35 | getAnimatorAgent().playTogether(
36 | ObjectAnimator.ofFloat(target, "alpha", 0, 1),
37 | ObjectAnimator.ofFloat(target, "translationX", 20, 0)
38 | );
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/library/src/main/java/com/daimajia/androidanimations/library/fading_entrances/FadeInUpAnimator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License (MIT)
3 | *
4 | * Copyright (c) 2014 daimajia
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | package com.daimajia.androidanimations.library.fading_entrances;
26 |
27 | import android.view.View;
28 |
29 | import com.daimajia.androidanimations.library.BaseViewAnimator;
30 | import com.nineoldandroids.animation.ObjectAnimator;
31 |
32 | public class FadeInUpAnimator extends BaseViewAnimator {
33 | @Override
34 | protected void prepare(View target) {
35 | getAnimatorAgent().playTogether(
36 | ObjectAnimator.ofFloat(target, "alpha", 0, 1),
37 | ObjectAnimator.ofFloat(target, "translationY", 20, 0)
38 | );
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/library/src/main/java/com/daimajia/androidanimations/library/fading_exits/FadeOutAnimator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License (MIT)
3 | *
4 | * Copyright (c) 2014 daimajia
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | package com.daimajia.androidanimations.library.fading_exits;
26 |
27 | import android.view.View;
28 |
29 | import com.daimajia.androidanimations.library.BaseViewAnimator;
30 | import com.nineoldandroids.animation.ObjectAnimator;
31 |
32 | public class FadeOutAnimator extends BaseViewAnimator {
33 | @Override
34 | public void prepare(View target) {
35 | getAnimatorAgent().playTogether(
36 | ObjectAnimator.ofFloat(target,"alpha",1,0)
37 | );
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/library/src/main/java/com/daimajia/androidanimations/library/fading_exits/FadeOutDownAnimator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License (MIT)
3 | *
4 | * Copyright (c) 2014 daimajia
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | package com.daimajia.androidanimations.library.fading_exits;
26 |
27 | import android.view.View;
28 |
29 | import com.daimajia.androidanimations.library.BaseViewAnimator;
30 | import com.nineoldandroids.animation.ObjectAnimator;
31 |
32 | public class FadeOutDownAnimator extends BaseViewAnimator {
33 | @Override
34 | public void prepare(View target) {
35 | getAnimatorAgent().playTogether(
36 | ObjectAnimator.ofFloat(target,"alpha",1,0),
37 | ObjectAnimator.ofFloat(target,"translationY",0,20)
38 | );
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/library/src/main/java/com/daimajia/androidanimations/library/fading_exits/FadeOutLeftAnimator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License (MIT)
3 | *
4 | * Copyright (c) 2014 daimajia
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | package com.daimajia.androidanimations.library.fading_exits;
26 |
27 | import android.view.View;
28 |
29 | import com.daimajia.androidanimations.library.BaseViewAnimator;
30 | import com.nineoldandroids.animation.ObjectAnimator;
31 |
32 | public class FadeOutLeftAnimator extends BaseViewAnimator {
33 | @Override
34 | public void prepare(View target) {
35 | getAnimatorAgent().playTogether(
36 | ObjectAnimator.ofFloat(target,"alpha",1,0),
37 | ObjectAnimator.ofFloat(target,"translationX",0,-20)
38 | );
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/library/src/main/java/com/daimajia/androidanimations/library/fading_exits/FadeOutRightAnimator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License (MIT)
3 | *
4 | * Copyright (c) 2014 daimajia
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | package com.daimajia.androidanimations.library.fading_exits;
26 |
27 | import android.view.View;
28 |
29 | import com.daimajia.androidanimations.library.BaseViewAnimator;
30 | import com.nineoldandroids.animation.ObjectAnimator;
31 |
32 | public class FadeOutRightAnimator extends BaseViewAnimator {
33 | @Override
34 | public void prepare(View target) {
35 | getAnimatorAgent().playTogether(
36 | ObjectAnimator.ofFloat(target, "alpha", 1, 0),
37 | ObjectAnimator.ofFloat(target,"translationX",0,20)
38 | );
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/library/src/main/java/com/daimajia/androidanimations/library/fading_exits/FadeOutUpAnimator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License (MIT)
3 | *
4 | * Copyright (c) 2014 daimajia
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | package com.daimajia.androidanimations.library.fading_exits;
26 |
27 | import android.view.View;
28 |
29 | import com.daimajia.androidanimations.library.BaseViewAnimator;
30 | import com.nineoldandroids.animation.ObjectAnimator;
31 |
32 | public class FadeOutUpAnimator extends BaseViewAnimator {
33 | @Override
34 | public void prepare(View target) {
35 | getAnimatorAgent().playTogether(
36 | ObjectAnimator.ofFloat(target, "alpha", 1, 0),
37 | ObjectAnimator.ofFloat(target,"translationY",0,-20)
38 | );
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/library/src/main/java/com/daimajia/androidanimations/library/flippers/FlipInXAnimator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License (MIT)
3 | *
4 | * Copyright (c) 2014 daimajia
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | package com.daimajia.androidanimations.library.flippers;
26 |
27 | import android.view.View;
28 |
29 | import com.daimajia.androidanimations.library.BaseViewAnimator;
30 | import com.nineoldandroids.animation.ObjectAnimator;
31 |
32 | public class FlipInXAnimator extends BaseViewAnimator {
33 | @Override
34 | public void prepare(View target) {
35 | getAnimatorAgent().playTogether(
36 | ObjectAnimator.ofFloat(target, "rotationX", 90, -15, 15, 0),
37 | ObjectAnimator.ofFloat(target, "alpha", 0.25f, 0.5f, 0.75f, 1)
38 | );
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/library/src/main/java/com/daimajia/androidanimations/library/flippers/FlipOutXAnimator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License (MIT)
3 | *
4 | * Copyright (c) 2014 daimajia
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | package com.daimajia.androidanimations.library.flippers;
26 |
27 | import android.view.View;
28 |
29 | import com.daimajia.androidanimations.library.BaseViewAnimator;
30 | import com.nineoldandroids.animation.ObjectAnimator;
31 |
32 | public class FlipOutXAnimator extends BaseViewAnimator {
33 | @Override
34 | public void prepare(View target) {
35 | getAnimatorAgent().playTogether(
36 | ObjectAnimator.ofFloat(target, "rotationX", 0, 90),
37 | ObjectAnimator.ofFloat(target, "alpha", 1, 0)
38 | );
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/library/src/main/java/com/daimajia/androidanimations/library/flippers/FlipOutYAnimator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License (MIT)
3 | *
4 | * Copyright (c) 2014 daimajia
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | package com.daimajia.androidanimations.library.flippers;
26 |
27 | import android.view.View;
28 |
29 | import com.daimajia.androidanimations.library.BaseViewAnimator;
30 | import com.nineoldandroids.animation.ObjectAnimator;
31 |
32 | public class FlipOutYAnimator extends BaseViewAnimator{
33 | @Override
34 | public void prepare(View target) {
35 | getAnimatorAgent().playTogether(
36 | ObjectAnimator.ofFloat(target, "rotationY", 0, 90),
37 | ObjectAnimator.ofFloat(target, "alpha", 1, 0)
38 | );
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/library/src/main/java/com/daimajia/androidanimations/library/flippers/FlipYAnimator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License (MIT)
3 | *
4 | * Copyright (c) 2014 daimajia
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | package com.daimajia.androidanimations.library.flippers;
26 |
27 | import android.view.View;
28 |
29 | import com.daimajia.androidanimations.library.BaseViewAnimator;
30 | import com.nineoldandroids.animation.ObjectAnimator;
31 |
32 | public class FlipYAnimator extends BaseViewAnimator {
33 | @Override
34 | public void prepare(View target) {
35 | getAnimatorAgent().playTogether(
36 | ObjectAnimator.ofFloat(target, "rotationY", 90, -15, 15, 0),
37 | ObjectAnimator.ofFloat(target, "alpha", 0.25f, 0.5f, 0.75f, 1)
38 | );
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/library/src/main/java/com/daimajia/androidanimations/library/rotating_entrances/RotateInAnimator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License (MIT)
3 | *
4 | * Copyright (c) 2014 daimajia
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | package com.daimajia.androidanimations.library.rotating_entrances;
26 |
27 | import android.view.View;
28 |
29 | import com.daimajia.androidanimations.library.BaseViewAnimator;
30 | import com.nineoldandroids.animation.ObjectAnimator;
31 |
32 | public class RotateInAnimator extends BaseViewAnimator {
33 | @Override
34 | public void prepare(View target) {
35 | getAnimatorAgent().playTogether(
36 | ObjectAnimator.ofFloat(target, "rotation", -200, 0),
37 | ObjectAnimator.ofFloat(target, "alpha", 0, 1)
38 | );
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/library/src/main/java/com/daimajia/androidanimations/library/rotating_entrances/RotateInDownLeftAnimator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License (MIT)
3 | *
4 | * Copyright (c) 2014 daimajia
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | package com.daimajia.androidanimations.library.rotating_entrances;
26 |
27 | import android.view.View;
28 |
29 | import com.daimajia.androidanimations.library.BaseViewAnimator;
30 | import com.nineoldandroids.animation.ObjectAnimator;
31 |
32 | public class RotateInDownLeftAnimator extends BaseViewAnimator {
33 | @Override
34 | public void prepare(View target) {
35 | float x = target.getPaddingLeft();
36 | float y = target.getHeight() - target.getPaddingBottom();
37 | getAnimatorAgent().playTogether(
38 | ObjectAnimator.ofFloat(target, "rotation", -90, 0),
39 | ObjectAnimator.ofFloat(target, "alpha", 0, 1),
40 | ObjectAnimator.ofFloat(target, "pivotX", x, x),
41 | ObjectAnimator.ofFloat(target, "pivotY", y, y)
42 | );
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/library/src/main/java/com/daimajia/androidanimations/library/rotating_entrances/RotateInDownRightAnimator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License (MIT)
3 | *
4 | * Copyright (c) 2014 daimajia
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | package com.daimajia.androidanimations.library.rotating_entrances;
26 |
27 | import android.view.View;
28 |
29 | import com.daimajia.androidanimations.library.BaseViewAnimator;
30 | import com.nineoldandroids.animation.ObjectAnimator;
31 |
32 | public class RotateInDownRightAnimator extends BaseViewAnimator {
33 | @Override
34 | public void prepare(View target) {
35 | float x = target.getWidth() - target.getPaddingRight();
36 | float y = target.getHeight() - target.getPaddingBottom();
37 | getAnimatorAgent().playTogether(
38 | ObjectAnimator.ofFloat(target, "rotation", 90, 0),
39 | ObjectAnimator.ofFloat(target, "alpha", 0, 1),
40 | ObjectAnimator.ofFloat(target, "pivotX", x, x),
41 | ObjectAnimator.ofFloat(target, "pivotY", y, y)
42 | );
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/library/src/main/java/com/daimajia/androidanimations/library/rotating_entrances/RotateInUpLeftAnimator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License (MIT)
3 | *
4 | * Copyright (c) 2014 daimajia
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | package com.daimajia.androidanimations.library.rotating_entrances;
26 |
27 | import android.view.View;
28 |
29 | import com.daimajia.androidanimations.library.BaseViewAnimator;
30 | import com.nineoldandroids.animation.ObjectAnimator;
31 |
32 | public class RotateInUpLeftAnimator extends BaseViewAnimator {
33 | @Override
34 | public void prepare(View target) {
35 | float x = target.getPaddingLeft();
36 | float y = target.getHeight() - target.getPaddingBottom();
37 | getAnimatorAgent().playTogether(
38 | ObjectAnimator.ofFloat(target, "rotation", 90, 0),
39 | ObjectAnimator.ofFloat(target, "alpha", 0, 1),
40 | ObjectAnimator.ofFloat(target, "pivotX", x, x),
41 | ObjectAnimator.ofFloat(target, "pivotY", y, y)
42 | );
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/library/src/main/java/com/daimajia/androidanimations/library/rotating_entrances/RotateInUpRightAnimator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License (MIT)
3 | *
4 | * Copyright (c) 2014 daimajia
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | package com.daimajia.androidanimations.library.rotating_entrances;
26 |
27 | import android.view.View;
28 |
29 | import com.daimajia.androidanimations.library.BaseViewAnimator;
30 | import com.nineoldandroids.animation.ObjectAnimator;
31 |
32 | public class RotateInUpRightAnimator extends BaseViewAnimator{
33 | @Override
34 | public void prepare(View target) {
35 | float x = target.getWidth() - target.getPaddingRight();
36 | float y = target.getHeight() - target.getPaddingBottom();
37 | getAnimatorAgent().playTogether(
38 | ObjectAnimator.ofFloat(target, "rotation", -90, 0),
39 | ObjectAnimator.ofFloat(target, "alpha", 0, 1),
40 | ObjectAnimator.ofFloat(target, "pivotX", x, x),
41 | ObjectAnimator.ofFloat(target, "pivotY", y, y)
42 | );
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/library/src/main/java/com/daimajia/androidanimations/library/rotating_exits/RotateOutAnimator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License (MIT)
3 | *
4 | * Copyright (c) 2014 daimajia
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | package com.daimajia.androidanimations.library.rotating_exits;
26 |
27 | import android.view.View;
28 |
29 | import com.daimajia.androidanimations.library.BaseViewAnimator;
30 | import com.nineoldandroids.animation.ObjectAnimator;
31 |
32 | public class RotateOutAnimator extends BaseViewAnimator {
33 | @Override
34 | protected void prepare(View target) {
35 | getAnimatorAgent().playTogether(
36 | ObjectAnimator.ofFloat(target,"alpha",1,0),
37 | ObjectAnimator.ofFloat(target,"rotation",0,200)
38 | );
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/library/src/main/java/com/daimajia/androidanimations/library/rotating_exits/RotateOutDownLeftAnimator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License (MIT)
3 | *
4 | * Copyright (c) 2014 daimajia
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | package com.daimajia.androidanimations.library.rotating_exits;
26 |
27 | import android.view.View;
28 |
29 | import com.daimajia.androidanimations.library.BaseViewAnimator;
30 | import com.nineoldandroids.animation.ObjectAnimator;
31 |
32 | public class RotateOutDownLeftAnimator extends BaseViewAnimator {
33 | @Override
34 | protected void prepare(View target) {
35 | float x = target.getPaddingLeft();
36 | float y = target.getHeight() - target.getPaddingBottom();
37 | getAnimatorAgent().playTogether(
38 | ObjectAnimator.ofFloat(target, "alpha", 1, 0),
39 | ObjectAnimator.ofFloat(target,"rotation",0,90),
40 | ObjectAnimator.ofFloat(target,"pivotX",x,x),
41 | ObjectAnimator.ofFloat(target,"pivotY",y,y)
42 | );
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/library/src/main/java/com/daimajia/androidanimations/library/rotating_exits/RotateOutDownRightAnimator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License (MIT)
3 | *
4 | * Copyright (c) 2014 daimajia
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | package com.daimajia.androidanimations.library.rotating_exits;
26 |
27 | import android.view.View;
28 |
29 | import com.daimajia.androidanimations.library.BaseViewAnimator;
30 | import com.nineoldandroids.animation.ObjectAnimator;
31 |
32 | public class RotateOutDownRightAnimator extends BaseViewAnimator {
33 | @Override
34 | protected void prepare(View target) {
35 | float x = target.getWidth() - target.getPaddingRight();
36 | float y = target.getHeight() - target.getPaddingBottom();
37 | getAnimatorAgent().playTogether(
38 | ObjectAnimator.ofFloat(target, "alpha", 1, 0),
39 | ObjectAnimator.ofFloat(target,"rotation",0,-90),
40 | ObjectAnimator.ofFloat(target,"pivotX",x,x),
41 | ObjectAnimator.ofFloat(target,"pivotY",y,y)
42 | );
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/library/src/main/java/com/daimajia/androidanimations/library/rotating_exits/RotateOutUpLeftAnimator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License (MIT)
3 | *
4 | * Copyright (c) 2014 daimajia
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | package com.daimajia.androidanimations.library.rotating_exits;
26 |
27 | import android.view.View;
28 |
29 | import com.daimajia.androidanimations.library.BaseViewAnimator;
30 | import com.nineoldandroids.animation.ObjectAnimator;
31 |
32 | public class RotateOutUpLeftAnimator extends BaseViewAnimator {
33 | @Override
34 | protected void prepare(View target) {
35 | float x = target.getPaddingLeft();
36 | float y = target.getHeight() - target.getPaddingBottom();
37 | getAnimatorAgent().playTogether(
38 | ObjectAnimator.ofFloat(target, "alpha", 1, 0),
39 | ObjectAnimator.ofFloat(target,"rotation",0,-90),
40 | ObjectAnimator.ofFloat(target,"pivotX",x,x),
41 | ObjectAnimator.ofFloat(target,"pivotY",y,y)
42 | );
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/library/src/main/java/com/daimajia/androidanimations/library/rotating_exits/RotateOutUpRightAnimator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License (MIT)
3 | *
4 | * Copyright (c) 2014 daimajia
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | package com.daimajia.androidanimations.library.rotating_exits;
26 |
27 | import android.view.View;
28 |
29 | import com.daimajia.androidanimations.library.BaseViewAnimator;
30 | import com.nineoldandroids.animation.ObjectAnimator;
31 |
32 | public class RotateOutUpRightAnimator extends BaseViewAnimator {
33 | @Override
34 | protected void prepare(View target) {
35 | float x = target.getWidth() - target.getPaddingRight();
36 | float y = target.getHeight() - target.getPaddingBottom();
37 | getAnimatorAgent().playTogether(
38 | ObjectAnimator.ofFloat(target, "alpha", 1, 0),
39 | ObjectAnimator.ofFloat(target,"rotation",0,90),
40 | ObjectAnimator.ofFloat(target,"pivotX",x,x),
41 | ObjectAnimator.ofFloat(target,"pivotY",y,y)
42 | );
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/library/src/main/java/com/daimajia/androidanimations/library/sliders/SlideInDownAnimator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License (MIT)
3 | *
4 | * Copyright (c) 2014 daimajia
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | package com.daimajia.androidanimations.library.sliders;
26 |
27 | import android.view.View;
28 |
29 | import com.daimajia.androidanimations.library.BaseViewAnimator;
30 | import com.nineoldandroids.animation.ObjectAnimator;
31 |
32 | public class SlideInDownAnimator extends BaseViewAnimator {
33 | @Override
34 | protected void prepare(View target) {
35 | getAnimatorAgent().playTogether(
36 | ObjectAnimator.ofFloat(target,"alpha",0,1),
37 | ObjectAnimator.ofFloat(target,"translationY",-2000,0)
38 | );
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/library/src/main/java/com/daimajia/androidanimations/library/sliders/SlideInLeftAnimator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License (MIT)
3 | *
4 | * Copyright (c) 2014 daimajia
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | package com.daimajia.androidanimations.library.sliders;
26 |
27 | import android.view.View;
28 |
29 | import com.daimajia.androidanimations.library.BaseViewAnimator;
30 | import com.nineoldandroids.animation.ObjectAnimator;
31 |
32 | public class SlideInLeftAnimator extends BaseViewAnimator{
33 | @Override
34 | protected void prepare(View target) {
35 | getAnimatorAgent().playTogether(
36 | ObjectAnimator.ofFloat(target, "alpha", 0, 1),
37 | ObjectAnimator.ofFloat(target,"translationX",-2000,0)
38 | );
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/library/src/main/java/com/daimajia/androidanimations/library/sliders/SlideInRightAnimator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License (MIT)
3 | *
4 | * Copyright (c) 2014 daimajia
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | package com.daimajia.androidanimations.library.sliders;
26 |
27 | import android.view.View;
28 |
29 | import com.daimajia.androidanimations.library.BaseViewAnimator;
30 | import com.nineoldandroids.animation.ObjectAnimator;
31 |
32 | public class SlideInRightAnimator extends BaseViewAnimator {
33 | @Override
34 | protected void prepare(View target) {
35 | getAnimatorAgent().playTogether(
36 | ObjectAnimator.ofFloat(target, "alpha", 0, 1),
37 | ObjectAnimator.ofFloat(target,"translationX",2000,0)
38 | );
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/library/src/main/java/com/daimajia/androidanimations/library/sliders/SlideInUpAnimator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License (MIT)
3 | *
4 | * Copyright (c) 2014 daimajia
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | package com.daimajia.androidanimations.library.sliders;
26 |
27 | import android.view.View;
28 |
29 | import com.daimajia.androidanimations.library.BaseViewAnimator;
30 | import com.nineoldandroids.animation.ObjectAnimator;
31 |
32 | public class SlideInUpAnimator extends BaseViewAnimator {
33 | @Override
34 | protected void prepare(View target) {
35 | getAnimatorAgent().playTogether(
36 | ObjectAnimator.ofFloat(target, "alpha", 0, 1),
37 | ObjectAnimator.ofFloat(target,"translationY",2000,0)
38 | );
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/library/src/main/java/com/daimajia/androidanimations/library/sliders/SlideOutDownAnimator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License (MIT)
3 | *
4 | * Copyright (c) 2014 daimajia
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | package com.daimajia.androidanimations.library.sliders;
26 |
27 | import android.view.View;
28 |
29 | import com.daimajia.androidanimations.library.BaseViewAnimator;
30 | import com.nineoldandroids.animation.ObjectAnimator;
31 |
32 | public class SlideOutDownAnimator extends BaseViewAnimator {
33 | @Override
34 | protected void prepare(View target) {
35 | getAnimatorAgent().playTogether(
36 | ObjectAnimator.ofFloat(target, "alpha", 1, 0),
37 | ObjectAnimator.ofFloat(target,"translationY",0,2000)
38 | );
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/library/src/main/java/com/daimajia/androidanimations/library/sliders/SlideOutLeftAnimator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License (MIT)
3 | *
4 | * Copyright (c) 2014 daimajia
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | package com.daimajia.androidanimations.library.sliders;
26 |
27 | import android.view.View;
28 |
29 | import com.daimajia.androidanimations.library.BaseViewAnimator;
30 | import com.nineoldandroids.animation.ObjectAnimator;
31 |
32 | public class SlideOutLeftAnimator extends BaseViewAnimator {
33 | @Override
34 | protected void prepare(View target) {
35 | getAnimatorAgent().playTogether(
36 | ObjectAnimator.ofFloat(target, "alpha", 1, 0),
37 | ObjectAnimator.ofFloat(target,"translationX",0,-2000)
38 | );
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/library/src/main/java/com/daimajia/androidanimations/library/sliders/SlideOutRightAnimator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License (MIT)
3 | *
4 | * Copyright (c) 2014 daimajia
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | package com.daimajia.androidanimations.library.sliders;
26 |
27 | import android.view.View;
28 |
29 | import com.daimajia.androidanimations.library.BaseViewAnimator;
30 | import com.nineoldandroids.animation.ObjectAnimator;
31 |
32 | public class SlideOutRightAnimator extends BaseViewAnimator {
33 | @Override
34 | protected void prepare(View target) {
35 | getAnimatorAgent().playTogether(
36 | ObjectAnimator.ofFloat(target, "alpha", 1, 0),
37 | ObjectAnimator.ofFloat(target,"translationX",0,2000)
38 | );
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/library/src/main/java/com/daimajia/androidanimations/library/sliders/SlideOutUpAnimator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License (MIT)
3 | *
4 | * Copyright (c) 2014 daimajia
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | package com.daimajia.androidanimations.library.sliders;
26 |
27 | import android.view.View;
28 |
29 | import com.daimajia.androidanimations.library.BaseViewAnimator;
30 | import com.nineoldandroids.animation.ObjectAnimator;
31 |
32 | public class SlideOutUpAnimator extends BaseViewAnimator {
33 | @Override
34 | protected void prepare(View target) {
35 | getAnimatorAgent().playTogether(
36 | ObjectAnimator.ofFloat(target, "alpha", 1, 0),
37 | ObjectAnimator.ofFloat(target,"translationY",0,-2000)
38 | );
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/library/src/main/java/com/daimajia/androidanimations/library/specials/HingeAnimator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License (MIT)
3 | *
4 | * Copyright (c) 2014 daimajia
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | package com.daimajia.androidanimations.library.specials;
26 |
27 | import android.view.View;
28 |
29 | import com.daimajia.androidanimations.library.BaseViewAnimator;
30 | import com.daimajia.easing.Glider;
31 | import com.daimajia.easing.Skill;
32 | import com.nineoldandroids.animation.ObjectAnimator;
33 |
34 | public class HingeAnimator extends BaseViewAnimator{
35 | @Override
36 | protected void prepare(View target) {
37 | float x = target.getPaddingLeft();
38 | float y = target.getPaddingTop();
39 | getAnimatorAgent().playTogether(
40 | Glider.glide(Skill.SineEaseInOut, 1300, ObjectAnimator.ofFloat(target,"rotation",0,80,60,80,60,60)),
41 | ObjectAnimator.ofFloat(target, "translationY", 0, 0, 0, 0, 0, 700),
42 | ObjectAnimator.ofFloat(target, "alpha", 1, 1, 1, 1, 1, 0),
43 | ObjectAnimator.ofFloat(target, "pivotX", x, x, x, x, x, x),
44 | ObjectAnimator.ofFloat(target, "pivotY", y, y, y, y, y, y)
45 | );
46 |
47 | setDuration(1300);
48 | }
49 | }
50 |
51 |
--------------------------------------------------------------------------------
/library/src/main/java/com/daimajia/androidanimations/library/specials/RollInAnimator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License (MIT)
3 | *
4 | * Copyright (c) 2014 daimajia
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | package com.daimajia.androidanimations.library.specials;
26 |
27 | import android.view.View;
28 |
29 | import com.daimajia.androidanimations.library.BaseViewAnimator;
30 | import com.nineoldandroids.animation.ObjectAnimator;
31 |
32 | public class RollInAnimator extends BaseViewAnimator {
33 | @Override
34 | protected void prepare(View target) {
35 | getAnimatorAgent().playTogether(
36 | ObjectAnimator.ofFloat(target,"alpha",0,1),
37 | ObjectAnimator.ofFloat(target,"translationX",-(target.getWidth()-target.getPaddingLeft() - target.getPaddingRight()),0),
38 | ObjectAnimator.ofFloat(target,"rotation",-120,0)
39 | );
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/library/src/main/java/com/daimajia/androidanimations/library/specials/RollOutAnimator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License (MIT)
3 | *
4 | * Copyright (c) 2014 daimajia
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | package com.daimajia.androidanimations.library.specials;
26 |
27 | import android.view.View;
28 |
29 | import com.daimajia.androidanimations.library.BaseViewAnimator;
30 | import com.nineoldandroids.animation.ObjectAnimator;
31 |
32 | public class RollOutAnimator extends BaseViewAnimator {
33 | @Override
34 | protected void prepare(View target) {
35 | getAnimatorAgent().playTogether(
36 | ObjectAnimator.ofFloat(target,"alpha",1,0),
37 | ObjectAnimator.ofFloat(target,"translationX",0, target.getWidth()),
38 | ObjectAnimator.ofFloat(target,"rotation",0,120)
39 | );
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/library/src/main/java/com/daimajia/androidanimations/library/zooming_entrances/ZoomInAnimator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License (MIT)
3 | *
4 | * Copyright (c) 2014 daimajia
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | package com.daimajia.androidanimations.library.zooming_entrances;
26 |
27 | import android.view.View;
28 |
29 | import com.daimajia.androidanimations.library.BaseViewAnimator;
30 | import com.nineoldandroids.animation.ObjectAnimator;
31 |
32 | public class ZoomInAnimator extends BaseViewAnimator {
33 | @Override
34 | protected void prepare(View target) {
35 | getAnimatorAgent().playTogether(
36 | ObjectAnimator.ofFloat(target,"scaleX",0.3f,1),
37 | ObjectAnimator.ofFloat(target,"scaleY",0.3f,1),
38 | ObjectAnimator.ofFloat(target,"alpha",0,1)
39 | );
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/library/src/main/java/com/daimajia/androidanimations/library/zooming_entrances/ZoomInDownAnimator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License (MIT)
3 | *
4 | * Copyright (c) 2014 daimajia
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | package com.daimajia.androidanimations.library.zooming_entrances;
26 |
27 | import android.view.View;
28 |
29 | import com.daimajia.androidanimations.library.BaseViewAnimator;
30 | import com.nineoldandroids.animation.ObjectAnimator;
31 |
32 | public class ZoomInDownAnimator extends BaseViewAnimator {
33 | @Override
34 | protected void prepare(View target) {
35 | getAnimatorAgent().playTogether(
36 | ObjectAnimator.ofFloat(target,"scaleX",0.1f,0.475f,1),
37 | ObjectAnimator.ofFloat(target,"scaleY",0.1f,0.475f,1),
38 | ObjectAnimator.ofFloat(target,"translationY",-2000,60,0),
39 | ObjectAnimator.ofFloat(target,"alpha",0,1,1)
40 | );
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/library/src/main/java/com/daimajia/androidanimations/library/zooming_entrances/ZoomInLeftAnimator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License (MIT)
3 | *
4 | * Copyright (c) 2014 daimajia
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | package com.daimajia.androidanimations.library.zooming_entrances;
26 |
27 | import android.view.View;
28 |
29 | import com.daimajia.androidanimations.library.BaseViewAnimator;
30 | import com.nineoldandroids.animation.ObjectAnimator;
31 |
32 | public class ZoomInLeftAnimator extends BaseViewAnimator {
33 | @Override
34 | protected void prepare(View target) {
35 | getAnimatorAgent().playTogether(
36 | ObjectAnimator.ofFloat(target, "scaleX", 0.1f, 0.475f, 1),
37 | ObjectAnimator.ofFloat(target,"scaleY",0.1f,0.475f,1),
38 | ObjectAnimator.ofFloat(target,"translationX",-2000,48,0),
39 | ObjectAnimator.ofFloat(target,"alpha",0,1,1)
40 | );
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/library/src/main/java/com/daimajia/androidanimations/library/zooming_entrances/ZoomInRightAnimator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License (MIT)
3 | *
4 | * Copyright (c) 2014 daimajia
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | package com.daimajia.androidanimations.library.zooming_entrances;
26 |
27 | import android.view.View;
28 |
29 | import com.daimajia.androidanimations.library.BaseViewAnimator;
30 | import com.nineoldandroids.animation.ObjectAnimator;
31 |
32 | public class ZoomInRightAnimator extends BaseViewAnimator {
33 | @Override
34 | protected void prepare(View target) {
35 | getAnimatorAgent().playTogether(
36 | ObjectAnimator.ofFloat(target,"scaleX", 0.1f, 0.475f, 1),
37 | ObjectAnimator.ofFloat(target,"scaleY",0.1f,0.475f,1),
38 | ObjectAnimator.ofFloat(target,"translationX",2000,-48,0),
39 | ObjectAnimator.ofFloat(target,"alpha",0,1,1)
40 | );
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/library/src/main/java/com/daimajia/androidanimations/library/zooming_entrances/ZoomInUpAnimator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License (MIT)
3 | *
4 | * Copyright (c) 2014 daimajia
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | package com.daimajia.androidanimations.library.zooming_entrances;
26 |
27 | import android.view.View;
28 |
29 | import com.daimajia.androidanimations.library.BaseViewAnimator;
30 | import com.nineoldandroids.animation.ObjectAnimator;
31 |
32 | public class ZoomInUpAnimator extends BaseViewAnimator {
33 | @Override
34 | protected void prepare(View target) {
35 | getAnimatorAgent().playTogether(
36 | ObjectAnimator.ofFloat(target,"alpha",0,1,1),
37 | ObjectAnimator.ofFloat(target,"scaleX",0.1f,0.475f,1),
38 | ObjectAnimator.ofFloat(target,"scaleY",0.1f,0.475f,1),
39 | ObjectAnimator.ofFloat(target,"translationY",2000,-60,0)
40 | );
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/library/src/main/java/com/daimajia/androidanimations/library/zooming_exits/ZoomOutAnimator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License (MIT)
3 | *
4 | * Copyright (c) 2014 daimajia
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | package com.daimajia.androidanimations.library.zooming_exits;
26 |
27 | import android.view.View;
28 |
29 | import com.daimajia.androidanimations.library.BaseViewAnimator;
30 | import com.nineoldandroids.animation.ObjectAnimator;
31 |
32 | public class ZoomOutAnimator extends BaseViewAnimator{
33 | @Override
34 | protected void prepare(View target) {
35 | getAnimatorAgent().playTogether(
36 | ObjectAnimator.ofFloat(target,"alpha",1,0,0),
37 | ObjectAnimator.ofFloat(target,"scaleX",1,0.3f,0),
38 | ObjectAnimator.ofFloat(target,"scaleY",1,0.3f,0)
39 | );
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/library/src/main/java/com/daimajia/androidanimations/library/zooming_exits/ZoomOutDownAnimator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License (MIT)
3 | *
4 | * Copyright (c) 2014 daimajia
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | package com.daimajia.androidanimations.library.zooming_exits;
26 |
27 | import android.view.View;
28 |
29 | import com.daimajia.androidanimations.library.BaseViewAnimator;
30 | import com.nineoldandroids.animation.ObjectAnimator;
31 |
32 | public class ZoomOutDownAnimator extends BaseViewAnimator {
33 | @Override
34 | protected void prepare(View target) {
35 | getAnimatorAgent().playTogether(
36 | ObjectAnimator.ofFloat(target, "alpha",1, 1,0),
37 | ObjectAnimator.ofFloat(target,"scaleX",1,0.475f,0.1f),
38 | ObjectAnimator.ofFloat(target,"scaleY",1,0.475f,0.1f),
39 | ObjectAnimator.ofFloat(target,"translationY",0,-60,2000)
40 | );
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/library/src/main/java/com/daimajia/androidanimations/library/zooming_exits/ZoomOutLeftAnimator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License (MIT)
3 | *
4 | * Copyright (c) 2014 daimajia
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | package com.daimajia.androidanimations.library.zooming_exits;
26 |
27 | import android.view.View;
28 |
29 | import com.daimajia.androidanimations.library.BaseViewAnimator;
30 | import com.nineoldandroids.animation.ObjectAnimator;
31 |
32 | public class ZoomOutLeftAnimator extends BaseViewAnimator {
33 | @Override
34 | protected void prepare(View target) {
35 | getAnimatorAgent().playTogether(
36 | ObjectAnimator.ofFloat(target, "alpha",1, 1, 0),
37 | ObjectAnimator.ofFloat(target,"scaleX",1,0.475f,0.1f),
38 | ObjectAnimator.ofFloat(target,"scaleY",1,0.475f,0.1f),
39 | ObjectAnimator.ofFloat(target,"translationX",0,42,-2000)
40 | );
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/library/src/main/java/com/daimajia/androidanimations/library/zooming_exits/ZoomOutRightAnimator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License (MIT)
3 | *
4 | * Copyright (c) 2014 daimajia
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | package com.daimajia.androidanimations.library.zooming_exits;
26 |
27 | import android.view.View;
28 |
29 | import com.daimajia.androidanimations.library.BaseViewAnimator;
30 | import com.nineoldandroids.animation.ObjectAnimator;
31 |
32 | public class ZoomOutRightAnimator extends BaseViewAnimator {
33 | @Override
34 | protected void prepare(View target) {
35 | getAnimatorAgent().playTogether(
36 | ObjectAnimator.ofFloat(target,"alpha", 1, 1, 0),
37 | ObjectAnimator.ofFloat(target,"scaleX",1,0.475f,0.1f),
38 | ObjectAnimator.ofFloat(target,"scaleY",1,0.475f,0.1f),
39 | ObjectAnimator.ofFloat(target,"translationX",0,-42,2000)
40 | );
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/library/src/main/java/com/daimajia/androidanimations/library/zooming_exits/ZoomOutUpAnimator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License (MIT)
3 | *
4 | * Copyright (c) 2014 daimajia
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | package com.daimajia.androidanimations.library.zooming_exits;
26 |
27 | import android.view.View;
28 |
29 | import com.daimajia.androidanimations.library.BaseViewAnimator;
30 | import com.nineoldandroids.animation.ObjectAnimator;
31 |
32 | public class ZoomOutUpAnimator extends BaseViewAnimator {
33 | @Override
34 | protected void prepare(View target) {
35 | getAnimatorAgent().playTogether(
36 | ObjectAnimator.ofFloat(target, "alpha", 1, 1, 0),
37 | ObjectAnimator.ofFloat(target,"scaleX",1,0.475f,0.1f),
38 | ObjectAnimator.ofFloat(target,"scaleY",1,0.475f,0.1f),
39 | ObjectAnimator.ofFloat(target,"translationY",0,60,-2000)
40 | );
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':library', 'demo'
2 |
--------------------------------------------------------------------------------