JoanZapata / android-iconify

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

Icon shadow #138

Open sytolk opened 8 years ago

sytolk commented 8 years ago

Its have "Show an icon where you need a Drawable" example

menu.findItem(R.id.share).setIcon(
   new IconDrawable(this, FontAwesomeIcons.fa_share)
   .colorRes(R.color.ab_icon)
   .actionBarSize());

I want to set icon shadow like this xml but programmatically

<com.joanzapata.iconify.widget.IconTextView
    android:text="I {fa-heart-o} to {fa-code} on {fa-android}"
    android:shadowColor="#22000000"
    android:shadowDx="3"
    android:shadowDy="3"
    android:shadowRadius="1"
    android:textSize="40sp"
    android:textColor="#FF..."
 />

Is it possible to create programmatically IconDrawable with shadow?

JoanZapata commented 8 years ago

You can't create IconDrawable with a shadow, but you can use [TextView.setShadowLayer](http://developer.android.com/reference/android/widget/TextView.html#setShadowLayer%28float, float, float, int%29) to programmatically set a shadow to a TextView.