Compile an applicationProgramTherefore, it is critical to consider the graphics requirements correctly. It is best to use appropriate graphics technologies based on different graphics tasks. For example, there are many differences between graphics and animation in interactive game applications compared with static applications. The following describes the options for drawing images that can be used on the Android platform and their most suitable scenarios.
Canvas and drawables
The Android platform provides a set of view visual components that provide general functions for interaction with users. You can also extend this visual component to modify their appearance and behavior. In addition, you can customize your 2D rendering, such as texture buttons or frame animations, by using various painting methods included in a canvas or a created drawable object.
Hardware acceleration
Since android3.0, hardware acceleration can be used to complete most plotting tasks performed by the canvas API, which can provide the performance of plotting.
OpenGL
Android uses the adnroid framework API and Native Development Kit (ndk) to support OpenGL ES 1.0 and 2.0. You can consider using the framework API when you want to add graphic enhancements to applications not supported by the canvas API, or when the platform is independent and has low performance requirements. Using framework APIs has some performance loss compared with ndk, so it is good to use ndk for many graphics-intensive applications such as games (it is important to note that, you can use the framework API to obtain sufficient performance. For example, Google
The body application completely uses the framework API ). If there are many native devices to be transplanted to the Android platformCodeSo it is useful to use OpenGL with ndk. For more information about using ndk, read the documentation in the docs/directory of ndk download (http://developer.android.com/sdk/ndk/index.html.