1

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?

MSepehr
  • 890
  • 2
  • 13
  • 36

2 Answers2

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>
  1. use a textview and set this drawable to background of textview
  2. set every number that you want to as text to textview
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