android-floating-action-button icon indicating copy to clipboard operation
android-floating-action-button copied to clipboard

Long text in the label is over the screen

Open ormoru opened this issue 10 years ago • 5 comments

On small devices long text is not wrap. It would be nice setting max string length of the label.

ormoru avatar Feb 01 '15 15:02 ormoru

You can always set android:maxWidth in style for FloatingActionsMenu labelStyle parameter

trinitron01 avatar Mar 26 '15 15:03 trinitron01

It seems the width is calculated wrong. There is some line breaking but it is totally offeset.

screenshot_2015-04-18-00-07-40

PaulWoitaschek avatar Apr 17 '15 22:04 PaulWoitaschek

Maybe it can be detected if the label goes right of left. Then calculate the start point and the device width and set the maximum width on the text view to (screenwidth - position - 16dp).

PaulWoitaschek avatar Apr 17 '15 22:04 PaulWoitaschek

Thought about it and took a look at hierarchy viewer.

A good solution would be to set a margin of 16dp to left if label orientation is set to left and a margin of 16dp to right if label orientation is set to right on the outer frame who cantains the fab, fam, etc, so technically the fam layout since the button we see top with an x is a fab.

PaulWoitaschek avatar Apr 18 '15 15:04 PaulWoitaschek

Something new on this one?

VlCTORlOUS avatar Oct 11 '16 13:10 VlCTORlOUS