Using attributes from API level beyond minSdkVersion

前端 未结 3 1793
心在旅途
心在旅途 2021-02-05 01:18

I am new to Android development and am wondering what happens if you use attributes on XML tags from an API level greater than your minSdkVersion.

For example having:

3条回答
  •  抹茶落季
    2021-02-05 02:08

    Unsupported attributes are safely ignored.

    From SDK documentation:

    When parsing XML resources, Android ignores XML attributes that aren’t supported by the current device. So you can safely use XML attributes that are only supported by newer versions without worrying about older versions breaking when they encounter that code.

提交回复
热议问题