Clarification regarding Android "Attribute elevation is only used in API level 21 and higher"
Asked Answered
B

1

18

I'm a newcomer to developing for Android, and the concept of developing across multiple different platforms with different supported features on each is really making my head hurt.

For example, if I go into an xml file and set

   android:elevation="10dp"

and it gives me the message "Attribute elevation is only used in API level 21 and higher(current min is 14), and says it'll simply ignore the attribute. Is this saying it'll completely ignore it even if I'm using a Lollipop device, or that it'll only ignore it if i'm not on a Lollipop device?

Buschi answered 6/6, 2015 at 16:32 Comment(0)
F
28

It will only ignore it if you're not on a Lollipop device. The older versions of Android will simply ignore any XML attributes that they do not understand.

Flocculant answered 6/6, 2015 at 16:37 Comment(1)
is there any work arround for the same on lower versions? I want black line/divider between TabLayout and Toolbar/ActinBarPatsypatt

© 2022 - 2024 — McMap. All rights reserved.