JoanZapata / android-iconify

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

Set font size of icon different from text #39

Closed eikaramba closed 9 years ago

eikaramba commented 10 years ago

I use the IconButton to display a button with text and an icon. Works well, but font-awesome tends to be a little smaller than the actual text. Therefore it would be nice to change the size of the icon only. Something like

<android.widget.IconButton
            android:text="{fa-icon} text"
            android:textSize="22sp"
            android:iconSize="30sp"
... />
JoanZapata commented 9 years ago

Would that solution be OK ?

<IconButton
            android:text="{fa-icon 30sp} text"
            android:textSize="22sp"
... />
eikaramba commented 9 years ago

of course yes. that would be nice

DayS commented 9 years ago

Could be even greater to use a size relative to text's size. something like {fa-icon 1.2%}. WDYT ?

eikaramba commented 9 years ago

I would better use the absolute size, because it is easier to use. Otherwise its kind of cumbersome to get the correct value. like web developers also like it more to use px/rem instead of em/%

JoanZapata commented 9 years ago

I think I'll support all of these variants:

JoanZapata commented 9 years ago

Done, will be available in 2.0.4.