medyo / Fancybuttons

Icons, Borders, Radius ... for Android buttons
1.77k stars 397 forks source link

use iconPaddingStart and iconPaddingEnd #97

Open shahimclt opened 7 years ago

shahimclt commented 7 years ago

please consider adding support for RTL layouts. Now, we have to add both right and left padding to preserve spacing in both LTR and RTL layouts, which in turn throws off the center alignment a bit.

shahimclt commented 7 years ago

For anyone wondering the same thing, here is a temporary fix:

<mehdi.sakout.fancybuttons.FancyButton
        android:paddingEnd="@dimen/activity_horizontal_margin"
        android:paddingStart="0"
        fancy:fb_iconPaddingLeft="@dimen/activity_horizontal_margin"
        fancy:fb_iconPaddingRight="@dimen/activity_horizontal_margin"
        />

Just add an android:paddingEnd to balance the icon's padding in the start.