Android composition avatar
Imitation QQ discussion group picture
- basis
-
Dynamically add and subtract images
-
Dynamically set spacing
-
The animation image
-
Drawable state (e.g. click state) (selector)
-
The vector diagram
use
-
Add the JitPack repository address to the project build file -build. gradle:
allprojects { repositories { .. maven { url 'https://jitpack.io'}}}Copy the code
-
Add dependencies:
dependencies { compile 'Com. Making. YiiGuxing: CompositionAvatar: v1.0.0' }Copy the code
-
Use on XML:
<cn.yiiguxing.compositionavatar.CompositionAvatarView xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="100dp" android:layout_height="wrap_content" app:gap="0.25"/> <! --The default gap is 0.25-->Copy the code
Please refer to sample for details.