Iced Tea Labs Share to be shared

Object Comparison

A. Preface: We usually use “==” or “===” to compare variables in JavaScript. But sometimes, the result maybe not as expected. Let’s take a look: We have class Employee: function Employee(EmpID, Name, Birthday, Supervisor) { this.EmpID = EmpID; this.Name = Name; this.Birthday = Birthday; this.Supervisor = Supervisor; this.Ag... Read more

Support Multiple Languages in Android

A - Introduction In Android development, you can keep the UI strings seperately with app code by storing all the strings in external files. You can find the res folder in Android project structure. Within this res directory are subdirectories for various resource types. There’re some default xml files in res folder such as res/values/strings.x... Read more

String.Format in JavaScript

A - Introduction As you know,  C# and VB.NET provide a very convenient method called Format(). That method allows us to format a string easily by passing the template string ( the string contains some the placeholders) and the parameters. Unfortunately, JavaScript doesn’t support that type of function. Don’t worry :) In this post,  We’ll crea... Read more

Parse JSON in JavaScript

In the previous post ( [Android] Parse JSON in Android ), I showed how to get the JSON string from server and parse it into desired object using Java. This time, in this tutorial, I’ll parse JSON in JavaScript. This can be applied when you develop an mobile application using PhoneGap. A - jQuery.getJSON() method JQuery provides a method call g... Read more

Parse JSON in Android

A - Introduction JSON is a light-weight data interchange format. It’s easy for human to read and write, for machines to parse and generate. JSON is the best choice to replace XML when you want to interchange data from server side. In this post - Parse JSON in Android, I’ll show you how to get JSON string from server and parse it in Android. ... Read more

Android Action Bar

A - Android Action Bar introduction Android Action Bar provides a consistent navigation across your application that can adapt for different screen configurations. As you can see, the above figure describe all the components of the Action Bar: App icon Action items Action overflow The Action Bar has the powerful capabilities like: Adap... Read more

Android Sliding Menu using Navigation Drawer

A - Introduction Android Sliding Menu Nowadays, a lot of Android applications use Sliding Menu to navigate between app’s modules/ screens. The Sliding Menu is hidden in the normal state and can be shown by swiping horizontally gesture or tapping on the app icon on the Action Bar. Previously, if you want to create a Sliding Menu like this, the... Read more

Android Swipe View with Tab Layout

In my previous post “Android Tab Layout”, I showed you how to use TabHost to display a Tab layout. Unfortunately, TabHost is deprecated by android in favor of fragments. Instead of using TabHost, you can create the Android Swipe View with Tab Layout. With Swipe View, user can navigate between sibling screens with a horizontal finger gesture. T... Read more


A - Introduction In Android, an application can push a message to user called Notification outside its normal UI. First, the notification will appear on the Notification Bar User can see all the detail of a notification by opening the Notification Drawer B - Notification Display Elements Android Notification has 2 views: Normal View and ... Read more

Save Data To File

Storing application data is one of the most important part in Android development. And the easiest way to do that is saving data to a file. In this post, I will show you how to save and read data to/ from a file in Android. A - Save data to file First of all, call the FileOutputStream openFileOutput(String name, int mode) method to create a ... Read more

2D Graphics using Multi-threading

A - Introduction Multi-threading To a game developer, Multi-threading is a must-know term. Multi-threading is used when your application needs to do a lot tasks parallely. By this way, all the tasks will run parallely and don’t have to wait for the others finished. B - 2D Graphics using Multi-threading Demo description The application will draw... Read more