Fancybuttons icon indicating copy to clipboard operation
Fancybuttons copied to clipboard

Clipped text when height is small and API >= Lollipop

Open den3000 opened this issue 7 years ago • 1 comments

When I am creating a button like this:

<mehdi.sakout.fancybuttons.FancyButton
	android:id="@+id/btComments"
	android:layout_width="64dp"
	android:layout_height="28dp"
	android:minHeight="0dp"
	android:layout_below="@id/vDevider"
	android:layout_alignParentEnd="true"
	android:layout_alignParentRight="true"
	android:layout_marginTop="-2dp"
	android:padding="0dp"
	android:minLines="1"
	android:lines="1"
	android:maxLines="1"
	android:text="@string/bt_comments"
	fancy:fb_borderWidth="1dp"
	fancy:fb_borderColor="#FF4D3121"
	fancy:fb_radius="@dimen/fb_radius"
	fancy:fb_defaultColor="@color/transp"
	fancy:fb_focusColor="#FFFE9C01"
	fancy:fb_disabledColor="@color/transp"
	fancy:fb_textColor="#FF4D3121"
	fancy:fb_disabledTextColor="@color/colorFbAccentText"
	fancy:fb_textSize="14sp"
	fancy:fb_textFont="@string/fb_text_font" />

Everything is OK on pre-lollipop devices. But on lollipop and higher I see that text of button is clipped at the button, looks like some kind of inner padding or something like that.

It could be fixed in code: btComments.setPadding(0, 0, 0, 0);

I believe that this is a bug.

den3000 avatar Jan 28 '17 17:01 den3000

@daxh i send pull request for resolve this problem

pishguy avatar Aug 09 '17 05:08 pishguy