Reputation: 353
For some reason, I need create a button with svg.
Here are my code for now, I found that the icon will be at the different position instead of inside the circle.
How to place the icon into the circle?
<Svg height="100%" width="100%">
<TouchableOpacity>
<Icon type="ionicon" name="camera" size={40} />
<Circle r="6%" cx="50%" cy="90%" fill="white" />
</TouchableOpacity>
</Svg>
Upvotes: 0
Views: 645
Reputation: 353
I worked with the code below.
<Svg height="100%" width="100%">
<TouchableOpacity>
<Circle r="6%" cx="50%" cy="90%" fill="white" />
<Text
dx="50%"
dy="91%"
textAnchor="middle"
fontSize="36"
>
📷
</Text>
</TouchableOpacity>
</Svg>
Upvotes: 0