amulyakhare / 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.
MIT License
3.16k stars 623 forks source link

Way to set text size #8

Closed skywalkerlw closed 9 years ago

skywalkerlw commented 9 years ago

Is there any easy to way to set text size?

amulyakhare commented 9 years ago

You can set the fontSize as follows:

builder = TextDrawable.builder()
        .beginConfig()
            .fontSize(30) // size of text in pixels
        .endConfig()
        .round();