Closed PhantomLord72 closed 3 years ago
Hi @PhantomLord72, thank you for your PR.
A couple of things before I check it:
master
branch instead of the release
branch?N.1 and 2 are ok. N.3: the default elevation set in master branch is 1, you can see in sd_fab_with_label_view.xml, according to this I have set the default to 1 too (not 0).
N.3: the default elevation set in master branch is 1, you can see in sd_fab_with_label_view.xml, according to this I have set the default to 1 too (not 0).
that is actually the elevation of the CardView, I would expect the FAB to have a different elevation by default (not sure, but I would guess at least 4dp). So this can be a problem: CardView and FAB currently I believe they have different elevation values.
Also, keep in mind that the the current value of the CardView elevation is 1dp, not 1px so you'll need to convert the dp value to px...
So, there are 3 elevation to consider: -of the main fab, set fixed in SpeedDialView code, there are 2 elevation, on open and closed (why 2 different?). -of the card -of the (mini)FAB: in setLabelBackgroundColor there is something wrong; mLabelCardViewElevation is in an "if" before an assignment. Maybe, for consistency, it is better to have an equal elevation across all the three? And to have no distinct elevation for open fab and closed fab?
the 2 different elevations are needed to ensure that the overlay layout doesn't go on top of the FABs. Frankly I'm not sure if makes sense to allow the user to change the elevation. What is the use case?
Only aesthetics. Then primary :) Feel free to reject my pr
In Builder and Parcelable too.
First time contributor checklist
Contributor checklist
Fixes #1234
syntaxDescription
These 2 patches add setFabElevation on the custom view FabWithLabelView. The class SpeedDialActionItem has this new method and the Builder too. The default value for the elevation is 0.