Android XML: android:elevation vs. app:elevation

前端 未结 3 1545
生来不讨喜
生来不讨喜 2020-12-15 16:19

When do I use android:elevation and when app:elevation?

What\'s the difference between those two?

3条回答
  •  無奈伤痛
    2020-12-15 17:16

    Hope I can help, Let's talk with an example:

     
    

    The android:elevationattribute will work from the API level 21 and upper.

     
    

    In this case the app:elevation attribute belongs to the FloatingActionButton styleable, inside de Android Design Support Library which will work from version 4 of the framework, instead version 21, the case of android:elevation.

提交回复
热议问题