Home

Awesome

CompositionAvatar

Android composition avatar

仿QQ讨论组头像

 基础

使用

  1. 添加 JitPack 仓库地址到项目构建文件 - build.gradle:

    allprojects {
      repositories {
        ...
        maven { url 'https://jitpack.io' }
      }
    }
    
  2. 添加依赖:

    dependencies {
      compile 'com.github.YiiGuxing:CompositionAvatar:v1.0.4'
    }
    
  3. xml 上使用:

    <cn.yiiguxing.compositionavatar.CompositionAvatarView
        xmlns:app="http://schemas.android.com/apk/res-auto"
        android:layout_width="100dp"
        android:layout_height="wrap_content"
        app:fitType="CENTER"
        app:gap="0.25"/>
        <!-- 默认fitType为CENTER -->
        <!-- 默认gap为0.25 -->
    

    详细请看 sample