Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed nineoldandroids #261

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
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
19 changes: 11 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

task wrapper(type: Wrapper) {
gradleVersion = '2.2.1'
}

buildscript {
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.1.2'
classpath 'com.jakewharton.sdkmanager:gradle-plugin:0.10.+'
classpath 'com.android.tools.build:gradle:2.2.0'
}
}

allprojects {
repositories {
mavenCentral()
jcenter()
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}

project.ext {
minSDKVersion = "9"
}
14 changes: 7 additions & 7 deletions demo/build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
apply plugin: 'android-sdk-manager'

apply plugin: 'com.android.application'


android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
compileSdkVersion 24
buildToolsVersion "24.0.2"

defaultConfig {
minSdkVersion 8
targetSdkVersion 22
minSdkVersion project.minSDKVersion
targetSdkVersion 24
versionCode 2
versionName "1.0.1"
versionName "1.0.2"
}
buildTypes {
release {
Expand All @@ -22,7 +22,7 @@ android {
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':library')
compile 'com.android.support:appcompat-v7:22.+'
compile 'com.android.support:appcompat-v7:24.2.1'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.daimajia.androidanimations:library:1.0.3@aar'
}
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Sun May 03 23:34:25 CST 2015
#Mon Sep 26 15:56:13 CAT 2016
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
21 changes: 10 additions & 11 deletions library/build.gradle
Original file line number Diff line number Diff line change
@@ -1,30 +1,29 @@
apply plugin: 'com.android.library'

android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
compileSdkVersion 24
buildToolsVersion "24.0.2"

defaultConfig {
minSdkVersion 8
targetSdkVersion 22
versionCode 15
versionName "1.1.5"
minSdkVersion project.minSDKVersion
targetSdkVersion 24
versionCode 16
versionName "1.1.6"
}
buildTypes {
release {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
lintOptions {
abortOnError false
}
abortOnError false
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.1.1'
compile "com.android.support:support-v4:22.1.1"
compile 'com.android.support:appcompat-v7:24.2.1'
compile 'com.android.support:support-v4:24.2.1'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.nineoldandroids:library:2.4.0'
}
apply from: './gradle-mvn-push.gradle'
4 changes: 2 additions & 2 deletions library/gradle-mvn-push.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ afterEvaluate { project ->
sign configurations.archives
}

task apklib(type: Zip){
task apklib(type: Zip) {
appendix = extension = 'apklib'

from 'AndroidManifest.xml'
Expand All @@ -109,7 +109,7 @@ afterEvaluate { project ->
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
options.links("http://docs.oracle.com/javase/7/docs/api/");
options.linksOffline "http://d.android.com/reference","${android.sdkDirectory}/docs/reference"
options.linksOffline "http://d.android.com/reference", "${android.sdkDirectory}/docs/reference"
exclude '**/BuildConfig.java'
exclude '**/R.java'
failOnError = false
Expand Down
5 changes: 0 additions & 5 deletions library/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
# 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=AndroidImageSlider Library
POM_ARTIFACT_ID=library
POM_PACKAGING=aar
1 change: 1 addition & 0 deletions library/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.daimajia.slider.library">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -5,41 +5,45 @@
/**
* This interface gives you chance to inject your own animation or do something when the
* {@link com.daimajia.slider.library.Tricks.ViewPagerEx} animation (PagerTransformer) starts or ends.
*
*
* <p>
* <p>
* There are two items you have to know. The first item is the slider you are dragging. This item
* I call it Current Item. The second is the slider that gonna to show. I call that Next Item.
*
* <p>
* When you start to drag the slider in front of you, onPrepareCurrentItemLeaveScreen() and
* onPrepareNextItemShowInScreen will be called.
*
* <p>
* When you finish drag, the onCurrentItemDisappear and onNextItemAppear will be invoked.
*
* <p>
* You can see a demo class {@link com.daimajia.slider.library.Animations.DescriptionAnimation},
* this class gives the description text an animation.
*/
public interface BaseAnimationInterface {

/**
* When the current item prepare to start leaving the screen.
*
* @param current
*/
public void onPrepareCurrentItemLeaveScreen(View current);

/**
* The next item which will be shown in ViewPager/
*
* @param next
*/
public void onPrepareNextItemShowInScreen(View next);

/**
* Current item totally disappear from screen.
*
* @param view
*/
public void onCurrentItemDisappear(View view);

/**
* Next item totally show in screen.
*
* @param view
*/
public void onNextItemAppear(View view);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
package com.daimajia.slider.library.Animations;

import android.animation.ObjectAnimator;
import android.animation.ValueAnimator;
import android.view.View;

import com.daimajia.slider.library.R;
import com.nineoldandroids.animation.ObjectAnimator;
import com.nineoldandroids.animation.ValueAnimator;
import com.nineoldandroids.view.ViewHelper;

/**
* A demo class to show how to use {@link com.daimajia.slider.library.Animations.BaseAnimationInterface}
Expand All @@ -16,19 +15,20 @@ public class DescriptionAnimation implements BaseAnimationInterface {
@Override
public void onPrepareCurrentItemLeaveScreen(View current) {
View descriptionLayout = current.findViewById(R.id.description_layout);
if(descriptionLayout!=null){
if (descriptionLayout != null) {
current.findViewById(R.id.description_layout).setVisibility(View.INVISIBLE);
}
}

/**
* When next item is coming to show, let's hide the description layout.
*
* @param next
*/
@Override
public void onPrepareNextItemShowInScreen(View next) {
View descriptionLayout = next.findViewById(R.id.description_layout);
if(descriptionLayout!=null){
if (descriptionLayout != null) {
next.findViewById(R.id.description_layout).setVisibility(View.INVISIBLE);
}
}
Expand All @@ -42,17 +42,18 @@ public void onCurrentItemDisappear(View view) {
/**
* When next item show in ViewPagerEx, let's make an animation to show the
* description layout.
*
* @param view
*/
@Override
public void onNextItemAppear(View view) {

View descriptionLayout = view.findViewById(R.id.description_layout);
if(descriptionLayout!=null){
float layoutY = ViewHelper.getY(descriptionLayout);
if (descriptionLayout != null) {
float layoutY = View.Y.get(descriptionLayout);
view.findViewById(R.id.description_layout).setVisibility(View.VISIBLE);
ValueAnimator animator = ObjectAnimator.ofFloat(
descriptionLayout,"y",layoutY + descriptionLayout.getHeight(),
descriptionLayout, "y", layoutY + descriptionLayout.getHeight(),
layoutY).setDuration(500);
animator.start();
}
Expand Down
Loading