I am working on an Android app where I need to show some text inside circle like
The text is dynamic.Similarly I want to implement textview inside rectangle shape like
I found out that shape xml file can be used to draw some shapes like
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<corners android:radius="20dip"/>
<stroke android:color="@color/colorPrimary" android:width="5dip"/>
<solid android:color="@android:color/transparent"/>
</shape>
But it is not proper as I want some empty space between text and circle.I also tried to use android:background
in textview but could not achieve the above mentioned scenario.
What is the Best way to implement above scenario? How such similar scenarios can be implemented? Can I use some custom images so that circle/rectangle shapes can be changed and how to achieve this?