Android TextView Arc
Effect Chart:
Layout code:
<textview
android:id= "@+id/product_tag"
android:layout_width= "wrap_content"
android:layout_ height= "Wrap_content"
android:gravity= "center"
android:singleline= "true"
android:textsize= "10SP"
android:textcolor= "@color/label_orange"
android:layout_marginleft= "10DP"
android:background= "@ Drawable/shape_label_orange "
android:text=" tag "/>
Style code:
Radians and backgrounds are mainly implemented by the. xml file in background.
1,
<?xml version= "1.0" encoding= "Utf-8"?> <shape xmlns:android=
"http://schemas.android.com/apk/res/" Android >
<!--solid-->
<solid android:color= "@android: Color/white"/>
<!--border-->
<stroke
android:width= "0.5DP"
android:color= "@color/label_orange"/>
<!--fillet-->
<corners android:radius= "3DP"/>
<!--margin-->
<padding
android:top= "2DP"
Android:bottom= "2DP"
android:left= "6DP"
android:right= "6DP"/>
</shape>
2,
<?xml version= "1.0" encoding= "Utf-8"?> <shape xmlns:android=
"Http://schemas.android.com/apk/res" /android "
android:shape=" Oval
android:uselevel= "false" >
<!--solid-->
<solid android: Color= "@color/label_round_orange"/>
<!--fillet-->
<corners android:radius= "360DP"/>
< !--margin-->
<padding
android:bottom= "1DP"
android:left= "1DP"
android:right= "1DP"
android:top= "1DP"/>
<!--size-->
<size android:width= "15DP"
android:height= "15DP"/>
</shape>
Thank you for reading, I hope to help you, thank you for your support for this site!