Android Canvas Example

Recommend Reading: Draw Animation on Canvas Example

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:

  1. Draw your graphics or animations into a View object from your layout.
  2. 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.

Android Canvas Example screenshot
Android Canvas Example Screenshot

Read more

Adobe AIR 2.6 Release For Android And iOS

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
  • Support for the Amazon Android Market
  • On-device debugging over USB (Android only)
  • Enhanced text support on Android
  • Bundled Android USB drivers on Windows

Read more

Android Infinite Loop Gallery

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.

Read more