You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
6
+
In this case configuration of any of the default shadow's parameters will be ignored.
7
+
Previously elevation was not drawn for such devices if set.
8
+
9
+
A fix was applied to:
10
+
11
+
***hasShadow()** method: now if **Action Button** has elevation enabled (for *API 21 Lollipop* and higher) the shadow won't be drawn at all
12
+
***calculateCenterX()** method: **getWidth()** method replaced by **getMeasuredWidth()** to calculate *X-axis* coordinate
13
+
***calculateCenterY()** method: **getHeight()** method replaced by **getMeasuredHeight()** is used to calculate *Y-axis* coordinate
14
+
15
+
New methods added:
16
+
17
+
***drawElevation()**: protected void method, which is called by **onDraw(Canvas)** to draw the elevation for *API 21 Lollipop* devices and higher
18
+
1
19
# 1.0.4
2
20
3
21
1. Fixed [**issue #8**: Both buttons show up when I only want one at a time](https://github.com/shell-software/fab/issues/8):
[](https://gitter.im/shell-software/fab?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
6
+
7
+
## Donation
8
+
9
+
Donation helps to improve the project development and speed up the release of new versions. I appreciate any contribution
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.
40
+
In this case configuration of any of the default shadow's parameters will be ignored.
41
+
Previously elevation was not drawn for such devices if set.
42
+
43
+
A fix was applied to:
44
+
45
+
***hasShadow()** method: now if **Action Button** has elevation enabled (for *API 21 Lollipop* and higher) the shadow won't be drawn at all
46
+
***calculateCenterX()** method: **getWidth()** method replaced by **getMeasuredWidth()** to calculate *X-axis* coordinate
47
+
***calculateCenterY()** method: **getHeight()** method replaced by **getMeasuredHeight()** is used to calculate *Y-axis* coordinate
48
+
49
+
New methods added:
50
+
51
+
***drawElevation()**: protected void method, which is called by **onDraw(Canvas)** to draw the elevation for *API 21 Lollipop* devices and higher
52
+
53
+
### 1.0.4 - *previous*
31
54
32
55
1. Fixed [**issue #8**: Both buttons show up when I only want one at a time](https://github.com/shell-software/fab/issues/8):
33
56
34
57
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.
35
58
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
36
59
as expected wherever they called.
37
60
38
-
### 1.0.3 - *previous*
39
-
40
-
1.**Attention!***Deprecated* XML attributes:
41
-
42
-
* **normal** XML attribute renamed to **DEFAULT**.
43
-
You can still use **normal** XML attribute, however it will be removed in version 2.0.0.
44
-
* **mini** XML attribute renamed to **MINI**.
45
-
You can still use **mini** XML attribute, however it will be removed in version 2.0.0.
46
-
47
61
### Features in the next versions:
48
62
49
63
***1.1.0**:
@@ -293,6 +307,7 @@ actionButton.removeShadow();
293
307
```
294
308
295
309
> Shadow radius and offset must be specified in density-independent pixels.
310
+
> For *API 21 Lollipop* and higher **elevation** can be enabled. In this case the default shadow becomes disabled and configuration of any of its parameters will be ignored.
0 commit comments