Giter Site home page Giter Site logo

ikgroupavatar's Introduction

IKGroupAvatar

License: MIT MinSdk: 19 write: Kotlin Release

limited_list full_list

How to integrate the library in your app?

Step 1: Add it in your root build.gradle at the end of repositories:

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

Step 2. Add the dependency

dependencies {
    implementation 'com.github.iken.tech:IKGroupAvatarView:0.1'
    implementation "androidx.recyclerview:recyclerview:1.1.0"
}

Step 3. Add CurveGraphView to your layout file

 <iken.tech.ikgroupAvatar.IKGroupAvatarView
        android:id="@+id/avatars_list"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:item_limit="3"
        app:display_remaining_items="true"
        app:avatar_border_size="2dp"
        app:avatar_size="50dp"
        app:avatar_margin="-16"
        app:avatar_border_color="@color/colorAccent"
        app:remain_color="@color/colorPrimary"
        app:remain_count_text_color="@android:color/black"
        app:remain_count_text_size="24"
        app:avatar_placeholder="@drawable/ic_launcher_background"/>

Step 4. Pass your data source to IKGroupAvatarView

 val mIKGroupAvatarView = findViewById<IKGroupAvatarView>(R.id.avatars_list)

 val list = mutableListOf<Any>()                  // you can pass URI, URL, Drawable
 list.add(R.drawable.ic_launcher_background)
 list.add("https://avatarfiles.alphacoders.com/668/66833.jpg")
 list.add("https://avatarfiles.alphacoders.com/668/66833.jpg")
 list.add("https://avatarfiles.alphacoders.com/668/66833.jpg")
 list.add("https://avatarfiles.alphacoders.com/668/66833.jpg")
 list.add("https://avatarfiles.alphacoders.com/668/66833.jpg")
 list.add("https://avatarfiles.alphacoders.com/668/66833.jpg")

 mIKGroupAvatarView.dataSource = list

Xml view Attributes

Attribute Functionality defult Value
item_limit disblay limited items 0
display_remaining_items dispaly remaining items view false
avatar_border_size avatar border size 0
avatar_size avatar circle size 38dp
avatar_margin space between each avatar -16
avatar_border_color avatar border color #0000000
remain_color remaining items circle color #d3d3d3
remain_count_text_color remaining items count text color #0000000
remain_count_text_size remaining items count text size 18
avatar_placeholder avatar place holder while avatar's loading finish R.drawable.avatar_placeholder

License

IKGroupAvatar is available under the MIT license. See the LICENSE file for more info.

ikgroupavatar's People

Contributors

mariohany avatar mustafaibrahim989 avatar

Watchers

James Cloos 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.