Coder Social home page Coder Social logo

syn2203 / discussionavatarview Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hnsycsxhzcsh/discussionavatarview

0.0 0.0 0.0 3.08 MB

Android自定义控件_讨论组圆形头像堆叠、叠加控件DiscussionAvatarView,显示多个参与讨论的人的头像(Android custom control _ discussion group round avatar overlay control DiscussionAvatarView, showing the avatar of multiple people participating in the discussion)

Java 100.00%

discussionavatarview's Introduction

DiscussionAvatarView

Android custom control _ discussion group round avatar overlay control DiscussionAvatarView, showing the avatar of multiple people participating in the discussion
Android自定义控件_讨论组圆形头像堆叠、叠加控件DiscussionAvatarView,显示多个参与讨论的人的头像

Download Apk

Rendering
效果图

The method referenced in the project:
项目中引用的方法:

Step 1. Add the JitPack repository to your build file

步骤1.将JitPack存储库添加到构建文件中
项目的根build.gradle中添加以下代码:

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

Step 2. Add the dependency

步骤2.build.gradle添加依赖项

dependencies {
	    implementation 'com.github.hnsycsxhzcsh:DiscussionAvatarView:v1.3'
}

Step 3. Reference control in layout

步骤3. 布局中引用控件

    <com.discussionavatarview.DiscussionAvatarView
        android:id="@+id/daview"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center_horizontal"
        app:isLastComplete="true"
        app:isShowAnimation="true"
        app:maxCount="6"
        app:radius="30"
        app:space="0.5">

Step 4. Add an avatar using the addData method, and the DiscussionAvatarListener (can be omitted) as an animation effect monitor.

步骤4. initDatas初始化数据(也可以直接addData),新增头像使用addData方法,DiscussionAvatarListener(可以不加)为动画效果的监听

    mBtAdd.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                String url = "https://b-ssl.duitang.com/uploads/item/201807/11/20180711091152_FakCJ.thumb.700_0.jpeg";
                mDiscussAva.addData(url, new DiscussionAvatarListener() {
                    @Override
                    public void onAnimationStart() {

                    }

                    @Override
                    public void onAnimationEnd() {

                    }
                });
            }
        });

If my control helps you, please help click on the top right corner, thank you!

如果有帮助到大家希望点下右上角Star,谢谢!

discussionavatarview's People

Contributors

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