(Double buffering is a multi-threaded use to avoid flashing animation. The first principle is that when an animation is displayed first, the program is changing it. Before the previous display is finished, the program pleads to make it from scratch, and the screen will keep flashing. The Android SurfaceView class is actually a double buffering mechanism. For VIEW, generally, setBitMap() is used to make the content to BITMAP, and then drawBitMap is used to make BITMAP. I compared the functions through SurfaceView and the customized VIEW double buffer, and found that the efficiency was similar. See the attachment code for details. This document includes the following annexes:
Asin\bin\com\bao\asin\AsinActivity.class
Asin\bin\com\bao\asin\AsinSurfaceView$ShowThread.class
Asin\bin\com\bao\asin\AsinSurfaceView.class
Asin\bin\com\bao\asin\AsinView$ShowThread.class
Asin\bin\com\bao\asin\AsinView.class
Asin\bin\com\bao\asin\R$attr.class
Asin\bin\com\bao\asin\R$drawable.class
Asin\bin\com\bao\asin\R$layout.class
Asin\bin\com\bao\asin\R$string.class
Asin\bin\com\bao\asin\R.class
Asin\bin\Asin.apk
Asin\bin\classes.dex
Asin\bin\resources.ap_
Asin\gen\com\bao\asin\R.java
Asin\res\drawable-hdpi\icon.png
Asin\res\drawable-ldpi\icon.png
Asin\res\drawable-mdpi\icon.png
Asin\res\layout\main.xml
Asin\res\values\strings.xml
Asin\src\com\bao\asin\AsinActivity.java
Asin\src\com\bao\asin\AsinSurfaceView.java
Asin\src\com\bao\asin\AsinView.java
Asin\.classpath
Asin\.project
Asin\AndroidManifest.xml
Asin\default.properties)