TextDrawable
This light-weight library provides images with letter/text like the Gmail app. It extends the Drawable class thus can be used with existing/custom/network ImageView classes. Also included is a fluent interface for creating drawables and a customizable ColorGenerator.
How to use
Import with Gradle:
repositories{
maven {
url 'http://dl.bintray.com/amulyakhare/maven'
}
}
dependencies {
compile 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
}
1. Create simple tile:
Note: Specify width/height for the ImageView
and the drawable
will auto-scale to fit the size.
2. Create rounded corner or circular tiles:
3. Add border:
4. Modify font style:
5. Built-in color generator:
6. Specify the width / height:
Note: The ImageView
could use wrap_content
width/height. You could set the width/height of the drawable
using code.