Skip to content

Instantly share code, notes, and snippets.

@yuanliwei
Last active January 13, 2016 17:33
Show Gist options
  • Save yuanliwei/d04cd3ef2f2277c19c6e to your computer and use it in GitHub Desktop.
Save yuanliwei/d04cd3ef2f2277c19c6e to your computer and use it in GitHub Desktop.
Android 设置硬件加速

Android 设置硬件加速

  1. 整个应用都要开启硬件加速:< application ... android:hardwareAccelerated ="true">
  2. 在一个Activity中开启硬件加速:
    • <activity ... android:hardwareAccelerated="true" >
    • getWindow.addFlags(WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED);
  3. 取消指定View上的硬件加速:view.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment