Skip to content

Floating Action Button Library for Android ver. 1.0.5

Compare
Choose a tag to compare
@vbaidak vbaidak released this 26 Feb 05:08
· 3 commits to master since this release
  1. Fixed issue #12: Lollipop elevation disable shadow:

    The fix enables elevation on devices with API 21 Lollipop and higher. Now if elevation is set and the device API meets requirements (has API 21 Lollipop and higher) elevation will be drawn instead of the default shadow.
    In this case configuration of any of the default shadow's parameters will be ignored.
    Previously elevation was not drawn for such devices if set.

    A fix was applied to:

    • hasShadow() method: now if Action Button has elevation enabled (for API 21 Lollipop and higher) the shadow won't be drawn at all
    • calculateCenterX() method: getWidth() method replaced by getMeasuredWidth() to calculate X-axis coordinate
    • calculateCenterY() method: getHeight() method replaced by getMeasuredHeight() is used to calculate Y-axis coordinate

    New methods added:

    • drawElevation(): protected void method, which is called by onDraw(Canvas) to draw the elevation for API 21 Lollipop devices and higher