gowong / material-sheet-fab

Android library that provides the floating action button to sheet transition from Google's Material Design.
MIT License
1.58k stars 255 forks source link

Fix rtl #16

Closed ialmetwally closed 8 years ago

ialmetwally commented 8 years ago

Below are the suggested changes to fix the sheet position when the FAB is aligned to the left side of the screen in case of RTL apps for example.

Also in some situations aligning the sheet to the FAB is useless so I created another method that accepts boolean parameter for whether or not the user wants to align the sheet with FAB.

gowong commented 8 years ago

Thanks for the PR. I've actually been working on improving the library so that the sheet will open in the correct position with the appropriate animations no matter where the FAB is on the screen. Will put something up soon.

ialmetwally commented 8 years ago

Cool :+1:
This will be very useful, because for example it's currently very hard to display a sheet with full width and height using the same margin from all sides for both cases : FAB aligned to right and left. And it becomes even harder if you're using the FloatingActionButton from the support design library like I do in a CoordinatorLayout to adjust the FAB position if SnackBar is shown.