Giter Site home page Giter Site logo

abdularis / circularimageview Goto Github PK

View Code? Open in Web Editor NEW
90.0 90.0 14.0 1.14 MB

Circle image view :red_circle: and Avatar image view :smiley: for android

License: Apache License 2.0

Kotlin 100.00%
android android-imageview android-library circular-imageview

circularimageview's Introduction

circularimageview's People

Contributors

abdularis avatar gounlaf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

circularimageview's Issues

Not Playing Gifs

I am using Glide to load gifs.
Normal ImageView Playing gif but this library not playing gif.

Elevation (shadow) support?

Hey! Thank you for this helpful library.
I was setting elevation to AvatarImageView, but it was not working.

<com.github.abdularis.civ.AvatarImageView
                android:id="@+id/user_photo"
                android:layout_width="108dp"
                android:layout_height="108dp"
                android:contentDescription="@string/user_pic"
                android:elevation="5dp"
                app:strokeColor="#f6835f"
                app:strokeWidth="4dp"
                app:text="A"
                app:textColor="#f6835f" />

All other features are working fine.
Any help?

Add databinding support?

Hey, thanks for your work.

I'm using your library together with google library for databinding. This is my code:

<com.github.abdularis.civ.AvatarImageView
            android:layout_width="@dimen/material_list_avatar_size"
            android:layout_height="@dimen/material_list_avatar_size"
            app:avatar_backgroundColor="@color/colorPrimaryDark"
            app:avatar_text="@{item.firstLetterName())}"
            app:avatar_textSize="22sp"
            app:strokeColor="@android:color/black"
            app:strokeWidth="1dp" />

This is the error I get after trying to build:

[kapt] An exception occurred: android.databinding.tool.util.LoggedErrorException: Found data binding errors.
****/ data binding error ****msg:Cannot find the setter for attribute 'app:avatar_text' with parameter type java.lang.String on com.github.abdularis.civ.AvatarImageView.

To solve this issue, I had to explicity declare a binding adapter:

class BindingAdapterUtils {

    companion object {
        @JvmStatic
        @BindingAdapter("app:avatar_text")
        fun setAvatarText(view: AvatarImageView, text: String) {
            view.initial = text
        }
    }
}

After that everything works fine. It may be possible to include native support for databinding? So others users dont get the same error.

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.