Xamarin Android: Create Android Circle Image App

Let’s start,

Step 1 - Open Visual Studio, New Project, Templates, Visual C#, Android, Blank App, Select Blank App. Then give Project Name and Project Location.

Step 2 

Next go to Solution Explorer-> Project Name-> References then Right Click to Manage Nuget Packages then open new Dialog box. This dialog box to search the Refractored.Controls.Circleimageview then Install the Package.

  
 

Step 3

Then Open Solution Explorer-> Project Name->Resources-> drawable then Right Click to Add->Existing Item... then add any one image.



Step 4

Next Open Solution Explorer-> Project Name->Resources->layout->Main.axml Click Open Design View.
 
 
 
 

XMLCode:

  1. <?xml version="1.0" encoding="utf-8"?>  
  2.   
  3. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"  
  4.   
  5. xmlns:app="http://schemas.android.com/apk/res-auto"  
  6.   
  7. android:layout_width="match_parent"  
  8.   
  9. android:layout_height="210dp"  
  10.   
  11. android:padding="16dp"  
  12.   
  13. android:orientation="vertical"  
  14.   
  15. android:background="@android:color/holo_blue_dark">  
  16.   
  17. <refractored.controls.CircleImageView  
  18.   
  19. android:paddingTop="16dp"  
  20.   
  21. android:layout_width="150dp"  
  22.   
  23. android:layout_height="141.5dp"  
  24.   
  25. android:id="@+id/navheader_userimage"  
  26.   
  27. android:src="@drawable/Rose"  
  28.   
  29. app:civ_border_width="2dp"  
  30.   
  31. app:civ_border_color="#000000" />  
  32.   
  33. </LinearLayout>  

 

Design View

 

Step 5: Press F5 or Build and Run the Application.Image will showing Circle View. 

 

Finally, we have successfully created Xamarin Android Circle Image Application.