小编Арт*_*ьев的帖子

不支持 React-native Animation.event 样式属性

我对 Animated.event 有问题,在滚动事件上进行插值。当我使用 Animated.event 时

useNativeDriver: true

我收到下一个错误:

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

如果我使用opacity财产 - 它工作正常。

我的代码:

render() {
        this.yOffset = new Animated.Value(0);

        let event = Animated.event([
            {
                nativeEvent: {
                    contentOffset: {
                        y: this.yOffset
                    }
                }
            }
        ], {useNativeDriver: true});

        let opacity = this.yOffset.interpolate({
            inputRange: [0, 120],
            outputRange: [1, 0],
        });

        let height = this.yOffset.interpolate({
            inputRange: [0, 180],
            outputRange: [200, 100],
        });

        return (
            <View>
                <Header
                    style={{
                        opacity,
                        height
                    }}
                />


                <ScrollView
                    style={[ …
Run Code Online (Sandbox Code Playgroud)

animation android reactjs react-native

21
推荐指数
3
解决办法
2万
查看次数

Telegram API 内联 request_contact

是否可以在内联按钮或 api 请求中使用 request_contact?我了解键盘,但它不适合我。

node.js telegram telegram-bot

3
推荐指数
1
解决办法
2702
查看次数