├── AnimationBanner ├── .idea │ ├── .name │ ├── copyright │ │ └── profiles_settings.xml │ ├── vcs.xml │ ├── encodings.xml │ ├── modules.xml │ ├── runConfigurations.xml │ ├── compiler.xml │ ├── gradle.xml │ └── misc.xml ├── app │ ├── .gitignore │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ ├── banner1.jpg │ │ │ │ │ ├── banner2.png │ │ │ │ │ ├── banner3.jpg │ │ │ │ │ ├── banner4.png │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── values │ │ │ │ │ ├── strings.xml │ │ │ │ │ ├── colors.xml │ │ │ │ │ ├── dimens.xml │ │ │ │ │ └── styles.xml │ │ │ │ ├── values-v21 │ │ │ │ │ └── styles.xml │ │ │ │ ├── values-w820dp │ │ │ │ │ └── dimens.xml │ │ │ │ ├── menu │ │ │ │ │ └── menu_example.xml │ │ │ │ └── layout │ │ │ │ │ ├── content_example.xml │ │ │ │ │ └── activity_example.xml │ │ │ ├── AndroidManifest.xml │ │ │ └── java │ │ │ │ └── me │ │ │ │ └── geed │ │ │ │ ├── animationbanner │ │ │ │ └── ExampleActivity.java │ │ │ │ └── widget │ │ │ │ └── animationbanner │ │ │ │ └── AnimationBanner.java │ │ ├── test │ │ │ └── java │ │ │ │ └── me │ │ │ │ └── geed │ │ │ │ └── animationbanner │ │ │ │ └── ExampleUnitTest.java │ │ └── androidTest │ │ │ └── java │ │ │ └── me │ │ │ └── geed │ │ │ └── animationbanner │ │ │ └── ApplicationTest.java │ ├── proguard-rules.pro │ └── build.gradle ├── settings.gradle ├── .gitignore ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── build.gradle ├── gradle.properties ├── gradlew.bat └── gradlew ├── images └── AnimationBanner.gif ├── .gitignore └── README.md /AnimationBanner/.idea/.name: -------------------------------------------------------------------------------- 1 | AnimationBanner -------------------------------------------------------------------------------- /AnimationBanner/app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /AnimationBanner/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /images/AnimationBanner.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ASPOOK/Android-AnimationBanner/HEAD/images/AnimationBanner.gif -------------------------------------------------------------------------------- /AnimationBanner/.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | -------------------------------------------------------------------------------- /AnimationBanner/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | -------------------------------------------------------------------------------- /AnimationBanner/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ASPOOK/Android-AnimationBanner/HEAD/AnimationBanner/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /AnimationBanner/app/src/main/res/mipmap-hdpi/banner1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ASPOOK/Android-AnimationBanner/HEAD/AnimationBanner/app/src/main/res/mipmap-hdpi/banner1.jpg -------------------------------------------------------------------------------- /AnimationBanner/app/src/main/res/mipmap-hdpi/banner2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ASPOOK/Android-AnimationBanner/HEAD/AnimationBanner/app/src/main/res/mipmap-hdpi/banner2.png -------------------------------------------------------------------------------- /AnimationBanner/app/src/main/res/mipmap-hdpi/banner3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ASPOOK/Android-AnimationBanner/HEAD/AnimationBanner/app/src/main/res/mipmap-hdpi/banner3.jpg -------------------------------------------------------------------------------- /AnimationBanner/app/src/main/res/mipmap-hdpi/banner4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ASPOOK/Android-AnimationBanner/HEAD/AnimationBanner/app/src/main/res/mipmap-hdpi/banner4.png -------------------------------------------------------------------------------- /AnimationBanner/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ASPOOK/Android-AnimationBanner/HEAD/AnimationBanner/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /AnimationBanner/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ASPOOK/Android-AnimationBanner/HEAD/AnimationBanner/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /AnimationBanner/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ASPOOK/Android-AnimationBanner/HEAD/AnimationBanner/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /AnimationBanner/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ASPOOK/Android-AnimationBanner/HEAD/AnimationBanner/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /AnimationBanner/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ASPOOK/Android-AnimationBanner/HEAD/AnimationBanner/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /AnimationBanner/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | AnimationBanner 3 | Settings 4 | 5 | -------------------------------------------------------------------------------- /AnimationBanner/.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /AnimationBanner/.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /AnimationBanner/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /AnimationBanner/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Oct 21 11:34:03 PDT 2015 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.8-all.zip 7 | -------------------------------------------------------------------------------- /AnimationBanner/app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 16dp 6 | 7 | -------------------------------------------------------------------------------- /AnimationBanner/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /AnimationBanner/app/src/main/res/values-v21/styles.xml: -------------------------------------------------------------------------------- 1 | > 2 | 8 | 9 | -------------------------------------------------------------------------------- /AnimationBanner/app/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /AnimationBanner/app/src/test/java/me/geed/animationbanner/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package me.geed.animationbanner; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * To work on unit tests, switch the Test Artifact in the Build Variants view. 9 | */ 10 | public class ExampleUnitTest { 11 | @Test 12 | public void addition_isCorrect() throws Exception { 13 | assertEquals(4, 2 + 2); 14 | } 15 | } -------------------------------------------------------------------------------- /AnimationBanner/app/src/androidTest/java/me/geed/animationbanner/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package me.geed.animationbanner; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | public ApplicationTest() { 11 | super(Application.class); 12 | } 13 | } -------------------------------------------------------------------------------- /AnimationBanner/app/src/main/res/menu/menu_example.xml: -------------------------------------------------------------------------------- 1 | 5 | 9 | 10 | -------------------------------------------------------------------------------- /AnimationBanner/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 | jcenter() 6 | } 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:1.5.0' 9 | 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 | jcenter() 18 | } 19 | } 20 | 21 | task clean(type: Delete) { 22 | delete rootProject.buildDir 23 | } 24 | -------------------------------------------------------------------------------- /AnimationBanner/.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Android-AnimationBanner 2 | 3 | ##控件简介 4 | AnimationBanner是一个利用属性动画原理实现的横幅广告控件。 5 | 6 | ##控件特点 7 | 1.实现原理简单,使用方便
8 | 2.可灵活设置Banner数量,1张或N张
9 | 3.附带Indicator小圆点指示器,并自动联动
10 | 4.可指定Indicator指示器在Banner中的位置
11 | 5.可自定义Indicator小圆点半径,处于当前位置或非当前位置时的颜色
12 | 6.可配置动画持续时间来调整Banner滑动的速度
13 | 7.可自定义Banner的大小以适配图片
14 | 8.可响应Banner滑动与点击事件 15 | 16 | ##实现原理 17 | 请参考之前的一篇博客 [利用Android属性动画实现Banner的原理与实践](http://blog.csdn.net/ahence/article/details/46646559) 18 | 19 | ##效果演示 20 | ![image](https://github.com/aspook/Android-AnimationBanner/raw/master/images/AnimationBanner.gif) 21 | 22 | -------------------------------------------------------------------------------- /AnimationBanner/app/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 D:\Android\android-sdk-windows/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 | -------------------------------------------------------------------------------- /AnimationBanner/.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /AnimationBanner/.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 18 | 19 | -------------------------------------------------------------------------------- /AnimationBanner/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 23 5 | buildToolsVersion "23.0.2" 6 | 7 | defaultConfig { 8 | applicationId "me.geed.animationbanner" 9 | minSdkVersion 11 10 | targetSdkVersion 23 11 | versionCode 1 12 | versionName "1.0" 13 | } 14 | buildTypes { 15 | release { 16 | minifyEnabled false 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 18 | } 19 | } 20 | } 21 | 22 | dependencies { 23 | compile fileTree(dir: 'libs', include: ['*.jar']) 24 | testCompile 'junit:junit:4.12' 25 | compile 'com.android.support:appcompat-v7:23.+' 26 | compile 'com.android.support:design:23.+' 27 | } 28 | -------------------------------------------------------------------------------- /AnimationBanner/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 14 |