I am using ToolbarAndroid in React Native. Using it I am able to display the below
What I want to show is number of items added to cart like below, where number of items added to cart is shown.
I tried to look more into one property, i.e showWithText, but there is not much documentation on it here
Below is my code
<ToolbarAndroid style={{ width: Dimensions.get('window').width, height: 60, backgroundColor: '#42b549' }}
navIcon={require('./img/icon-burgermenu.png')}
onIconClicked={this.onIconClick}
actions={[
{
title: 'Credit Card',
icon: require('./img/icon-CreditCards-Info.png'),
show: 'always',
},
{ title: 'Add To Cart',
icon: require('./img/icon-Cart.png'),
show: 'always',
showWithText: true
},
]}
onActionSelected={this.onActionSelected}>
<TextInput
style={{
borderWidth: 1,
backgroundColor: 'white',
borderRadius: 3,
width: 350,
borderColor: 'white'
}}
tintColor='red'
caretHidden={false}
placeholder='Search '
underlineColorAndroid='transparent'
/>
</ToolbarAndroid>
How can I add the text there, does it have to be another action? If yes, then how?