• This repository has been archived on 30/Jun/2022
  • Stars
    star
    204
  • Rank 192,063 (Top 4 %)
  • Language
    Java
  • License
    MIT License
  • Created over 6 years ago
  • Updated almost 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Remove the StatusBar background for Modal on Android

react-native-modal-translucent

Remove the StatusBar background for Modal on Android

Before

After

Usage

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

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

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

More Repositories

1

HBDNavigationBar

A custom UINavigationBar for smooth switching between various states, including bar style, bar tint color, background image, background alpha, bar hidden, title text attributes, tint color, shadow hidden...
Objective-C
1,625
star
2

AndroidNavigation

A library managing navigation, nested Fragment, StatusBar, Toolbar for Android
Java
710
star
3

hybrid-navigation

React Native Navigation that supports seamless navigation between Native and React.
Objective-C
313
star
4

MyApp

React Native 工程化实践
JavaScript
136
star
5

RxCommand

A UI-related rxjava component for android mvvm architecture
Java
128
star
6

MyMina

小程序工程化实践
JavaScript
87
star
7

Live

A RxJava Transformer handle Android Lifecycle as same as LiveData.
Java
81
star
8

RNDemo

演示一些 ReactNative 相关的技巧,包含嵌套滚动,自定义下拉刷新,避免键盘遮挡,隐私政策等等。
TypeScript
37
star
9

react-native-toast-hybrid

A toast that can be used for react-native, while available for native android and ios
Objective-C
36
star
10

react-native-keyboard-insets

A powerful Keyboard Aware View for React Native
Java
25
star
11

HBDStatusBar

A library handling status bar hidden
Objective-C
22
star
12

android-modularization

An android modularization demo with dagger2
Java
16
star
13

RxCommand-Swift

A command is an observable triggered in response to some action, typically UI-related. Inspired by RACCommand.
Swift
10
star
14

react-native-platform

Platform tools for React Native.
Java
5
star
15

MonoDemo

Monorepo 在 React Native 项目的实践
TypeScript
4
star
16

react-native-create-lib

Tool to create a React Native library module or view module with a single command
JavaScript
3
star
17

react-native-create-app

Tool to create a React Native Project with a single command
JavaScript
2
star
18

react-native-recyclerview

2
star
19

RN063

演示 react-native-navigation-hybrid 如何和 react-native 0.63 集成
Java
1
star
20

OSSRH-69319

1
star