nkkinsoft.mikhaellopez.circularimageview 4.3.1

The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package nkkinsoft.mikhaellopez.circularimageview --version 4.3.1
                    
NuGet\Install-Package nkkinsoft.mikhaellopez.circularimageview -Version 4.3.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="nkkinsoft.mikhaellopez.circularimageview" Version="4.3.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="nkkinsoft.mikhaellopez.circularimageview" Version="4.3.1" />
                    
Directory.Packages.props
<PackageReference Include="nkkinsoft.mikhaellopez.circularimageview" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add nkkinsoft.mikhaellopez.circularimageview --version 4.3.1
                    
#r "nuget: nkkinsoft.mikhaellopez.circularimageview, 4.3.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package nkkinsoft.mikhaellopez.circularimageview@4.3.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=nkkinsoft.mikhaellopez.circularimageview&version=4.3.1
                    
Install as a Cake Addin
#tool nuget:?package=nkkinsoft.mikhaellopez.circularimageview&version=4.3.1
                    
Install as a Cake Tool

<p align="center"><img src="/preview/header.png"></p>

CircularImageView

<img src="/preview/preview.gif" alt="sample" title="sample" width="300" height="435" align="right" />

Platform API Maven Central Twitter

This is an Android project allowing to realize a circular ImageView in the simplest way possible.

<a href="https://play.google.com/store/apps/details?id=com.mikhaellopez.lopspower"> <img alt="Android app on Google Play" src="https://developer.android.com/images/brand/en_app_rgb_wo_45.png" /> </a>

USAGE

To make a circular ImageView add CircularImageView in your layout XML and add CircularImageView library in your project or you can also grab it via Gradle:

XML

<com.mikhaellopez.circularimageview.CircularImageView
    android:layout_width="250dp"
    android:layout_height="250dp"
    android:src="@drawable/image"
    app:civ_border_color="#3f51b5"
    app:civ_border_width="4dp"
    app:civ_shadow="true"
    app:civ_shadow_radius="10"
    app:civ_shadow_color="#3f51b5"/>

You must use the following properties in your XML to change your CircularImageView.

Properties Type Default
app:civ_circle_color color WHITE
app:civ_circle_color_start color civ_circle_color
app:civ_circle_color_end color civ_circle_color
app:civ_color_direction left_to_right, right_to_left, top_to_bottom or bottom_to_top left_to_right
app:civ_border boolean true
app:civ_border_width dimension 4dp
app:civ_border_color color WHITE
app:civ_border_color_start color civ_border_color
app:civ_border_color_end color civ_border_color
app:civ_border_color_direction left_to_right, right_to_left, top_to_bottom or bottom_to_top left_to_right
app:civ_shadow boolean false
app:civ_shadow_color color BLACK
app:civ_shadow_radius dimension 8dp
app:civ_shadow_gravity center, top, bottom, start or end bottom

ℹ️ You can also use android:elevation instead of app:civ_shadow to have default Material Design elevation.

KOTLIN

val circularImageView = findViewById<CircularImageView>(R.id.circularImageView)
circularImageView.apply {
    // Set Color
    circleColor = Color.WHITE
    // or with gradient
    circleColorStart = Color.BLACK
    circleColorEnd = Color.RED
    circleColorDirection = CircularImageView.GradientDirection.TOP_TO_BOTTOM

    // Set Border
    borderWidth = 10f
    borderColor = Color.BLACK
    // or with gradient
    borderColorStart = Color.BLACK
    borderColorEnd = Color.RED
    borderColorDirection = CircularImageView.GradientDirection.TOP_TO_BOTTOM
    
    // Add Shadow with default param
    shadowEnable = true
    // or with custom param
    shadowRadius = 7f
    shadowColor = Color.RED
    shadowGravity = CircularImageView.ShadowGravity.CENTER
}

C#

CircularImageView circularImageView = FindViewById<CircularImageView>(Resource.Id.circularImageView);
// Set Color
circularImageView.setCircleColor(Color.WHITE);
// or with gradient
circularImageView.setCircleColorStart(Color.BLACK);
circularImageView.setCircleColorEnd(Color.RED);
circularImageView.setCircleColorDirection(CircularImageView.GradientDirection.TOP_TO_BOTTOM);

// Set Border
circularImageView.setBorderWidth(10f);
circularImageView.setBorderColor(Color.BLACK);
// or with gradient
circularImageView.setBorderColorStart(Color.BLACK);
circularImageView.setBorderColorEnd(Color.RED);
circularImageView.setBorderColorDirection(CircularImageView.GradientDirection.TOP_TO_BOTTOM);

// Add Shadow with default param
circularImageView.setShadowEnable(true);
// or with custom param
circularImageView.setShadowRadius(7f);
circularImageView.setShadowColor(Color.RED);
circularImageView.setShadowGravity(CircularImageView.ShadowGravity.CENTER);

LIMITATIONS

  • By default the ScaleType is FIT_CENTER. You can also used CENTER_INSIDE AND CENTER_CROP.
  • Enabling adjustViewBounds is not supported as this requires an unsupported ScaleType.

SUPPORT ❤️

Find this library useful? Support it by joining stargazers for this repository ⭐️ <br/> And follow me for my next creations 👍

LICENCE

CircularImageView by Lopez Mikhael is licensed under a Apache License 2.0.

Product Compatible and additional computed target framework versions.
.NET net10.0-android36.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0-android36.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated

.Net 10 version