Closed TurKurT656 closed 9 years ago
Hi,
Elevation is disabled by default in ActionButton.
This is so because elevation is supported only starting from API 21. ActonButton supports API 9 and higher, therefore it has shadow enabled by default.
If you are designing your application to fit the newest API 21 features, you can set elevation either in the XML resource (android:elevation) or programmatically (setElevation(...)). This will work only on devices with Android Lollipop. However, in this case, ActionButton will determine that elevation is present and will use it instead of the shadow (shadow will be disabled then).
I suggest you to experiment with changing the shadow size during onClick event. This will give you the support for pre-Lollipop devices and will require the less code.
Shell Software
Best wishes, Shell Software Inc. On 20 Feb 2015 16:20, "Saman Sattari" notifications@github.com wrote:
Hi In Google guidelines, it says that default elevation for FAB is 8dp and in pressed state the elevation is 14dp(+6dp). is this libs deffault properties are same as google guidelines?
Sorry For My Bad English And ThnQ For Ur Awesome Lib :)
— Reply to this email directly or view it on GitHub https://github.com/shell-software/fab/issues/11.
I thought a bit more and decided to add shadow reaction (for pre-Lollipop devices) and elevation reaction (for Lollipop and higher devices ) as a parameter in version 1.1.0.
Best wishes, Shell Software Inc. On 20 Feb 2015 17:14, "Shell Software" com.software.shell@gmail.com wrote:
Hi,
Elevation is disabled by default in ActionButton.
This is so because elevation is supported only starting from API 21. ActonButton supports API 9 and higher, therefore it has shadow enabled by default.
If you are designing your application to fit the newest API 21 features, you can set elevation either in the XML resource (android:elevation) or programmatically (setElevation(...)). This will work only on devices with Android Lollipop. However, in this case, ActionButton will determine that elevation is present and will use it instead of the shadow (shadow will be disabled then).
I suggest you to experiment with changing the shadow size during onClick event. This will give you the support for pre-Lollipop devices and will require the less code.
Shell Software
Best wishes, Shell Software Inc. On 20 Feb 2015 16:20, "Saman Sattari" notifications@github.com wrote:
Hi In Google guidelines, it says that default elevation for FAB is 8dp and in pressed state the elevation is 14dp(+6dp). is this libs deffault properties are same as google guidelines?
Sorry For My Bad English And ThnQ For Ur Awesome Lib :)
— Reply to this email directly or view it on GitHub https://github.com/shell-software/fab/issues/11.
Hi TurKurT656,
Could you please send me a link to Material Guidelines, where you had seen the elevation reaction on press?
Thanks
Hi, @shell-software This is the link: www.google.com/design/spec/what-is-material/objects-in-3d-space.html I will be happy if u add this feature :)
ThnQ
Great!
Thanks
Fixed in version 1.1.0
Hi In Google guidelines, it says that default elevation for FAB is 8dp and in pressed state the elevation is 14dp(+6dp). is this libs deffault properties are same as google guidelines?
Sorry For My Bad English And ThnQ For Ur Awesome Lib :)