Giter VIP home page Giter VIP logo

roundimageview's Introduction

RoundImageView

A Round ImageView that works with vectors! Featuring:

  • Works with vectors!
  • Customisable border width
  • Customisable border color
  • Customisable icon color

Codacy Badge

Install

Add Jitpack to your repositories in your build.gradle file

allprojects {
    repositories {
      // ...
      maven { url 'https://jitpack.io' }
    }
}

Add the below to your dependencies, again in your gradle.build file

implementation 'com.github.thomhurst:RoundImageView:{version}'

Sample

Comparison

Just to say - Absolutely no problem with these libraries, they are great.

Just wasn't working for me when I wanted a vector. :)

Code

<com.tomlonghurst.roundimageview.RoundImageView
            xmlns:app="http://schemas.android.com/apk/res-auto"
            android:layout_width="150dp"
            android:layout_height="150dp"
            app:riv_border_width="2dp"
            app:riv_border_color="#000000">

            <ImageView
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:src="@drawable/ic_baseline_sentiment_very_satisfied_24px"
                    android:tint="@android:color/black"
                    android:scaleType="fitXY"/>

    </com.tomlonghurst.roundimageview.RoundImageView>

OR

<com.tomlonghurst.roundimageview.RoundImageView
            xmlns:app="http://schemas.android.com/apk/res-auto"
            android:layout_width="150dp"
            android:layout_height="150dp"
            app:riv_border_width="2dp"
            app:riv_border_color="#000000"
            app:riv_circle_placeholder_color="#000000"
            app:riv_circle_placeholder_drawable="@drawable/ic_baseline_sentiment_very_satisfied_24px">

        <ImageView
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:scaleType="fitXY"/>

    </com.tomlonghurst.roundimageview.RoundImageView>

Attributes

riv_border_width > Dimension/Size
riv_border_color > Color ID
riv_circle_background_color > Color ID
riv_circle_placeholder_color > Color ID
riv_circle_placeholder_drawable > Drawable ID

If you enjoy, please buy me a coffee :)

Buy Me A Coffee

roundimageview's People

Contributors

asos-tomlonghurst avatar thomhurst avatar

Watchers

 avatar  avatar  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.