-
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
-
Fixed issue #8: Both buttons show up when I only want one at a time:
A small fix was applied to show(), hide() and dismiss() methods. Previously these methods might not work properly if the call was done within onCreate() method. This happened because of using android.view.View#isShown() method, which returned false even if the button was shown. Now these methods relay on VISIBILITY and work as expected wherever they called.
-
Attention! Deprecated XML attributes:
- normal XML attribute renamed to DEFAULT. You can still use normal XML attribute, however it will be removed in version 2.0.0.
- mini XML attribute renamed to MINI. You can still use mini XML attribute, however it will be removed in version 2.0.0.
FloatingActionButton class has been renamed to ActionButton class. You can still use FloatingActionButton class, however it is marked as deprecated and will be removed in version 2.0.0. FloatingActionButton class contains other methods, which were deprecated. You can use these old deprecated methods and XML attributes listed below only with FloatingActionButton class. You can't use them with the new ActionButton class. ActionButton class in turn, has the new version of these deprecated methods, which you can use.
-
Attention! Deprecated classes and methods:
-
Classes:
- FloatingActionButton class renamed to ActionButton class. You can still use FloatingActionButton class, however it is marked as deprecated and wiil be removed in version 2.0.0.
-
Public methods in ActionButton (FloatingActionButton) class:
- getAnimationOnShow() method renamed to getShowAnimation(). You can still use getAnimationOnShow() method, however it is marked as deprecated and will be removed in version 2.0.0.
- setAnimationOnShow(android.view.Animation) method renamed to setShowAnimation(android.view.Animation). You can still use setAnimationOnShow(android.view.Animation) method, however it is marked as deprecated and will be removed in version 2.0.0.
- setAnimationOnShow(com.software.shell.fab.FloatingActionButton.Animations) method renamed to setShowAnimation(com.software.shell.fab.ActionButton.Animations). You can still use setAnimationOnShow(com.software.shell.fab.FloatingActionButton.Animations) method, however it is marked as deprecated and will be removed in version 2.0.0.
- getAnimationOnHide() method renamed to getHideAnimation(). You can still use getAnimationOnHide() method, however it is marked as deprecated and will be removed in version 2.0.0.
- setAnimationOnHide(android.view.Animation) method renamed to setHideAnimation(android.view.Animation). You can still use setAnimationOnHide(android.view.Animation) method, however it is marked as deprecated and will be removed in version 2.0.0.
- setAnimationOnHide(com.software.shell.fab.FloatingActionButton.Animations) method renamed to setHideAnimation(com.software.shell.fab.ActionButton.Animations). You can still use setAnimationOnHide(com.software.shell.fab.FloatingActionButton.Animations) method, however it is marked as deprecated and will be removed in version 2.0.0.
-
XML attributes:
- animation_onShow XML attribute renamed to show_animation. You can still use animation_onShow XML attribute, however it will be removed in version 2.0.0.
- animation_onHide XML attribute renamed to hide_animation. You can still use animation_onHide XML attribute, however it will be removed in version 2.0.0.
-
-
Added new public methods in ActionButton (FloatingActionButton) class:
- playShowAnimation() - plays the show animation
- playHideAnimation() - plays the hide animation
- removeShowAnimation() - removes the show animation
- removeHideAnimation() - removes the hide animation
-
Changed the default shadow values:
- shadowRadius value changed from 1.0f to 2.0f in density-independent pixels
- shadowXOffset value changed from 0.5f to 1.0f in density-independent pixels
- shadowYOffset value changed from 1.0f to 1.5f in density-independent pixels
-
Fixed issue in animations attributes parsing:
- animation_onShow
- animation_onHide
- The first release! Everything is new.