小编Zoh*_*vin的帖子

如何通过React Native在Android中找到状态栏的高度?

如何通过React Native在Android上找到状态栏的高度?

如果我检查React.Dimensions高度,值似乎也包括状态栏高度,但我试图找到没有状态栏的布局高度.

android statusbar react-native

40
推荐指数
6
解决办法
3万
查看次数

如何在React Native中更改TextInput占位符的样式?

有没有办法fontStyle: 'italic' placeholderReact Native中的TextInput 设置?

这里的文档 似乎只能设置占位符和placeholderTextColor.

android ios react-native

32
推荐指数
4
解决办法
4万
查看次数

如何使用私有GitLab存储库作为npm依赖与私有令牌通过https

我试图在我的节点js应用程序中使用私有GitLab repo作为npm依赖项,使用私有令牌密钥,如下所示:

"dependencies": {
     "my-module": "git+https://<privateToken>:x-oauth-basic@<myGitLabURL>/<MyUser>/my-module.git"
}
Run Code Online (Sandbox Code Playgroud)

当我运行时,npm install我得到关于git克隆的错误fatal: unable to access <git repo path>与443 Connection拒绝回复.

我找不到很多关于如何通过https而不是通过ssh执行此操作的文档.它似乎适用于GitHub

有没有人在使用Https的GitLab上有这方面的经验?

https node.js npm gitlab

12
推荐指数
1
解决办法
5571
查看次数

反应原生动画原生驱动程序是否支持颜色/背景颜色?

我正在尝试为文本的颜色设置动画,如下所示:

const animateTest = scrollY.interpolate({
                                    inputRange: [0, 100],
                                    outputRange: ['rgba(255,0,0,1)', 'rgba(0,255,0,1)']                                    
                                });



      return (<View>      
    <Animated.Text style={{ position:'absolute',                                          
                              color: animateTest
                          }} >blah blah blah</Animated.Text>
    <Animated.ScrollView
              scrollEventThrottle={16}                
              onScroll={Animated.event(
                [
                    {
                        nativeEvent: {contentOffset: {y: scrollY}},
                    },
                ],
                {
                    useNativeDriver: true,
                }
            )}      
          >       
Run Code Online (Sandbox Code Playgroud)

但我收到此错误:

Style property 'color' is not supported by native animated module

使用 ReactNative 0.44.0

根据 这篇博客文章, 它应该可以工作,因为他们说:

Native Animated 目前并非支持您使用 Animated 执行的所有操作。主要限制是您只能为非布局属性设置动画,transform、opacity 和 backgroundColor 之类的东西会起作用,但 flexbox 和 position 属性不会。

但我看到支持的代码中的样式有一个白名单:链接到相关代码 有一个非常有限的白名单:

const STYLES_WHITELIST = {
  opacity: true,
  transform: true, …
Run Code Online (Sandbox Code Playgroud)

animation react-native

5
推荐指数
1
解决办法
8811
查看次数

标签 统计

react-native ×3

android ×2

animation ×1

gitlab ×1

https ×1

ios ×1

node.js ×1

npm ×1

statusbar ×1