Tseng’s dev blog

A developers blog


Archive for the 'Java' Category



Android 1.5 NDK Released!

Thursday 25 June 2009 @ 9:22 pm

Finally Google Released the NDK, which allows developers to use native code/libraries in their code (programmed in C or C++) which can be used for intense CPU operations such as encoding/decoding or physics.

You can download it here.

For most Developers this isn’t much interesting, but if you need advanced stuff as implementing your own audio and video codec, you may want to try it out.

Source: Android Developers Blog

Bookmark and Share



How to implement your own Listener in Android/Java

Tuesday 17 February 2009 @ 8:31 pm

When you’re developing application, there is often a need to create your own controls/widgets/classes or to extend already available ones. And in most cases, you want this control/widget to be as flexible as possible. In order to achieve this, you have to create special events, which can be handled outside of your widget.

Some of the popular examples are OnClickListener and OnKeyListener. But sometimes you need Events/Listener which aren’t predefined by the Java or Android SDK. In this case, you have to create your own Listener interface.

In the last post, I’ve shown three different way on how to implement Listeners in your application. Now I’ll show you how to implement your own Listeners.

Continue Reading »
How to implement your own Listener in Android/Java

Bookmark and Share



Implementing Listeners in your Android/Java application

Saturday 14 February 2009 @ 4:18 pm

I’ve seen many people asking how to implement Listeners in their applications. Implementing a Listener is quite easy. There are 3 ways to implement an Listener and the have their advantages and disadvantages.

The tree way to implement Listeners are

  • Inline Implementation
  • Using the implements keyword
  • By using variables

We’ll use our good old LoginExample application, created in previous tutorial which can be found at Android: Your first Android Application.

Continue Reading »
Implementing Listeners in your Android/Java application

Bookmark and Share