Giter VIP home page Giter VIP logo

circleview's Introduction

CircleView

sample

License Platform API
Android Arsenal Twitter

This is an Android project allowing to realize a circular View in the simplest way possible. Finish the oval shapes of all colors in your projects.

Android app on Google Play

USAGE

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

implementation 'com.mikhaellopez:circleview:1.0.3'

XML

<com.mikhaellopez.circleview.CircleView
    android:id="@+id/circleView"
    android:layout_width="300dp"
    android:layout_height="300dp"
    app:cv_border="true"
    app:cv_border_color="#000000"
    app:cv_border_width="8dp"
    app:cv_color="#3f51b5"
    app:cv_shadow="true"
    app:cv_shadow_color="#3f51b5"
    app:cv_shadow_radius="10" />

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

Properties:
  • app:cv_color (color) -> default WHITE
  • app:cv_border (boolean) -> default false
  • app:cv_border_width (dimension) -> default 4dp
  • app:cv_border_color (color) -> default BLACK
  • app:cv_shadow (boolean) -> default false
  • app:cv_shadow_color (color) -> default BLACK
  • app:cv_shadow_radius (float) -> default 8.0f
  • app:cv_shadow_gravity (center, top, bottom, start or end) -> default bottom

KOTLIN

sample

val circleView = findViewById<CircleView>(R.id.circleView)
circleView.circleColor = Color.WHITE
// Set Border
circleView.borderColor = Color.BLACK
circleView.borderWidth = 10f
// Add Shadow with default param
circleView.shadowEnable = true
// or with custom param
circleView.shadowRadius = 15f
circleView.shadowColor = Color.RED
circleView.shadowGravity = CircleView.ShadowGravity.CENTER

JAVA

CircleView circleView = findViewById(R.id.circleView);
circleView.setCircleColor(Color.WHITE);
// Set Border
circleView.setBorderColor(Color.BLACK);
circleView.setBorderWidth(10f);
// Add Shadow with default param
circleView.setShadowEnable(true);
// or with custom param
circleView.setShadowRadius(15f);
circleView.setShadowColor(Color.RED);
circleView.setShadowGravity(CircleView.ShadowGravity.CENTER);

LICENCE

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

circleview's People

Contributors

lopspower avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.