Code Monkey home page Code Monkey logo

react-native-lyhud's People

Contributors

lxooxl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

react-native-lyhud's Issues

安卓系统下, backgroundTouchable设置后无法变为模态

<View ref="container" pointerEvents= {this.props.backgroundTouchable ? 'none':'auto'} style={[styles.container, {paddingTop: this.props.positionValue}]}> <Animated.View style={[styles.content, { opacity: this.state.opacityValue }, this.props.style]} > {hud} {this.state.text != '' ?<Text numberOfLines={20} style={this.props.textStyle} allowFontScaling={false}>{this.state.text}</Text> : null} </Animated.View> </View> : null;

我在安卓系统下,查看Toggle Inspector发现你上面返回的这个View的大小全变为0了。弹出的提示框也会随着键盘弹出和消失而改变位置。

如何让backgroundTouchable 完成页面的模态

看了下 backgroundTouchable 的用法,他只能保证 HUD 的容器View在提示过程中没有交互. 如何才能保证当前组件(页面)的最底层view 禁用交互呢?

let view = this.state.isShow ?
            <View ref="container" pointerEvents= {this.props.backgroundTouchable ? 'none':'auto'} style={[styles.container, {paddingTop: this.props.positionValue}]}>
                <Animated.View
                    style={[styles.content, { opacity: this.state.opacityValue }, this.props.style]}
                >
                    {hud}
                    {this.state.text != '' ?<Text numberOfLines={20} style={this.props.textStyle}>{this.state.text}</Text> : null}
                </Animated.View>
            </View> : null;
        return view;

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.