工业网站模板,成都小程序开发外包公司,内容seo是什么意思,wordpress相关网站问 题我希望我的应用中按钮的样式在按下时更改。最好的方法是什么#xff1f;解决方案使用 touchablehighlight 。这里有一个例子#xff1a;use strict;import react#xff0c;{component#xff0c;stylesheet#xff0c;proptypes#xff0c;查看#xff0c;文字解决方案使用 touchablehighlight 。这里有一个例子use strict;import react{componentstylesheetproptypes查看文字touchablehighlight}来自反应原生;导出默认类home extends component {constructor(props){super(props);this.state {pressstatusfalse};}_onhideunderlay(){this.setstate({pressstatusfalse});}_onshowunderlay(){this.setstate({pressstatustrue});}render(){return(lt; view style {styles.container}gt;lt; touchablehighlightactiveopacity {1 }style {this.state.pressstatusstyles.buttonpressstyles.button}onhideunderlay {this._onhideunderlay.bind (this)}onshowunderlay {this._onshowunderlay.bind(this)}gt;lt; textstyle {this.state.pressstatusstyles.welcomepressstyles.welcome}gt;{this.props.text}lt; / textgt;lt; / touchablehighlightgt;lt; / viewgt;);}}home.proptypes {textproptypes.string.isrequired};const styles stylesheet.create({容器{flex1justifycontentcenteralignitemscenter backgroundcolorf5fcff}欢迎{fontsize20textaligncenter保证金10颜色000066}welcomepress{fontsize20textaligncenter保证金10颜色fffffff}按钮{bordercolor000066borderwidth1borderradius10}buttonpress{bordercolor000066backgroundcolor000066borderwidth1borderradius10}});