# react-native-vector-image-android

> vector image support for react native android

Latest version **0.0.5** (published 2017-03-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-vector-image-android
pnpm add react-native-vector-image-android
yarn add react-native-vector-image-android
bun add react-native-vector-image-android
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.5 |
| Published | 2017-03-09 |
| First published | 2016-06-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | pera747 |
| Maintainers | pera747 |
| Keywords | react-native, android, vector, react-native-vector-image-android |

## Links

- npm: https://www.npmjs.com/package/react-native-vector-image-android
- Repository: https://github.com/quispoke/vectorImage
- Homepage: https://github.com/quispoke/vectorImage/blob/master/README.md
- Issues: https://github.com/quispoke/vectorImage/issues
- npm.io page: https://npm.io/package/react-native-vector-image-android

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 0.0.5 (latest) — 2017-03-09
- 0.0.4 — 2017-03-09
- 0.0.3 — 2017-02-17
- 0.0.2 — 2016-06-29
- 0.0.1 — 2016-06-28

## README

# vectorImage
vector image support for react native android

# Installation

First, download the library from npm:

```
npm install react-native-vector-image-android --save
```

## Android

1. in `android/app/build.gradle` add:
   ```
   ...
     dependencies {
     ...
    compile project(':react-native-vector-image-android') // <-- Add this!
    }
   ```

2. in `android/settings.gradle` add:
   ```
   ...
   include ':react-native-vector-image-android'
   project(':react-native-vector-image-android').projectDir = file('../node_modules/react-native-vector-image-android/android')
   ```

3. in `android/app/src/main/java/com/{YOUR_APP_NAME}/MainActivity.java` add:

      ```
    ...
    import com.quispoke.vectorImage.ReactVectorImagePackage; // <--- Add this!
    ...

    public class MainActivity extends ReactActivity {
    ...
        @Override
        protected List<ReactPackage> getPackages() {
            return Arrays.<ReactPackage>asList(
                new MainReactPackage(),
                new ReactVectorImagePackage()    // <-- Add this!
            );
        }
   }
   ```
   
# General Usage

```js
var VectorImage = require('react-native-vector-image-android');
```

```jsx
  <VectorImage
      style={{height: side, width: side}}
      settings={{
          height: Math.floor(side * pixelRatio),
          width: Math.floor(side * pixelRatio),
          resourceName: 'ic_local_bar_48px',
          color : [0xFF, 0x00, 0x00, 0xFF]
      }}>
    </VectorImage>
```

---
_Source: https://npm.io/package/react-native-vector-image-android · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
