# react-native-modal-translucent-axton

> Remove the StatusBar background for Modal on Android.

Latest version **5.0.0** (published 2022-04-16) · MIT license · 4 weekly downloads

## Install

```sh
npm install react-native-modal-translucent-axton
pnpm add react-native-modal-translucent-axton
yarn add react-native-modal-translucent-axton
bun add react-native-modal-translucent-axton
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 5.0.0 |
| Published | 2022-04-16 |
| First published | 2022-04-16 |
| Weekly downloads | 4 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 317 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 201 |
| Author | listen |
| Maintainers | axton-tang |
| Keywords | react-native, modal, translucent, statusbar |

## Links

- npm: https://www.npmjs.com/package/react-native-modal-translucent-axton
- Repository: https://github.com/listenzz/react-native-modal-translucent
- Issues: https://github.com/listenzz/react-native-modal-translucent/issues
- npm.io page: https://npm.io/package/react-native-modal-translucent-axton

## Alternatives

- [react-native-root-siblings](https://npm.io/package/react-native-root-siblings.md) — 102.9K weekly downloads
- [@praxisui/dialog](https://npm.io/package/@praxisui/dialog.md) — 2.0K weekly downloads
- [easy-toggle-state](https://npm.io/package/easy-toggle-state.md) — 350 weekly downloads
- [ngx-lightbox-evp](https://npm.io/package/ngx-lightbox-evp.md) — 19 weekly downloads
- [jdc-popup](https://npm.io/package/jdc-popup.md) — 2 weekly downloads

## Recent versions

- 5.0.0 (latest) — 2022-04-16

## README

# react-native-modal-translucent

Remove the StatusBar background for Modal on Android

### Before

<img src="./screenshot/before.jpg" width=320>

### After

<img src="./screenshot/after.png" width=320>

### Usage

```bash
npm install react-native-modal-translucent --save
# or
yarn add react-native-modal-translucent
```

If your RN version is below 0.60, you need to link manually.

```
react-native link react-native-modal-translucent
```

Now run the App and see the Effect.

## Caveat

If your react-native version is below 0.57, you need to update your android gradle.

First, modify your android/build.gradle

```diff
buildscript {
+    ext {
+        buildToolsVersion = "28.0.3"
+        minSdkVersion = 16
+        compileSdkVersion = 28
+        targetSdkVersion = 28
+        supportLibVersion = "28.0.0"
+    }

    repositories {
+        google()
         jcenter()
-        maven {
-            url 'https://maven.google.com/'
-            name 'Google'
-        }
    }

    dependencies {
-        classpath 'com.android.tools.build:gradle:2.3.3'
+        // make sure your gardle version here is equal or greater than 3.3.2
+        classpath 'com.android.tools.build:gradle:3.3.2'
    }
}

allprojects {
    repositories {
         mavenLocal()
+        google()
         jcenter()
         maven {
             url "$rootDir/../node_modules/react-native/android"
         }
-        maven {
-            url 'https://maven.google.com/'
-            name 'Google'
-        }
    }
}

-ext {
-    buildToolsVersion = "26.0.3"
-    minSdkVersion = 16
-    compileSdkVersion = 26
-    targetSdkVersion = 26
-    supportLibVersion = "26.1.0"
-}


+task wrapper(type: Wrapper) {
+    gradleVersion = '4.10.1'
+    distributionUrl = distributionUrl.replace("bin", "all")
+}
```

Second, modify android/gradle/wrapper.gradle-wrapper.properties, make sure the gradle distribution is equal or greater than 4.4

```diff
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-3.5.1-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
```

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