I need to increase the Size(height) of the progress bar. Any suggestions would b helpful.
I am using ProgressViewIOS native component.
I need to increase the Size(height) of the progress bar. Any suggestions would b helpful.
I am using ProgressViewIOS native component.
The use of transform property is correct. Its syntax should be something like
<ProgressViewIOS style={styles.progressBar}/>
const styles = StyleSheet.create({
progressBar: {
width: 100,
transform: [{ scaleX: 1.0 }, { scaleY: 2.5 }],
}
})
I was able to achieve height manipulation using the transform style property.
transform: 'scaleX(1.0) scaleY(3.0)'
changing the scaleY
number will increase or decrease the height.
For swift 3
progressView.transform = CGAffineTransform(scaleX: 1.0, y: 5.0)
This is how I fixed my issue. You need to style the transform and the height.
style={{transform: [{ scaleX: 1.0 }, { scaleY: 4}], height:12}}
Happy coding!
{( Platform.OS === 'android' )
?
( <ProgressBarAndroid progressTintColor="#4a90e2" progress = { this.state.progress } styleAttr = "Horizontal" indeterminate = { false } /> )
:
( <ProgressViewIOS style={{transform: [{ scaleX: 1.0 }, { scaleY: 4}], height:12}} progressTintColor="#4a90e2" progress = { this.state.progress } /> )
}