Android library to generate image avatar from the first letter of a username. Letter avatar like Gmail Android best practice

Overview

AvatarImageGenerator

CircleCI Join the chat at https://gitter.im/AvatarImageGenerator/community Download Generate first letter avatar Image like gmail's contact avatar. It generates an drawable that can be be set to an ImageView.

Installation

Add the Following to your gradle file.

         implementation 'com.first.avatargenerator:AvatarImageGenerator:VERSION'

Supports

Using glide or Picasso you can set the drawable to an imageView as a placeholder.

  1. Picasso
  2. Glide

Picasso

 Picasso.get()
    .load("https://brokenfortest")
    .resize(50, 50)
    .placeholder(AvatarGenerator.avatarImage(this, 200, AvatarConstants.CIRCLE, "Android"))
    .into(imageView2)

Glide

 Glide.with(this)
    .load("http://brokenfortest")
    .placeholder(AvatarGenerator.avatarImage(this, 200, AvatarConstants.CIRCLE, "Kotjav"))
    .into(imageView3)

Without any Library

imageView.setImageDrawable(
    AvatarGenerator.avatarImage(
      this,
      200,
      AvatarConstants.RECTANGLE,
      "Skyways"
    )

Color Model The current version supports material colors A 400,700 and 900.

  1. COLOR400
  2. COLOR700
  3. COLOR900
 Picasso.get()
    .load("https://brokenfortest")
    .resize(50, 50)
    .placeholder(AvatarGenerator.avatarImage(this, 200, AvatarConstants.CIRCLE, "Android",AvatarConstants.COLOR900))
    .into(imageView2)

Shape

  1. Circle
  2. Square
AvatarConstants.RECTANGLE,
AvatarConstants.CIRCLE
Comments
  • notification

    notification

    Hey, nice libary. How to use it to get the image in notifications?

    i use it like this way but its crashing

    On all Activities this is working exept in notifications

    return try { // Here, use glide or do your things on UiThread val profileImg = GlideApp.with(this) .asBitmap() .load(strURL) .placeholder(AvatarGenerator.avatarImage(this, 200, AvatarConstants.CIRCLE, Prefs.getUserName)) .transform(DkcGlide.circleCrop) .submit(_40_DP, _40_DP) .get() profileImg } catch (e: IOException) { e.printStackTrace() null }

    opened by Phase-Issue 3
  • Gradle doesn't recognize v1.5.0 when I upgrade from v1.4

    Gradle doesn't recognize v1.5.0 when I upgrade from v1.4

    When I upgrade to 1.5.0 my Gradle doesn't recognize the latest 1.5.0 version. I'm using Android Studio BumbleBee this is the only library that seems I can't be able to update to the latest version. avatar

    opened by Breens-Mbaka 1
  • Moving to mavenCentral()

    Moving to mavenCentral()

    Hi, I am facing issue after removing JCenter() because everything has been moved to mavenCentral(). Do you have any plans for working on compatibility of this library with mavenCentral()?

    opened by irfansarwar12345 1
  • can not resolve method 'avatarImage' in 'AvatarGenerator'

    can not resolve method 'avatarImage' in 'AvatarGenerator'

    companion objects are not accessible from java project so AvatarGenerator.avatarImage and AvatarConstants are not accessible. does this library only work in kotlin projects??

    opened by abxxba 1
  • Add a Gitter chat badge to README.md

    Add a Gitter chat badge to README.md

    AmosKorir/AvatarImageGenerator now has a Chat Room on Gitter

    @AmosKorir has just created a chat room. You can visit it here: https://gitter.im/AvatarImageGenerator/community.

    This pull-request adds this badge to your README.md:

    Gitter

    If my aim is a little off, please let me know.

    Happy chatting.

    PS: Click here if you would prefer not to receive automatic pull-requests from Gitter in future.

    opened by gitter-badger 0
Releases(1.5.0)
Rounded and Squared Avatar for Android Applications

Avatars for Android This project provides a easy way to build avatar compositions for Android applications, as you can see in the screenshot. Usage De

Pedro Álvarez Fernández 194 Nov 28, 2022
Big image viewer supporting pan and zoom, with very little memory usage and full featured image loading choices. Powered by Subsampling Scale Image View, Fresco, Glide, and Picasso. Even with gif and webp support! 🍻

BigImageViewer Big image viewer supporting pan and zoom, with very little memory usage and full featured image loading choices. Powered by Subsampling

Piasy 3.9k Dec 30, 2022
Custom ImageView to generate captcha image.

CaptchaImageView Custom ImageView to generate captcha image. Add CaptchaImageView to your layout <test.jinesh.captchaimageviewlib.CaptchaImageView

Jinesh Francis 610 Oct 18, 2022
Image Picker with Customizable UI for Android, Pick an image from Gallery

Image Picker A Image Picker Library for Android (Supports Android 12) with fully

null 2 May 29, 2022
Slider-Gallery-Zoom: image slider for android supporting indicator and auto scroll with clicking on image

image slider supporting indicator and auto scroll with clicking on image to open full screen image slider swipe and pinch zoom gestures like gallery,just pass your images and the position of the current image.

Mahmoud Elian 3 May 28, 2022
Flickable ImageView for Android. It's like a view of twitter's detail image.

FlickableView Flickable ImageView for Android. It's like a view of twitter's detail image. It's possible that other views animate with FlickableView.

goka 153 Nov 14, 2022
Custom view for circular images in Android while maintaining the best draw performance

CircularImageView Custom view for circular images in Android while maintaining the best draw performance Usage To make a circular ImageView, add this

Pkmmte Xeleon 1.2k Dec 28, 2022
Android library written in kotlin that add a noise effect to image.

NoiseView With NoiseView you can easily add a noise effect to your image. See demo on YouTube Setup The library is pushed to jCenter() as an AAR, so y

Przemek 46 Sep 8, 2022
Customizable Android full screen image viewer for Fresco library supporting "pinch to zoom" and "swipe to dismiss" gestures. Made by Stfalcon

This project is no longer supported. If you're able to switch from Fresco to any other library that works with the Android's ImageView, please migrate

Stfalcon LLC 1.8k Dec 19, 2022
This is a library for make auto slide image in android

Auto Image Slider Screenshot Image Slider Default Image Slider With Custom Adapter Usage Add ImageSlider to your layout

Afdhal_FA 17 Dec 1, 2022
Android Library for cropping an image at ease.

Cropper - Android Image Cropper Android Image Cropper Powerful (Zoom, Rotation, Multi-Source); Customizable (Shape, Limits, Style); Optimized (Async,

Akshat Tiwari 24 Aug 24, 2022
A library for Android provides blurred drop shadows to ImageView similar to iOS image backdrop shadows

A library for Android provides blurred drop shadows to ImageView similar to iOS image backdrop shadows.Provides fast canvas draw as no renderscript needed .The similar shadow blurred effects can also be seen in iOS Music App.

Vivek Verma 163 Dec 31, 2022
Android widget for cropping and rotating an image.

Cropper The Cropper is an image cropping tool. It provides a way to set an image in XML and programmatically, and displays a resizable crop window on

Edmodo 2.9k Nov 14, 2022
Android ImageView replacement which allows image loading from URLs or contact address book, with caching

Smart Image View for Android SmartImageView is a drop-in replacement for Android’s standard ImageView which additionally allows images to be loaded fr

James Smith 1.3k Dec 24, 2022
Replacement for deprecated official Android crop image function

The MIT License (MIT) Copyright (c) 2012 Jan Muller Permission is hereby granted, free of charge, to any person obtaining a copy of this software and

Jan Muller 561 Nov 25, 2022
Custom ImageView for moving image around the screen (Android)

MovingImageView Create a custom ImageView for moving image around the screen. Usage To use MovingImageView, add the module into your project and start

Albert Grobas 819 Nov 18, 2022
Add curve at bottom of image views and relative layouts.

Crescento Android library that adds a curve at the below of image views and relative layouts. CrescentoImageView and CrescentoContainer are the image

Shivam Satija 1.3k Nov 18, 2022
A photoView to scale image and finish activity,高仿微信可拖拽返回PhotoView

DragPhotoView(English) 高仿微信可拖拽返回PhotoView 基于 PhotoView ##下载APK体验 特性 拖拽缩放图片,并且结束Activity 其他PhotoView所有特性如下: Out of the box zooming, using multi-touch a

androidwing 1.6k Dec 5, 2022
PinchToZoom - Pinch to zoom used within list like Instagram

Pinch To Zoom ?? Description Pinch to Zoom with Pan Gestures like Instagram ?? Motivation and Context Big Thanks ???? to the guy and his amazing repo

Vivek Sharma 12 Apr 12, 2022