FloatingActionButtonSpeedDial icon indicating copy to clipboard operation
FloatingActionButtonSpeedDial copied to clipboard

Fix #122: Add FAN expansion mode

Open kiewietn opened this issue 5 years ago • 6 comments

First time contributor checklist

  • [x] I have read how to contribute to this project
  • [x] I have read the code of conduct to this project

Contributor checklist

  • [x] I am using the provided codeStyleConfig.xml
  • [x] I have tested my contribution on these devices:
  • Huawei Y3 CAG-L02, Android 8.1.0
  • Samsung Galaxy S5 SM-G900H, Android 6.0.1
  • Virtual device Nexus 5, Android 8.1.0
  • [x] My contribution is fully baked and ready to be merged as is
  • [x] I ensure that all the open issues my contribution fixes are mentioned in the commit message of my first commit using the Fixes #1234 syntax

Description

Add an expansion mode, where the items are arranged radially around the main FAB. Items with label text set, will have the labels display below the mini fab item. The radius length of the expansion mode can be changed from the xml layout file using the layout_constraintCircleRadius.

fab_expansion

kiewietn avatar Aug 08 '19 05:08 kiewietn

Not really sure how to handle the overlapping text. My thought was that clients will use shorter length labels, less action items or increase the expansion radius when text overlaps.

kiewietn avatar Aug 08 '19 10:08 kiewietn

@leinardi, thanks for the comment.

To mitigate risk of overlapping labels, the maximum number of characters displayed on the label could be limited when using the FAN expansion mode.

The label length restrictions applied to the other expansion modes remain unchanged.

fan_expand_text_overlap

Please let me know if this is satisfactory.

kiewietn avatar Aug 12 '19 10:08 kiewietn

Hi @kiewietn, sorry for the late reply, busy week at work.

This is definitely an improvement but I'm still afraid that people will not understand this limitation and will keep opening issues complaining for the cut labels.

I would be fine to release this feature as experimental but I'm not sure how to do it with Java. With Kotlin it would be possible to use the Experimental API marker.

I also notice a bug with the action items alignment: image

It seems that, on your fork, they are not aligned to the main FAB anymore: image

Upstream master doesn't have the issue: image

leinardi avatar Aug 15 '19 08:08 leinardi

Thanks for coming back to me @leinardi . I have fixed the alignment issue and added the limit to the label lengths.

Screenshot_1565944729

kiewietn avatar Aug 16 '19 08:08 kiewietn

This issue has been automatically marked as stale because it has not had activity in the last 60 days.

stale[bot] avatar Oct 15 '19 09:10 stale[bot]

This issue has been automatically marked as stale because it has not had activity in the last 60 days.

stale[bot] avatar Oct 15 '19 14:10 stale[bot]