Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question - Pressed State #11

Closed
TurKurT656 opened this issue Feb 20, 2015 · 6 comments
Closed

Question - Pressed State #11

TurKurT656 opened this issue Feb 20, 2015 · 6 comments

Comments

@TurKurT656
Copy link

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 :)

@vbaidak
Copy link
Member

vbaidak commented Feb 20, 2015

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" [email protected] 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
#11.

@vbaidak
Copy link
Member

vbaidak commented Feb 20, 2015

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" [email protected] 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" [email protected] 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
#11.

@vbaidak
Copy link
Member

vbaidak commented Feb 25, 2015

Hi TurKurT656,

Could you please send me a link to Material Guidelines, where you had seen the elevation reaction on press?

Thanks

@TurKurT656
Copy link
Author

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

@vbaidak
Copy link
Member

vbaidak commented Feb 25, 2015

Great!

Thanks

vbaidak pushed a commit that referenced this issue May 12, 2015
…stion - Pressed State #11 #  Default shadow offset does conform to material design guidelines #20 #  PayPal donate link returns error #21
@vbaidak
Copy link
Member

vbaidak commented May 12, 2015

Fixed in version 1.1.0

@vbaidak vbaidak closed this as completed May 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants