-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
29 changed files
with
289 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
language: java | ||
jdk: oraclejdk7 | ||
env: | ||
matrix: | ||
- ANDROID_TARGET=android-19 ANDROID_ABI=armeabi-v7a | ||
|
||
before_install: | ||
# Install base Android SDK | ||
- sudo apt-get update -qq | ||
- if [ `uname -m` = x86_64 ]; then sudo apt-get install -qq --force-yes libgd2-xpm ia32-libs ia32-libs-multiarch > /dev/null; fi | ||
- wget http://dl.google.com/android/android-sdk_r22.3-linux.tgz | ||
- tar xzf android-sdk_r22.3-linux.tgz | ||
- export ANDROID_HOME=$PWD/android-sdk-linux | ||
- export PATH=${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools | ||
|
||
# Gradle | ||
- wget http://services.gradle.org/distributions/gradle-1.9-bin.zip | ||
- unzip gradle-1.9-bin.zip | ||
- export GRADLE_HOME=$PWD/gradle-1.9 | ||
- export PATH=$GRADLE_HOME/bin:$PATH | ||
|
||
# Install required components | ||
# For a full list, run `android list sdk -a --extended` | ||
# Note that sysimg-19 downloads only ARM, because only the first license query is accepted. | ||
- echo yes | android update sdk --filter platform-tools --no-ui --force > /dev/null | ||
- echo yes | android update sdk --all --filter build-tools-19.0.3 --no-ui --force > /dev/null | ||
- echo yes | android update sdk --filter android-19 --no-ui --force > /dev/null | ||
- echo yes | android update sdk --filter sysimg-19 --no-ui --force > /dev/null | ||
- echo yes | android update sdk --filter extra-android-support --no-ui --force > /dev/null | ||
- echo yes | android update sdk --filter extra-android-m2repository --no-ui --force > /dev/null | ||
|
||
install: | ||
- ./gradlew assemble |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
# Android View Animations [![Build Status](https://travis-ci.org/daimajia/AndroidAnimations)](https://travis-ci.org/daimajia/AndroidAnimations) | ||
|
||
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. | ||
|
||
So, I started to collect animation effects... and in two days, this project born. | ||
|
||
# Demo | ||
|
||
![](http://ww3.sinaimg.cn/mw690/610dc034jw1ehnv2r93jpg20bx0kokjl.gif) | ||
|
||
# Usage | ||
|
||
## Step 1 | ||
|
||
```groovy | ||
dependencies { | ||
compile 'com.nineoldandroids:library:2.4.0' | ||
compile 'com.daimajia.androidanimations:library:1.0.0@aar' | ||
} | ||
``` | ||
or Maven | ||
|
||
```xml | ||
<dependency> | ||
<groupId>com.nineoldandroids</groupId> | ||
<artifactId>library</artifactId> | ||
<version>2.4.0</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.daimajia.androidanimation</groupId> | ||
<artifactId>library</artifactId> | ||
<version>1.0.0</version> | ||
<type>apklib</type> | ||
</dependency> | ||
``` | ||
|
||
## Step2 | ||
|
||
Just like play Yo-yo. | ||
|
||
```java | ||
YoYo.play(YoYo.Techniques.Shake,findViewById(R.id.eidtor)); | ||
``` | ||
|
||
### Effects | ||
#### attension | ||
`Flash`, `Pulse`, `RubberBand`, `Shake`, `Swing`, `Wobble`, `Bounce`, `Tada` | ||
|
||
#### Special | ||
`Hinge`, `RollIn`, `RollOut` | ||
|
||
#### Bounce | ||
`BounceIn`, `BounceInDown`, `BounceInLeft`, `BounceInRight`, `BounceInUp` | ||
|
||
#### Fade | ||
`FadeIn`, `FadeInDown`, `FadeInLeft`, `FadeInRight` | ||
`FadeOut`, `FadeOutDown`, `FadeOutLeft`, `FadeOutRight`, `FadeOutUp` | ||
|
||
#### Flip | ||
`FlipInX`, `FlipOutX`, `FlipOutY` | ||
|
||
#### Rotate | ||
`RotateIn`, `RotateInDownLeft`, `RotateInDownRight`, `RotateInUpLeft`, `RotateInUpRight` | ||
`RotateOut`, `RotateOutDownLeft`, `RotateOutDownRight`, `RotateOutUpLeft`, `RotateOutUpRight` | ||
|
||
#### Slide | ||
`SlideInLeft`, `SlideInRight`, `SlideInUp`, `SlideInDown` | ||
`SlideOutLeft`, `SlideOutRight`, `SlideOutUp`, `SlideOutDown` | ||
|
||
#### Zoom | ||
`ZoomIn`, `ZoomInDown`, `ZoomInLeft`, `ZoomInRight`, `ZoomInUp` | ||
`ZoomOut`, `ZoomOutDown`, `ZoomOutLeft`, `ZoomOutRight`, `ZoomOutUp` | ||
|
||
Welcome contribute your amazing animation effect. :-D | ||
|
||
#About me | ||
|
||
A student in mainland China. | ||
|
||
Welcome to [offer me an internship](mailto:daimajia@gmail.com). | ||
If you have any new idea about this project, feel free to [contact me](mailto:daimajia@gmail.com). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
apply plugin: 'android-sdk-manager' | ||
apply plugin: 'android' | ||
|
||
android { | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
/* | ||
* Copyright 2013 Chris Banes | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
apply plugin: 'maven' | ||
apply plugin: 'signing' | ||
|
||
def isReleaseBuild() { | ||
return VERSION_NAME.contains("SNAPSHOT") == false | ||
} | ||
|
||
def getReleaseRepositoryUrl() { | ||
return hasProperty('RELEASE_REPOSITORY_URL') ? RELEASE_REPOSITORY_URL | ||
: "https://oss.sonatype.org/service/local/staging/deploy/maven2/" | ||
} | ||
|
||
def getSnapshotRepositoryUrl() { | ||
return hasProperty('SNAPSHOT_REPOSITORY_URL') ? SNAPSHOT_REPOSITORY_URL | ||
: "https://oss.sonatype.org/content/repositories/snapshots/" | ||
} | ||
|
||
def getRepositoryUsername() { | ||
return hasProperty('NEXUS_USERNAME') ? NEXUS_USERNAME : "" | ||
} | ||
|
||
def getRepositoryPassword() { | ||
return hasProperty('NEXUS_PASSWORD') ? NEXUS_PASSWORD : "" | ||
} | ||
|
||
afterEvaluate { project -> | ||
uploadArchives { | ||
repositories { | ||
mavenDeployer { | ||
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } | ||
|
||
pom.groupId = GROUP | ||
pom.artifactId = POM_ARTIFACT_ID | ||
pom.version = VERSION_NAME | ||
|
||
repository(url: getReleaseRepositoryUrl()) { | ||
authentication(userName: getRepositoryUsername(), password: getRepositoryPassword()) | ||
} | ||
snapshotRepository(url: getSnapshotRepositoryUrl()) { | ||
authentication(userName: getRepositoryUsername(), password: getRepositoryPassword()) | ||
} | ||
|
||
pom.project { | ||
name POM_NAME | ||
packaging POM_PACKAGING | ||
description POM_DESCRIPTION | ||
url POM_URL | ||
|
||
scm { | ||
url POM_SCM_URL | ||
connection POM_SCM_CONNECTION | ||
developerConnection POM_SCM_DEV_CONNECTION | ||
} | ||
|
||
licenses { | ||
license { | ||
name POM_LICENCE_NAME | ||
url POM_LICENCE_URL | ||
distribution POM_LICENCE_DIST | ||
} | ||
} | ||
|
||
developers { | ||
developer { | ||
id POM_DEVELOPER_ID | ||
name POM_DEVELOPER_NAME | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
signing { | ||
required { isReleaseBuild() && gradle.taskGraph.hasTask("uploadArchives") } | ||
sign configurations.archives | ||
} | ||
|
||
task apklib(type: Zip){ | ||
appendix = extension = 'apklib' | ||
|
||
from 'AndroidManifest.xml' | ||
into('res') { | ||
from 'res' | ||
} | ||
into('src') { | ||
from 'src' | ||
} | ||
} | ||
|
||
task androidJavadocs(type: Javadoc) { | ||
source = android.sourceSets.main | ||
classpath += project.files(android.getBootClasspath() .join(File.pathSeparator)) | ||
} | ||
|
||
task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) { | ||
classifier = 'javadoc' | ||
from androidJavadocs.destinationDir | ||
} | ||
|
||
task androidSourcesJar(type: Jar) { | ||
classifier = 'sources' | ||
from android.sourceSets.main | ||
} | ||
|
||
artifacts { | ||
archives androidSourcesJar | ||
archives androidJavadocsJar | ||
archives apklib | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Project-wide Gradle settings. | ||
|
||
# IDE (e.g. Android Studio) users: | ||
# Settings specified in this file will override any Gradle settings | ||
# configured through the IDE. | ||
|
||
# For more details on how to configure your build environment visit | ||
# http://www.gradle.org/docs/current/userguide/build_environment.html | ||
|
||
# Specifies the JVM arguments used for the daemon process. | ||
# The setting is particularly useful for tweaking memory settings. | ||
# Default value: -Xmx10248m -XX:MaxPermSize=256m | ||
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 | ||
|
||
# When configured, Gradle will run in incubating parallel mode. | ||
# This option should only be used with decoupled projects. More details, visit | ||
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects | ||
# org.gradle.parallel=true | ||
|
||
POM_NAME=AndroidAnimations Library | ||
POM_ARTIFACT_ID=library | ||
POM_PACKAGING=aar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
include ':app', ':library' | ||
include ':library', 'demo' |