简体   繁体   中英

Android compatibility, how to use view attributes that only work on newer versions?

I'm sure this is an "easy" question, but I'm totally new to android and java. Basically there are certain attributes that have been changed on later versions eg:

        android:configChanges="keyboardHidden|orientation"

(older)

        android:configChanges="keyboardHidden|orientation|screenSize"

(newer)

What happens to older versions if I use the second option? Would they work correctly or not?

In older versions of android, the screenSize attribute will just get ignored. You are fine to use the second configChanges in all versions.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM