├── .gitignore ├── README.md ├── android ├── build.gradle └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── com │ │ └── ibrahim │ │ ├── ReactAndroidShimmerPackage.java │ │ ├── managers │ │ └── ShimmerViewManager.java │ │ └── widgets │ │ └── ShimmerLayout.java │ └── res │ ├── layout │ └── shimmer.xml │ ├── mipmap-hdpi │ ├── ic_launcher.png │ └── ic_launcher_round.png │ ├── mipmap-mdpi │ ├── ic_launcher.png │ └── ic_launcher_round.png │ ├── mipmap-xhdpi │ ├── ic_launcher.png │ └── ic_launcher_round.png │ ├── mipmap-xxhdpi │ ├── ic_launcher.png │ └── ic_launcher_round.png │ ├── mipmap-xxxhdpi │ ├── ic_launcher.png │ └── ic_launcher_round.png │ └── values │ ├── colors.xml │ ├── strings.xml │ └── styles.xml ├── index.js └── package.json /.gitignore: -------------------------------------------------------------------------------- 1 | /*.log 2 | /git 3 | /node_modules 4 | /android/build 5 | /android/*.iml 6 | /.gradle 7 | /gradle 8 | /gradle.properties 9 | /gradlew 10 | /local.properties 11 | /*.bat 12 | /settings.gradle 13 | /.idea 14 | /build.gradle 15 | /build 16 | /react-native-android-shimmer.iml -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # react-native-android-shimmer 2 | 3 | Simple shimmering effect for android in React Native. Based on Shimmer. 4 | 5 | Shimmer 6 | 7 | # Installation 8 | 9 | $ yarn add react-native-android-shimmer 10 | 11 | ### Option: Manually 12 | 13 | * Edit `android/settings.gradle` to look like this (without the +): 14 | 15 | ```diff 16 | rootProject.name = 'MyApp' 17 | 18 | include ':app' 19 | 20 | + include ':react-native-android-shimmer' 21 | + project(':react-native-android-shimmer').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-android-shimmer/android') 22 | ``` 23 | 24 | * Edit `android/app/build.gradle` (note: **app** folder) to look like this: 25 | 26 | ```diff 27 | apply plugin: 'com.android.application' 28 | 29 | android { 30 | ... 31 | } 32 | 33 | dependencies { 34 | compile fileTree(dir: 'libs', include: ['*.jar']) 35 | compile "com.android.support:appcompat-v7:23.0.1" 36 | compile "com.facebook.react:react-native:+" // From node_modules 37 | + compile project(':react-native-android-shimmer') 38 | } 39 | ``` 40 | 41 | * Edit your `MainApplication.java` (deep in `android/app/src/main/java/...`) to look like this (note **two** places to edit): 42 | 43 | ```diff 44 | package com.myapp; 45 | 46 | + import com.ibrahim.ReactAndroidShimmerPackage; 47 | 48 | .... 49 | 50 | @Override 51 | protected List getPackages() { 52 | return Arrays.asList( 53 | new MainReactPackage() 54 | + , new ReactAndroidShimmerPackage() 55 | ); 56 | } 57 | 58 | } 59 | ``` 60 | 61 | # Usage 62 | 63 | NOTE: Shimmer may only have one child and currently doesn't work with View. 64 | 65 | ### Example with Text 66 | ```javascript 67 | import AndroidShimmer from 'react-native-android-shimmer'; 68 | 69 | 72 | Loading... 73 | 74 | ``` 75 | 76 | ### Example with Image 77 | ```javascript 78 | import AndroidShimmer from 'react-native-android-shimmer'; 79 | 80 | 84 | 85 | 86 | Lorem Ipsum 87 | 88 | 89 | 90 | ``` 91 | 92 | # Properties 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 |
PropDescription
baseAlphaAlpha used to render the base view i.e. the unhighlighted view over which the highlight is drawn.
durationTime it takes for the highlight to move from one end of the layout to the other.
dropoffControls the size of the fading edge of the highlight.
intensityControls the brightness of the highlight at the center.
maskShapeShape of the highlight mask, either with a linear or a circular gradient.
maskAngleAngle at which the highlight mask is animated, from left-to-right, top-to-bottom etc.
tiltAngle at which the highlight is tilted, measured in degrees.
repeatModeWhat the animation should do after reaching the end, either restart from the beginning or reverse back towards it.
140 | 141 | # License 142 | 143 | MIT License. Shimmer is under BSD license. © Ibrahim Ahmed 2017-now 144 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | 3 | android { 4 | compileSdkVersion 25 5 | buildToolsVersion "25.0.2" 6 | defaultConfig { 7 | minSdkVersion 16 8 | targetSdkVersion 25 9 | versionCode 1 10 | versionName "1.0" 11 | } 12 | buildTypes { 13 | release { 14 | minifyEnabled false 15 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 16 | } 17 | } 18 | } 19 | 20 | dependencies { 21 | compile fileTree(dir: 'libs', include: ['*.jar']) 22 | compile 'com.facebook.shimmer:shimmer:0.1.0@aar' 23 | compile 'com.facebook.react:react-native:+' 24 | } 25 | -------------------------------------------------------------------------------- /android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /android/src/main/java/com/ibrahim/ReactAndroidShimmerPackage.java: -------------------------------------------------------------------------------- 1 | package com.ibrahim; 2 | 3 | import com.facebook.react.ReactPackage; 4 | import com.facebook.react.bridge.JavaScriptModule; 5 | import com.facebook.react.bridge.NativeModule; 6 | import com.facebook.react.bridge.ReactApplicationContext; 7 | import com.facebook.react.uimanager.ViewManager; 8 | import com.ibrahim.managers.ShimmerViewManager; 9 | 10 | import java.util.Arrays; 11 | import java.util.Collections; 12 | import java.util.List; 13 | 14 | public class ReactAndroidShimmerPackage implements ReactPackage { 15 | @Override 16 | public List createNativeModules(ReactApplicationContext reactContext) { 17 | return Collections.emptyList(); 18 | } 19 | 20 | @Override 21 | public List> createJSModules() { 22 | return Collections.emptyList(); 23 | } 24 | 25 | @Override 26 | public List createViewManagers(ReactApplicationContext reactContext) { 27 | return Arrays.asList( 28 | new ShimmerViewManager() 29 | ); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /android/src/main/java/com/ibrahim/managers/ShimmerViewManager.java: -------------------------------------------------------------------------------- 1 | package com.ibrahim.managers; 2 | 3 | import android.animation.ObjectAnimator; 4 | import android.support.annotation.Nullable; 5 | import android.view.View; 6 | 7 | import com.facebook.infer.annotation.Assertions; 8 | import com.facebook.react.bridge.ReadableArray; 9 | import com.facebook.react.common.MapBuilder; 10 | import com.facebook.react.uimanager.annotations.ReactProp; 11 | import com.facebook.react.uimanager.ThemedReactContext; 12 | import com.facebook.react.uimanager.ViewGroupManager; 13 | import com.facebook.shimmer.ShimmerFrameLayout; 14 | import com.ibrahim.widgets.ShimmerLayout; 15 | 16 | import java.util.HashMap; 17 | import java.util.Map; 18 | 19 | public class ShimmerViewManager extends ViewGroupManager { 20 | private static final String REACT_CLASS = "ReactNativeAndroidShimmer"; 21 | 22 | private static final int COMMAND_START_SHIMMER_ANIMATION = 1; 23 | 24 | private static final int SHIMMER_MASK_SHAPE_LINEAR = 1; 25 | private static final int SHIMMER_MASK_SHAPE_RADIAL = 2; 26 | 27 | private static final int SHIMMER_MASK_ANGLE_CW_0 = 1; 28 | private static final int SHIMMER_MASK_ANGLE_CW_90 = 2; 29 | private static final int SHIMMER_MASK_ANGLE_CW_180 = 3; 30 | private static final int SHIMMER_MASK_ANGLE_CW_270 = 4; 31 | 32 | private static final int SHIMMER_REPEAT_MODE_INFINITE = 1; 33 | private static final int SHIMMER_REPEAT_MODE_RESTART = 2; 34 | private static final int SHIMMER_REPEAT_MODE_REVERSE = 3; 35 | 36 | @Override 37 | public String getName() { 38 | return REACT_CLASS; 39 | } 40 | 41 | @Override 42 | protected ShimmerLayout createViewInstance(ThemedReactContext reactContext) { 43 | ShimmerLayout container = new ShimmerLayout(reactContext); 44 | 45 | return container; 46 | } 47 | 48 | @Override 49 | public Map getExportedViewConstants() { 50 | final Map constants = new HashMap<>(); 51 | 52 | constants.put("SHIMMER_MASK_SHAPE_LINEAR", SHIMMER_MASK_SHAPE_LINEAR); 53 | constants.put("SHIMMER_MASK_SHAPE_RADIAL", SHIMMER_MASK_SHAPE_RADIAL); 54 | 55 | constants.put("SHIMMER_MASK_ANGLE_CW_0", SHIMMER_MASK_ANGLE_CW_0); 56 | constants.put("SHIMMER_MASK_ANGLE_CW_90", SHIMMER_MASK_ANGLE_CW_90); 57 | constants.put("SHIMMER_MASK_ANGLE_CW_180", SHIMMER_MASK_ANGLE_CW_180); 58 | constants.put("SHIMMER_MASK_ANGLE_CW_270", SHIMMER_MASK_ANGLE_CW_270); 59 | 60 | constants.put("SHIMMER_REPEAT_MODE_INFINITE", SHIMMER_REPEAT_MODE_INFINITE); 61 | constants.put("SHIMMER_REPEAT_MODE_RESTART", SHIMMER_REPEAT_MODE_RESTART); 62 | constants.put("SHIMMER_REPEAT_MODE_REVERSE", SHIMMER_REPEAT_MODE_REVERSE); 63 | 64 | return constants; 65 | } 66 | 67 | @ReactProp(name = "baseAlpha") 68 | public void setBaseAlpha(ShimmerLayout shimmerLayout, @Nullable float baseAlpha) { 69 | shimmerLayout.setBaseAlpha(baseAlpha); 70 | } 71 | @ReactProp(name = "duration") 72 | public void setDuration(ShimmerLayout shimmerLayout, @Nullable int duration) { 73 | shimmerLayout.setDuration(duration); 74 | } 75 | @ReactProp(name = "dropoff") 76 | public void setDropoff(ShimmerLayout shimmerLayout, @Nullable float dropoff) { 77 | shimmerLayout.setDropoff(dropoff); 78 | } 79 | @ReactProp(name = "intensity") 80 | public void setIntensity(ShimmerLayout shimmerLayout, @Nullable float intensity) { 81 | shimmerLayout.setIntensity(intensity); 82 | } 83 | @ReactProp(name = "maskShape") 84 | public void setMaskShape(ShimmerLayout shimmerLayout, @Nullable int maskShape) { 85 | switch (maskShape) { 86 | case SHIMMER_MASK_SHAPE_LINEAR: { 87 | shimmerLayout.setMaskShape(ShimmerFrameLayout.MaskShape.LINEAR); 88 | return; 89 | } 90 | case SHIMMER_MASK_SHAPE_RADIAL: { 91 | shimmerLayout.setMaskShape(ShimmerFrameLayout.MaskShape.RADIAL); 92 | return; 93 | } 94 | default: { 95 | shimmerLayout.setMaskShape(ShimmerFrameLayout.MaskShape.RADIAL); 96 | } 97 | } 98 | } 99 | 100 | @ReactProp(name = "maskAngle") 101 | public void setAngle(ShimmerLayout shimmerLayout, @Nullable int maskAngle) { 102 | switch (maskAngle) { 103 | case SHIMMER_MASK_ANGLE_CW_0: { 104 | shimmerLayout.setAngle(ShimmerFrameLayout.MaskAngle.CW_0); 105 | return; 106 | } 107 | case SHIMMER_MASK_ANGLE_CW_90: { 108 | shimmerLayout.setAngle(ShimmerFrameLayout.MaskAngle.CW_90); 109 | return; 110 | } 111 | case SHIMMER_MASK_ANGLE_CW_180: { 112 | shimmerLayout.setAngle(ShimmerFrameLayout.MaskAngle.CW_180); 113 | return; 114 | } 115 | case SHIMMER_MASK_ANGLE_CW_270: { 116 | shimmerLayout.setAngle(ShimmerFrameLayout.MaskAngle.CW_270); 117 | return; 118 | } 119 | default: { 120 | shimmerLayout.setAngle(ShimmerFrameLayout.MaskAngle.CW_0); 121 | }; 122 | } 123 | } 124 | 125 | @ReactProp(name = "tilt") 126 | public void setTilt(ShimmerLayout shimmerLayout, @Nullable float tilt) { 127 | shimmerLayout.setTilt(tilt); 128 | } 129 | 130 | @ReactProp(name = "repeatMode") 131 | public void setRepeatMode(ShimmerLayout shimmerLayout, @Nullable int repeatMode) { 132 | switch (repeatMode) { 133 | case SHIMMER_REPEAT_MODE_INFINITE: { 134 | shimmerLayout.setRepeatMode(ObjectAnimator.INFINITE); 135 | return; 136 | } 137 | case SHIMMER_REPEAT_MODE_RESTART: { 138 | shimmerLayout.setRepeatMode(ObjectAnimator.RESTART); 139 | return; 140 | } 141 | case SHIMMER_REPEAT_MODE_REVERSE: { 142 | shimmerLayout.setRepeatMode(ObjectAnimator.REVERSE); 143 | return; 144 | } 145 | default: { 146 | shimmerLayout.setRepeatMode(ObjectAnimator.INFINITE); 147 | } 148 | } 149 | } 150 | 151 | @Override 152 | public boolean needsCustomLayoutForChildren() { 153 | return true; 154 | } 155 | 156 | @Override 157 | public Map getCommandsMap() { 158 | return MapBuilder.of( 159 | "startShimmerAnimation", 160 | COMMAND_START_SHIMMER_ANIMATION); 161 | } 162 | 163 | @Override 164 | public void receiveCommand(ShimmerLayout shimmerLayout, int commandType, @Nullable ReadableArray args) { 165 | Assertions.assertNotNull(shimmerLayout); 166 | Assertions.assertNotNull(args); 167 | switch (commandType) { 168 | case COMMAND_START_SHIMMER_ANIMATION: { 169 | shimmerLayout.startShimmerAnimation(); 170 | return; 171 | } 172 | default: 173 | throw new IllegalArgumentException(String.format( 174 | "Unsupported command %d received by %s.", 175 | commandType, 176 | getClass().getSimpleName())); 177 | } 178 | } 179 | 180 | @Override 181 | public void addView(ShimmerLayout parent, View child, int index) { 182 | parent.addShimmerView(child, index); 183 | } 184 | } -------------------------------------------------------------------------------- /android/src/main/java/com/ibrahim/widgets/ShimmerLayout.java: -------------------------------------------------------------------------------- 1 | package com.ibrahim.widgets; 2 | 3 | import android.content.Context; 4 | import android.view.LayoutInflater; 5 | import android.view.View; 6 | import android.widget.FrameLayout; 7 | import android.widget.LinearLayout; 8 | 9 | import com.facebook.shimmer.ShimmerFrameLayout; 10 | import com.ibrahim.reactandroidshimmer.R; 11 | 12 | public class ShimmerLayout extends LinearLayout { 13 | private ShimmerFrameLayout shimmerViewContainer; 14 | 15 | public ShimmerLayout(Context context) { 16 | super(context); 17 | 18 | inflate(getContext(), R.layout.shimmer, this); 19 | 20 | shimmerViewContainer = (ShimmerFrameLayout) findViewById(R.id.shimmer_view_container); 21 | } 22 | 23 | public void setBaseAlpha(float baseAlpha) { 24 | shimmerViewContainer.setBaseAlpha(baseAlpha); 25 | } 26 | 27 | public void setDuration(int duration) { 28 | shimmerViewContainer.setDuration(duration); 29 | } 30 | 31 | public void setDropoff(float dropoff) { 32 | shimmerViewContainer.setDropoff(dropoff); 33 | } 34 | 35 | public void setIntensity(float intensity) { 36 | shimmerViewContainer.setIntensity(intensity); 37 | } 38 | 39 | public void setMaskShape(ShimmerFrameLayout.MaskShape maskShape) { 40 | shimmerViewContainer.setMaskShape(maskShape); 41 | } 42 | 43 | public void setAngle(ShimmerFrameLayout.MaskAngle maskAngle) { 44 | shimmerViewContainer.setAngle(maskAngle); 45 | } 46 | 47 | public void setTilt(float tilt) { 48 | shimmerViewContainer.setTilt(tilt); 49 | } 50 | 51 | public void setRepeatMode(int repeatMode) { 52 | shimmerViewContainer.setRepeatMode(repeatMode); 53 | } 54 | 55 | public void startShimmerAnimation() { 56 | shimmerViewContainer.startShimmerAnimation(); 57 | } 58 | 59 | public void addShimmerView (View child, int index) { 60 | shimmerViewContainer.addView(child, index); 61 | 62 | startShimmerAnimation(); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /android/src/main/res/layout/shimmer.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /android/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimahmed-io/react-native-android-shimmer/035ee33fb44bbe9c6db5ef2a9ebb9e1d813ead2a/android/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimahmed-io/react-native-android-shimmer/035ee33fb44bbe9c6db5ef2a9ebb9e1d813ead2a/android/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimahmed-io/react-native-android-shimmer/035ee33fb44bbe9c6db5ef2a9ebb9e1d813ead2a/android/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimahmed-io/react-native-android-shimmer/035ee33fb44bbe9c6db5ef2a9ebb9e1d813ead2a/android/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimahmed-io/react-native-android-shimmer/035ee33fb44bbe9c6db5ef2a9ebb9e1d813ead2a/android/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimahmed-io/react-native-android-shimmer/035ee33fb44bbe9c6db5ef2a9ebb9e1d813ead2a/android/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimahmed-io/react-native-android-shimmer/035ee33fb44bbe9c6db5ef2a9ebb9e1d813ead2a/android/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimahmed-io/react-native-android-shimmer/035ee33fb44bbe9c6db5ef2a9ebb9e1d813ead2a/android/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimahmed-io/react-native-android-shimmer/035ee33fb44bbe9c6db5ef2a9ebb9e1d813ead2a/android/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimahmed-io/react-native-android-shimmer/035ee33fb44bbe9c6db5ef2a9ebb9e1d813ead2a/android/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /android/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | ReactAndroidShimmer 3 | 4 | -------------------------------------------------------------------------------- /android/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | import React, { 4 | Component, 5 | PropTypes 6 | } from 'react'; 7 | 8 | import { 9 | requireNativeComponent, 10 | View 11 | } from 'react-native'; 12 | 13 | var ReactNative, { 14 | UIManager 15 | } = require('react-native'); 16 | 17 | const ReactAndroidShimmerManager = UIManager.ReactNativeAndroidShimmer; 18 | const Constants = ReactAndroidShimmerManager.Constants; 19 | 20 | export default class AndroidShimmer extends Component { 21 | props: { 22 | baseAlpha ? : number, 23 | duration ? : number, 24 | dropoff ? : number, 25 | intensity ? : number, 26 | maskShape ? : number, 27 | maskAngle ? : number, 28 | tilt ? : number, 29 | repeatMode ? : number 30 | }; 31 | 32 | static propTypes = { 33 | ...View.propTypes, 34 | baseAlpha: PropTypes.number, 35 | duration: PropTypes.number, 36 | dropoff: PropTypes.number, 37 | intensity: PropTypes.number, 38 | maskShape: PropTypes.number, 39 | maskAngle: PropTypes.number, 40 | tilt: PropTypes.number, 41 | repeatMode: PropTypes.number 42 | }; 43 | 44 | startShimmerAnimation = () => { 45 | UIManager.dispatchViewManagerCommand( 46 | ReactNative.findNodeHandle(this), 47 | UIManager.ReactNativeAndroidShimmer.Commands.startShimmerAnimation 48 | ); 49 | }; 50 | 51 | render() { 52 | return ( 53 | 56 | {this.props.children} 57 | 58 | ); 59 | } 60 | } 61 | 62 | let RCTShimmerLayout = requireNativeComponent('ReactNativeAndroidShimmer', AndroidShimmer, { 63 | nativeOnly: {} 64 | }); 65 | 66 | AndroidShimmer.SHIMMER_MASK_SHAPE_LINEAR = Constants.SHIMMER_MASK_SHAPE_LINEAR; 67 | AndroidShimmer.SHIMMER_MASK_SHAPE_RADIAL = Constants.SHIMMER_MASK_SHAPE_RADIAL; 68 | 69 | AndroidShimmer.SHIMMER_MASK_ANGLE_CW_0 = Constants.SHIMMER_MASK_ANGLE_CW_0; 70 | AndroidShimmer.SHIMMER_MASK_ANGLE_CW_90 = Constants.SHIMMER_MASK_ANGLE_CW_90; 71 | AndroidShimmer.SHIMMER_MASK_ANGLE_CW_180 = Constants.SHIMMER_MASK_ANGLE_CW_180; 72 | AndroidShimmer.SHIMMER_MASK_ANGLE_CW_270 = Constants.SHIMMER_MASK_ANGLE_CW_270; 73 | 74 | AndroidShimmer.SHIMMER_REPEAT_MODE_INFINITE = Constants.SHIMMER_REPEAT_MODE_INFINITE; 75 | AndroidShimmer.SHIMMER_REPEAT_MODE_RESTART = Constants.SHIMMER_REPEAT_MODE_RESTART; 76 | AndroidShimmer.SHIMMER_REPEAT_MODE_REVERSE = Constants.SHIMMER_REPEAT_MODE_REVERSE; 77 | 78 | module.exports = AndroidShimmer; 79 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-native-android-shimmer", 3 | "version": "0.2.7", 4 | "description": "Simple android shimmering effect for any view in React Native", 5 | "main": "index.js", 6 | "keywords": [ 7 | "react-native", 8 | "react-component", 9 | "react-native-component", 10 | "react", 11 | "mobile", 12 | "android", 13 | "shimmer", 14 | "animation" 15 | ], 16 | "author": { 17 | "name": "Ibrahim Ahmed", 18 | "email": "ibrahimtorbany.dev@gmail.com" 19 | }, 20 | "homepage": "https://github.com/Ibrahim-GHub/react-native-android-shimmer", 21 | "bugs": { 22 | "url": "https://github.com/Ibrahim-GHub/react-native-android-shimmer/issues" 23 | }, 24 | "repository": { 25 | "type": "git", 26 | "url": "git://github.com/Ibrahim-GHub/react-native-android-shimmer.git" 27 | }, 28 | "license": "MIT" 29 | } 30 | --------------------------------------------------------------------------------