File tree Expand file tree Collapse file tree 3 files changed +13
-4
lines changed
Expand file tree Collapse file tree 3 files changed +13
-4
lines changed Original file line number Diff line number Diff line change 1- # react-native-modal- translucent
1+ # react-native-translucent-modal
22A library for React Native translucent modal
33
4- ##### 背景
4+ ### 背景
55react-native 提供的` Modal ` 组件在Android上显示时不能延伸到状态栏,为什呢? 这与Android的原生实现有关,` Modal ` 组件对应到Android原生是用` Dialog ` 实现,因为 dialog 本身也不会延伸到状态栏的。如何让` Modal ` 在Android 上的显示效果能像在ios 设备上一样呢?这就是本库所提供的。使用很简单,只需要一行代码即可。
66
7- ##### Setup
7+ ### 效果对比
8+
9+ 使用` react-native-translucent-modal ` 之前:
10+ ![ before1] ( /screen-shot/screenshot-before.jpg )
11+
12+ 使用` react-native-translucent-modal ` 之后:
13+
14+ ![ after1] ( /screen-shot/screenshot-after.jpg )
15+
16+ ### Setup
817
9181、使用npm
1019
@@ -24,7 +33,7 @@ $ yarn add react-native-translucent-modal
2433$ react-native react-native-translucent-modal
2534```
2635
27- ##### Usage
36+ ### Usage
2837
2938` react-native-translucent-modal ` 的使用与 react-native 提供` Modal ` 的组件完全一样,他们的属性和方法完全相同,你只需要将` Modal ` 的引入方式更改一下即可,其他的完全不用变
3039
You can’t perform that action at this time.
0 commit comments