Android provide a full functions on Graphics. Commonly, we can use 2D graphics library and OpenGL ES 1.0 for 3D graphic. In this post, I gonna to introduce the 2D graphics, and give you a 2D graphics canvas example. Usually, when we try to draw 2D graphics, as android developer page say, we have two ways to choose:
Draw your graphics or animations into a View object from your layout.
Draw your graphics directly to a Canvas.
Draw graphics directly to a Canvas is a little bit complicated. You can go to the android developer page for farther details. The following example will show you how to draw a bitmap on the canvas, when you click the canvas.
The Flex provides a lots of functions about Matrix Transformation functions. Using these matrix functions, we can implements 2D transformation in a very easy way. For 2D transformation, the most common transformation is Translate, Scale, Rotate, and Skew. By default, all these transformations are according to the Top-Left point, (0, 0) point. For example, when we set a rotation as 45 in a canvas, the canvas will rotate 90 degrees around (0,0), as figure 1 shown. The Scale and Skew also use the same rule to transformation. But lots of times, we want to rotate a canvas, movieclip, or an image, around a certain point, for example, rotate it around center point, as figure 2 shown. In this post, I will show you how to make a rotation around a point.
Adobe AIR 2.6 is released already. As adobe announced: “The primary focus of 2.6 is to achieve feature parity between Android and iOS”. And it is true, there are lots of improvements focusing on the android and ios.
Asynchronous Bitmap Decoding
Microphone support on iOS
StageWebView on iOS
Multitasking on iOS
Retina Support on iOS
iOS Camera, CameraUI, and CameraRoll Support
Improved hardware acceleration on iOS
PFI is now ADT
Programmatic control of the display of the on-screen keyboard
Today, I wanna introduce how to make an android infinite loop gallery. This new gallery actually basing on the android gallery, but not really extends from it. The default android gallery can provide a common gallery function. For the common usage, you can easily get the example code from Android Gallery Example: Widget Gallery. But for some advanced usage, it has lots of limitations, for example, infinite loop. Here, I will tell you why and how to create a gallery which has the infinite loop feature.