开发者

Is there a way to tell at run-time what API level an Android device is running?

开发者 https://www.devze.com 2023-01-13 07:20 出处:网络
Is there a way to get the API level used by a given Android device? I want to make one version of an application that does not use AnticipateOvershootInterpolator() and another t开发者_运维知识库hat

Is there a way to get the API level used by a given Android device?

I want to make one version of an application that does not use AnticipateOvershootInterpolator() and another t开发者_运维知识库hat uses it for devices using API levels greater than 3.


Look at android.os.Build.VERSION.SDK (and android.os.Build.VERSION.SDK_INT for newer devices).


You can use this constant: android.os.Build.VERSION.SDK_INT. It returns one of these values.

0

精彩评论

暂无评论...
验证码 换一张
取 消