greywolf
public static boolean hasFroyo() {
        // Can use static final constants like FROYO, declared in later versions
        // of the OS since they are inlined at compile time. This is guaranteed behavior.
     //2.2以上
        return Build.VERSION.SDK_INT >= Build.VERSION_CODES.FROYO;
    }
    public static boolean hasGingerbread() {
     //2.3以上
        return Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD;
    }
    public static boolean hasHoneycomb() {
     //3.0以上
        return Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB;
    }
    public static boolean hasHoneycombMR1() {
     //3.1以上
        return Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR1;
    }
    public static boolean hasJellyBean() {
     //4.1以上
        return Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN;
    }

分类:

技术点:

相关文章:

  • 2022-02-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-21
  • 2021-10-21
  • 2021-10-13
猜你喜欢
  • 2021-06-07
  • 2021-12-10
  • 2021-12-05
  • 2022-02-26
  • 2022-01-31
  • 2022-12-23
  • 2021-12-10
相关资源
相似解决方案