Skip to content

Commit 5b773a5

Browse files
authored
Merge pull request NativeScript#1676 from NativeScript/niliev/elevation
docs: note added about default elevation value
2 parents 6961dab + f7d1f12 commit 5b773a5

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

docs/ui/styling.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,7 @@ Example:
621621
{% angular %}
622622
```CSS
623623
.tvElevation{
624-
android-elevation:5;
624+
android-elevation: 5;
625625
}
626626
```
627627
```XML
@@ -635,8 +635,16 @@ Example:
635635
[Demo](https://play.nativescript.org/?template=play-ng&id=hfogBI)
636636
{% endangular %}
637637
638+
> **Note:** Since NativeScript 5.4, the buttons on Android have default elevation (shadow) of 2, due to the new elevation support. Removing the shadow will allow you to create transparent button. To explicitly remove the elevation, set the `android-elevation` property to 0 as shown below:
639+
```CSS
640+
.btn-no-elevation {
641+
android-elevation: 0;
642+
}
643+
```
644+
638645
More info about this property can be found in [Create Shadows and Clip Views](https://developer.android.com/training/material/shadows-clipping) article.
639646
647+
640648
### Using the androidDynamicElevationOffset property <sup>Android</sup>
641649
642650
Another property introduced with {N} 5.4 is `androidDynamicElevationOffset`. This property allows setting an elevation, which will be shown when an action was performed. Those actions can be, for example, `tap`, `touch` etc.

0 commit comments

Comments
 (0)