Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 5 additions & 13 deletions EaseAnimation/Demo/build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 22
buildToolsVersion "23.0.0 rc2"
compileSdkVersion 27
buildToolsVersion "27.0.3"

defaultConfig {
applicationId "cimi.com.easedemo"
minSdkVersion 15
targetSdkVersion 22
targetSdkVersion 27
versionCode 1
versionName "1.0"
}
Expand All @@ -17,17 +17,9 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
sourceSets {
main {
jniLibs.srcDirs = ['libs']
}
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
// compile fileTree(dir: 'libs', include: ['*.so'])
compile 'com.android.support:appcompat-v7:22.2.0'
compile files('libs/ease-interpolator-1.0.jar')
compile project(':EaseInterpolatorLib')
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation project(':EaseInterpolatorLib')
}
9 changes: 4 additions & 5 deletions EaseAnimation/EaseInterpolatorLib/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
apply plugin: 'com.android.library'

android {
compileSdkVersion 22
buildToolsVersion "23.0.0 rc2"
compileSdkVersion 27
buildToolsVersion "27.0.3"

defaultConfig {
minSdkVersion 15
targetSdkVersion 22
targetSdkVersion 27
versionCode 1
versionName "1.0"
}
Expand All @@ -19,6 +19,5 @@ android {
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.2.0'
testImplementation 'junit:junit:4.12'
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="cimi.com.easeinterpolator">

<application android:allowBackup="true" android:label="@string/app_name">

</application>
<application android:label="@string/app_name"/>

</manifest>
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
package cimi.com.easeinterpolator;

import android.content.Context;
import android.util.AttributeSet;
import android.view.animation.Interpolator;

/**
* Created by cimi on 15/7/2.
* <img src="../../../../../../docs/images/EaseBackInInterpolator.png"/>
*/

public class EaseBackInInterpolator implements Interpolator {

public EaseBackInInterpolator() {}

public EaseBackInInterpolator(Context context, AttributeSet attrs) {}

public float getInterpolation(float input) {
return input * input * ((1.70158f + 1) * input - 1.70158f);
}
public float getInterpolation(float input) {
return input * input * ((1.70158f + 1) * input - 1.70158f);
}
}
Original file line number Diff line number Diff line change
@@ -1,27 +1,20 @@
package cimi.com.easeinterpolator;

import android.content.Context;
import android.util.AttributeSet;
import android.view.animation.Interpolator;

/**
* Created by cimi on 15/7/2.
* <img src="../../../../../../docs/images/EaseBackInOutInterpolator.png"/>
*/

public class EaseBackInOutInterpolator implements Interpolator {

public EaseBackInOutInterpolator() {}

public EaseBackInOutInterpolator(Context context, AttributeSet attrs) {}

public float getInterpolation(float input) {
float s = 1.70158f;
if((input *= 2) < 1) {
return 0.5f * (input * input * (((s *= (1.525f)) + 1) * input - s));
}

return 0.5f * ((input -= 2) * input * (((s *= (1.525f)) + 1) * input + s) + 2);

}
public float getInterpolation(float input) {
float s = 1.70158f;
if ((input *= 2) < 1) {
return 0.5f * (input * input * (((s *= (1.525f)) + 1) * input - s));
}

return 0.5f * ((input -= 2) * input * (((s *= (1.525f)) + 1) * input + s) + 2);
}
}
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
package cimi.com.easeinterpolator;

import android.content.Context;
import android.util.AttributeSet;
import android.view.animation.Interpolator;

/**
* Created by cimi on 15/7/2.
* <img src="../../../../../../docs/images/EaseBackOutInterpolator.png"/>
*/

public class EaseBackOutInterpolator implements Interpolator {

public EaseBackOutInterpolator() {}

public EaseBackOutInterpolator(Context context, AttributeSet attrs) {}

public float getInterpolation(float input) {
return ((input = input - 1) * input * ((1.70158f + 1) * input + 1.70158f) + 1);
}
public float getInterpolation(float input) {
return ((input = input - 1) * input * ((1.70158f + 1) * input + 1.70158f) + 1);
}
}
Original file line number Diff line number Diff line change
@@ -1,28 +1,22 @@
package cimi.com.easeinterpolator;

import android.content.Context;
import android.util.AttributeSet;
import android.view.animation.Interpolator;

/**
* Created by cimi on 15/7/2.
* <img src="../../../../../../docs/images/EaseBounceInInterpolator.png"/>
*/

public class EaseBounceInInterpolator implements Interpolator {

public EaseBounceInInterpolator() {}

public EaseBounceInInterpolator(Context context, AttributeSet attrs) {}

public float getInterpolation(float input) {
input = 1 - input;
if (input < (1 / 2.75))
return 1 - (7.5625f * input * input);
else if (input < (2 / 2.75))
return 1 - (7.5625f * (input -= (1.5f / 2.75f)) * input + 0.75f);
else if (input < (2.5 / 2.75))
return 1 - (7.5625f * (input -= (2.25f / 2.75f)) * input + 0.9375f);
else
return 1 - (7.5625f * (input -= (2.625f / 2.75f)) * input + 0.984375f);
}
public float getInterpolation(float input) {
input = 1 - input;
if (input < (1 / 2.75)) {
return 1 - (7.5625f * input * input);
} else if (input < (2 / 2.75)) {
return 1 - (7.5625f * (input -= (1.5f / 2.75f)) * input + 0.75f);
} else if (input < (2.5 / 2.75)) {
return 1 - (7.5625f * (input -= (2.25f / 2.75f)) * input + 0.9375f);
} else { return 1 - (7.5625f * (input -= (2.625f / 2.75f)) * input + 0.984375f); }
}
}
Original file line number Diff line number Diff line change
@@ -1,45 +1,40 @@
package cimi.com.easeinterpolator;

import android.content.Context;
import android.util.AttributeSet;
import android.view.animation.Interpolator;

/**
* Created by cimi on 15/7/2.
* <img src="../../../../../../docs/images/EaseBounceInOutInterpolator.png"/>
*/

public class EaseBounceInOutInterpolator implements Interpolator {

public EaseBounceInOutInterpolator() {
}

public EaseBounceInOutInterpolator(Context context, AttributeSet attrs) {
}

public float getInterpolation(float input) {
if ((input) < 0.5f) {
// EaseBounceInInterpolator
input = input * 2;
input = 1 - input;
if (input < (1 / 2.75))
if (input < (1 / 2.75)) {
return (1 - (7.5625f * input * input)) * 0.5f;
else if (input < (2 / 2.75))
} else if (input < (2 / 2.75)) {
return (1 - (7.5625f * (input -= (1.5f / 2.75f)) * input + 0.75f)) * 0.5f;
else if (input < (2.5 / 2.75))
} else if (input < (2.5 / 2.75)) {
return (1 - (7.5625f * (input -= (2.25f / 2.75f)) * input + 0.9375f)) * 0.5f;
else
} else {
return (1 - (7.5625f * (input -= (2.625f / 2.75f)) * input + 0.984375f)) * 0.5f;
}
} else {
// EaseBounceOutInterpolator
input = input * 2 - 1;
if (input < (1 / 2.75))
if (input < (1 / 2.75)) {
return ((7.5625f * input * input)) * 0.5f + 1 * 0.5f;
else if (input < (2 / 2.75))
} else if (input < (2 / 2.75)) {
return ((7.5625f * (input -= (1.5f / 2.75f)) * input + 0.75f)) * 0.5f + 1 * 0.5f;
else if (input < (2.5 / 2.75))
} else if (input < (2.5 / 2.75)) {
return ((7.5625f * (input -= (2.25f / 2.75f)) * input + 0.9375f)) * 0.5f + 1 * 0.5f;
else
} else {
return ((7.5625f * (input -= (2.625f / 2.75f)) * input + 0.984375f)) * 0.5f + 1 * 0.5f;
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,27 +1,21 @@
package cimi.com.easeinterpolator;

import android.content.Context;
import android.util.AttributeSet;
import android.view.animation.Interpolator;

/**
* Created by cimi on 15/7/2.
* <img src="../../../../../../docs/images/EaseBounceOutInterpolator.png"/>
*/

public class EaseBounceOutInterpolator implements Interpolator {

public EaseBounceOutInterpolator() {}

public EaseBounceOutInterpolator(Context context, AttributeSet attrs) {}

public float getInterpolation(float input) {
if (input < (1 / 2.75))
return (7.5625f * input * input);
else if (input < (2 / 2.75))
return (7.5625f * (input -= (1.5f / 2.75f)) * input + 0.75f);
else if (input < (2.5 / 2.75))
return (7.5625f * (input -= (2.25f / 2.75f)) * input + 0.9375f);
else
return (7.5625f * (input -= (2.625f / 2.75f)) * input + 0.984375f);
}
public float getInterpolation(float input) {
if (input < (1 / 2.75)) {
return (7.5625f * input * input);
} else if (input < (2 / 2.75)) {
return (7.5625f * (input -= (1.5f / 2.75f)) * input + 0.75f);
} else if (input < (2.5 / 2.75)) {
return (7.5625f * (input -= (2.25f / 2.75f)) * input + 0.9375f);
} else { return (7.5625f * (input -= (2.625f / 2.75f)) * input + 0.984375f); }
}
}
Original file line number Diff line number Diff line change
@@ -1,30 +1,19 @@
package cimi.com.easeinterpolator;

/**
* Created by cimi on 15/8/17.
*/

import android.content.Context;
import android.util.AttributeSet;
import android.view.animation.Interpolator;

/**
* Created by tracytheron on 15/8/1.
* Created by cimi on 15/8/17.
* <img src="../../../../../../docs/images/EaseBreathInterpolator.png"/>
*/

public class EaseBreathInterpolator implements Interpolator {

public EaseBreathInterpolator() {}

public EaseBreathInterpolator(Context context, AttributeSet attrs) {}

public float getInterpolation(float input) {
if(input < 0.333){
if (input < 0.333) {
return (float) (0.5f + 0.5f * Math.sin(input * 3.0f * Math.PI - Math.PI * 0.5f));
}else{
} else {
return (float) Math.pow((0.5 * Math.sin(-3f * Math.PI * input * 0.5f + Math.PI) + 0.5f), 2);
}

}

}
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
package cimi.com.easeinterpolator;

import android.content.Context;
import android.util.AttributeSet;
import android.view.animation.Interpolator;

/**
* Created by cimi on 15/7/2.
* <img src="../../../../../../docs/images/EaseCircularInInterpolator.png"/>
*/

public class EaseCircularInInterpolator implements Interpolator {

public EaseCircularInInterpolator() {}

public EaseCircularInInterpolator(Context context, AttributeSet attrs) {}

public float getInterpolation(float input) {
return (float) (-1 * (Math.sqrt(1 - input * input) - 1.0f));
}
public float getInterpolation(float input) {
return (float) (-1 * (Math.sqrt(1 - input * input) - 1.0f));
}
}
Loading