Tuesday, 22 August 2017

Circle Text View

step 1:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"   
      android:shape="oval">
   
    <solid 
        android:color="@android:color/white" />

   <size        
         android:height="120dp"        
         android:width="120dp" />
  <stroke       
         android:width="1dp"        
         android:color="@color/colorBlue" />

</shape>
 
save file name:circle_text.xml

setp 2:

<TextView    
        android:id="@+id/circle_textview"    
        android:layout_width="wrap_content"    
        android:layout_height="wrap_content"    
        android:gravity="center"    
        android:layout_gravity="center"    
        android:text="4"    
        android:background="@drawable/circle_text"    
        android:textColor="@color/colorBlue"    
        android:textSize="80dp" />

No comments:

Post a Comment

HOW TO CREATE CIRCLE IMAGE VIEW

Step 1: implementation 'de.hdodenhof:circleimageview:3.0.0' Step 2: <de.hdodenhof.circleimageview.CircleImageView xmlns:ap...