lxooxl / react-native-lyhud Goto Github PK
View Code? Open in Web Editor NEWA react native module to show hud, it works on iOS and Android.
A react native module to show hud, it works on iOS and Android.
<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 的用法,他只能保证 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;
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.