diff --git a/README.md b/README.md index 631c708..80527b5 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,12 @@ -###TextDrawable +### 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](http://en.wikipedia.org/wiki/Fluent_interface) for creating drawables and a customizable `ColorGenerator`.

-###How to use + +### How to use #### Import with Gradle: @@ -17,11 +18,11 @@ repositories{ } dependencies { - compile 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1' + implementation 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1' } ``` -####1. Create simple tile: +#### 1. Create simple tile:

@@ -40,7 +41,7 @@ ImageView image = (ImageView) findViewById(R.id.image_view); image.setImageDrawable(drawable); ``` -####2. Create rounded corner or circular tiles: +#### 2. Create rounded corner or circular tiles:

@@ -53,7 +54,7 @@ TextDrawable drawable2 = TextDrawable.builder() .buildRound("A", Color.RED); ``` -####3. Add border: +#### 3. Add border:

@@ -66,7 +67,7 @@ TextDrawable drawable = TextDrawable.builder() .buildRoundRect("A", Color.RED, 10); ``` -####4. Modify font style: +#### 4. Modify font style: ```java TextDrawable drawable = TextDrawable.builder() @@ -80,7 +81,7 @@ TextDrawable drawable = TextDrawable.builder() .buildRect("a", Color.RED) ``` -####5. Built-in color generator: +#### 5. Built-in color generator: ```java ColorGenerator generator = ColorGenerator.MATERIAL; // or use DEFAULT @@ -99,9 +100,9 @@ TextDrawable.IBuilder builder = TextDrawable.builder() // reuse the builder specs to create multiple drawables TextDrawable ic1 = builder.build("A", color1); TextDrawable ic2 = builder.build("B", color2); -``` +``` -####6. Specify the width / height: +#### 6. Specify the width / height: ```xml