is there any way to create a circle or a square around the number in android with special characters like this: ➊, but with own number?
            Asked
            
        
        
            Active
            
        
            Viewed 854 times
        
    1
            
            
        - 
                    http://stackoverflow.com/questions/10060470/android-draw-circle-around-text – IntelliJ Amiya Apr 01 '16 at 07:13
 - 
                    http://stackoverflow.com/questions/21178193/android-draw-circle-with-text-inside – IntelliJ Amiya Apr 01 '16 at 07:13
 - 
                    do you got it done – Swaminathan V Apr 01 '16 at 07:15
 - 
                    @IntelliJAmiya this won't help me. i want to have something like whatsapp badger in tablayout .text+ (number of new message in circle) – MSepehr Apr 01 '16 at 07:15
 - 
                    @IntelliJAmiya i want to draw circlee around just part of text not all of it – MSepehr Apr 01 '16 at 07:17
 - 
                    1http://stackoverflow.com/questions/19292838/android-spannablestring-set-background-behind-part-of-text – Guillaume Barré Apr 01 '16 at 08:09
 
2 Answers
0
            
            
        Yes. use android view badger. https://github.com/jgilfelt/android-viewbadger of course you have second way to make it. 1. create your own xml shape file for oval shape.
<?xml version="1.0" encoding="utf-8"?>
<shape
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="oval">
   <solid 
       android:color="#666666"/>
   <size 
       android:width="120dp"
       android:height="120dp"/>
</shape>
- use a textview and set this drawable to background of textview
 - set every number that you want to as text to textview
 
        Mohammad moradyar
        
- 157
 - 9
 
0
            
            
        for special character you can use UniCodes or some custom fonts.
<TextView
    width...
    height...
    android:background="@drawable/createShapeInDrawableFolder"/>
As answered by Mohammad moradyar
        Zar E Ahmer
        
- 33,936
 - 20
 - 234
 - 300