Closed squeeish closed 9 years ago
My original problem:
<mehdi.sakout.fancybuttons.FancyButton android:id="@+id/buttonChangePassword" android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingBottom="10dp" android:paddingLeft="20dp" android:paddingRight="20dp" android:paddingTop="10dp" android:layout_marginBottom="25dp" fancy:fb_defaultColor="#FF574E" fancy:fb_radius="3dp" fancy:fb_text="@string/changePassword" fancy:fb_textColor="#FFFFFF" fancy:fb_textFont="cg_regular.ttf" fancy:fb_fontIconResource="" fancy:fb_iconPosition="left" />
Setting the layout_width to wrap_content works fine, but match_parent will align the icon to the left and the text to the right of the button.
EDIT: Add screenshot of the button as I see it. Ideally the text + icon should be centered in the button.
EDIT2: If fb_iconPosition is top or bottom, text gravity works fine. If fb_iconPosition is right, text gravity defaults to left.
It looks perfect, i'll merge it after doing some tests
That's great, thanks!
My original problem:
Setting the layout_width to wrap_content works fine, but match_parent will align the icon to the left and the text to the right of the button.
EDIT: Add screenshot of the button as I see it. Ideally the text + icon should be centered in the button.
EDIT2: If fb_iconPosition is top or bottom, text gravity works fine. If fb_iconPosition is right, text gravity defaults to left.