JoanZapata / android-iconify

Android integration of multiple icon providers such as FontAwesome, Entypo, Typicons,...
http://joanzapata.com/android-iconify
Other
3.93k stars 526 forks source link

Calling IconDrawable.draw(Canvas) results in missing fill color for icon #111

Closed and3rson closed 9 years ago

and3rson commented 9 years ago

I was just trying to combine a map marker icon with FontAwesomeIcon/MaterialIcon. The problem is that resulting image is not filled. For example:

        IconDrawable iconDrawable = new IconDrawable(
                context, icon
        ).color(
                context.getResources().getColor(R.color.primary_color)
        ).sizePx(64);
        // Let's create an empty bitmap...
        Bitmap iconBitmap = Bitmap.createBitmap(64, 64, Bitmap.Config.ARGB_8888);
        // ...and a corresponding Canvas
        Canvas iconCanvas = new Canvas(iconBitmap);
        iconDrawable.draw(iconCanvas);
        // At this point, iconBitmap contains only borders of an icon.
        // I tried with different icons with same result.

Here's a screenshot demonstrating a problem:

Screenshot demonstrating the problem

At the same time, other drawables (PNG etc) are drawn just fine using the same method.

Any ideas? Thanks!

JoanZapata commented 9 years ago

Sorry, fixed in develop, will be released before monday.