javascript - React Native Border Radius with background color -


in react native, borderradius working background color given button stays square. going on here?

js

<touchablehighlight   style={styles.submit}   onpress={() => this.submitsuggestion(this.props)}   underlaycolor='#fff'>     <text style={[this.getfontsize(),styles.submittext]}>submit</text> </touchablehighlight> 

style

... submit:{     marginright:40,     marginleft:40,     margintop:10, }, submittext:{     paddingtop:20,     paddingbottom:20,     color:'#fff',     textalign:'center',     backgroundcolor:'#68a0cf',     borderradius: 10,     borderwidth: 1,     bordercolor: '#fff' }, ... 

enter image description here

try moving button styling touchablehighlight itself:

styles:

  submit:{     marginright:40,     marginleft:40,     margintop:10,     paddingtop:20,     paddingbottom:20,     backgroundcolor:'#68a0cf',     borderradius:10,     borderwidth: 1,     bordercolor: '#fff'   },   submittext:{       color:'#fff',       textalign:'center',   } 

button (same):

<touchablehighlight   style={styles.submit}   onpress={() => this.submitsuggestion(this.props)}   underlaycolor='#fff'>     <text style={[this.getfontsize(),styles.submittext]}>submit</text> </touchablehighlight> 

enter image description here


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -