I use oval shape background for textview but the problem is,I have to set height and width of the textview in xml manually ,then only it will look like a circle, is there any way to make the circular background re-size itself according to the text length dynamically?
circle.xml
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid
android:color="@color/Color_500"/>
</shape>
layout.xml
<TextView
android:layout_width="56dp" //is it possible to make it dynamic according to the text length?
android:layout_height="56dp"
android:background="@drawable/circle"
android:text="@string/longtext"/>