├── sample ├── .gitignore ├── src │ └── main │ │ ├── res │ │ ├── drawable-hdpi │ │ │ └── ic_launcher.png │ │ ├── drawable-mdpi │ │ │ └── ic_launcher.png │ │ ├── drawable-xhdpi │ │ │ └── ic_launcher.png │ │ ├── drawable-xxhdpi │ │ │ └── ic_launcher.png │ │ ├── values-v16 │ │ │ └── styles.xml │ │ ├── values-v17 │ │ │ └── styles.xml │ │ ├── values │ │ │ ├── styles.xml │ │ │ ├── dimens.xml │ │ │ └── strings.xml │ │ ├── values-w820dp │ │ │ └── dimens.xml │ │ └── layout │ │ │ └── activity_main.xml │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── com │ │ └── romainpiel │ │ └── shimmer │ │ └── sample │ │ └── MainActivity.java ├── proguard-rules.txt └── build.gradle ├── library ├── .gitignore ├── gradle.properties ├── src │ └── main │ │ ├── res │ │ ├── drawable-nodpi │ │ │ ├── spot_mask.png │ │ │ └── mask.xml │ │ └── values │ │ │ └── attrs.xml │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── com │ │ └── romainpiel │ │ └── shimmer │ │ ├── ShimmerViewBase.java │ │ ├── ShimmerButton.java │ │ ├── ShimmerTextView.java │ │ ├── Shimmer.java │ │ └── ShimmerViewHelper.java ├── build.gradle └── proguard-rules.txt ├── settings.gradle ├── shimmer.gif ├── shimmer.png ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .gitignore ├── CHANGELOG.md ├── gradle.properties ├── gradlew.bat ├── README.md └── gradlew /sample/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /library/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':sample', ':library' 2 | -------------------------------------------------------------------------------- /shimmer.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romainpiel/Shimmer-android/HEAD/shimmer.gif -------------------------------------------------------------------------------- /shimmer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romainpiel/Shimmer-android/HEAD/shimmer.png -------------------------------------------------------------------------------- /library/gradle.properties: -------------------------------------------------------------------------------- 1 | POM_NAME=Shimmer-android 2 | POM_ARTIFACT_ID=library 3 | POM_PACKAGING=aar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romainpiel/Shimmer-android/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /library/src/main/res/drawable-nodpi/spot_mask.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romainpiel/Shimmer-android/HEAD/library/src/main/res/drawable-nodpi/spot_mask.png -------------------------------------------------------------------------------- /sample/src/main/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romainpiel/Shimmer-android/HEAD/sample/src/main/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /sample/src/main/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romainpiel/Shimmer-android/HEAD/sample/src/main/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /sample/src/main/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romainpiel/Shimmer-android/HEAD/sample/src/main/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /sample/src/main/res/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romainpiel/Shimmer-android/HEAD/sample/src/main/res/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /library/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /sample/src/main/res/values-v16/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /sample/src/main/res/values-v17/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /library/src/main/res/values/attrs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /sample/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /sample/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 6 | 7 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Apr 10 15:27:10 PDT 2013 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.2.1-all.zip 7 | -------------------------------------------------------------------------------- /sample/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Shimmer 5 | Shimmer 6 | Toggle animation 7 | Settings 8 | 9 | 10 | -------------------------------------------------------------------------------- /sample/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /library/src/main/res/drawable-nodpi/mask.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # built application files 2 | *.apk 3 | *.ap_ 4 | 5 | # files for the dex VM 6 | *.dex 7 | 8 | # Java class files 9 | *.class 10 | 11 | # generated files 12 | bin/ 13 | gen/ 14 | 15 | # Local configuration file (sdk path, etc) 16 | local.properties 17 | 18 | # Eclipse project files 19 | .classpath 20 | .project 21 | 22 | # Android Studio 23 | .idea/ 24 | .gradle 25 | /*/local.properties 26 | /*/out 27 | /*/*/build 28 | /*/*/production 29 | *.iml 30 | *.iws 31 | *.ipr 32 | *~ 33 | *.swp 34 | *.gpg -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | 3 | ## Version 1.4.0 *13/02/2015* 4 | 5 | - Cleaned up library manifest 6 | 7 | ## Version 1.3.0 *12/01/2015* 8 | 9 | - Updated build tools 10 | 11 | ## Version 1.2.0 *24/03/2014* 12 | 13 | - Added `ShimmerButton` 14 | - Minor fixes 15 | 16 | ## Version 1.1.0 *10/03/2014* 17 | 18 | - Converted static method `Shimmer.animate()` to a class object containing the properties of the animation 19 | - Optimized `ShimmerTextView` using a single `Shader` 20 | - Minor fixes 21 | 22 | ## Version 1.0.0 *06/03/2014* 23 | 24 | Initial release. -------------------------------------------------------------------------------- /library/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | 3 | android { 4 | compileSdkVersion Integer.parseInt(project.ANDROID_BUILD_SDK_VERSION) 5 | buildToolsVersion project.ANDROID_BUILD_TOOLS_VERSION 6 | 7 | defaultConfig { 8 | minSdkVersion 14 9 | targetSdkVersion Integer.parseInt(project.ANDROID_BUILD_TARGET_SDK_VERSION) 10 | versionCode Integer.parseInt(project.VERSION_CODE) 11 | versionName project.VERSION_NAME 12 | } 13 | } 14 | 15 | apply from: 'https://raw.github.com/chrisbanes/gradle-mvn-push/master/gradle-mvn-push.gradle' 16 | -------------------------------------------------------------------------------- /sample/proguard-rules.txt: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/romainpiel/Documents/Android/sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the ProGuard 5 | # include property in project.properties. 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 | #} -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | VERSION_NAME=1.4.0 2 | VERSION_CODE=5 3 | GROUP=com.romainpiel.shimmer 4 | 5 | POM_DESCRIPTION=An Android TextView with a shimmering effect 6 | POM_URL=https://github.com/RomainPiel/Shimmer-android 7 | POM_SCM_URL=https://github.com/RomainPiel/Shimmer-android 8 | POM_SCM_CONNECTION=scm:git@github.com:RomainPiel/Shimmer-android.git 9 | POM_SCM_DEV_CONNECTION=scm:git@github.com:RomainPiel/Shimmer-android.git 10 | POM_LICENCE_NAME=The Apache Software License, Version 2.0 11 | POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt 12 | POM_LICENCE_DIST=repo 13 | POM_DEVELOPER_ID=romainpiel 14 | POM_DEVELOPER_NAME=Romain Piel 15 | 16 | ANDROID_BUILD_TARGET_SDK_VERSION=21 17 | ANDROID_BUILD_TOOLS_VERSION=21.1.2 18 | ANDROID_BUILD_SDK_VERSION=21 -------------------------------------------------------------------------------- /library/proguard-rules.txt: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/romainpiel/Documents/Android/sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the ProGuard 5 | # include property in project.properties. 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 | #} -------------------------------------------------------------------------------- /library/src/main/java/com/romainpiel/shimmer/ShimmerViewBase.java: -------------------------------------------------------------------------------- 1 | package com.romainpiel.shimmer; 2 | 3 | /** 4 | * Shimmer 5 | * User: romainpiel 6 | * Date: 10/03/2014 7 | * Time: 17:33 8 | */ 9 | public interface ShimmerViewBase { 10 | 11 | public float getGradientX(); 12 | public void setGradientX(float gradientX); 13 | public boolean isShimmering(); 14 | public void setShimmering(boolean isShimmering); 15 | public boolean isSetUp(); 16 | public void setAnimationSetupCallback(ShimmerViewHelper.AnimationSetupCallback callback); 17 | public int getPrimaryColor(); 18 | public void setPrimaryColor(int primaryColor); 19 | public int getReflectionColor(); 20 | public void setReflectionColor(int reflectionColor); 21 | } 22 | -------------------------------------------------------------------------------- /sample/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion Integer.parseInt(project.ANDROID_BUILD_SDK_VERSION) 5 | buildToolsVersion project.ANDROID_BUILD_TOOLS_VERSION 6 | 7 | defaultConfig { 8 | minSdkVersion 14 9 | targetSdkVersion Integer.parseInt(project.ANDROID_BUILD_TARGET_SDK_VERSION) 10 | versionCode Integer.parseInt(project.VERSION_CODE) 11 | versionName project.VERSION_NAME 12 | } 13 | buildTypes { 14 | release { 15 | minifyEnabled false 16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' 17 | } 18 | } 19 | } 20 | 21 | dependencies { 22 | compile fileTree(dir: 'libs', include: ['*.jar', '*.aar']) 23 | compile project(':library') 24 | } 25 | -------------------------------------------------------------------------------- /sample/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 10 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /sample/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 15 | 16 |