Monthly Archives: February 2012

Custom GridView in android. A simple example.

Hello all……….. Android has been absoultely wonderful for customizing widgets. I have shown a lot of example to customize ListViews, spinners etc. Today I will show you how to customize gridviews. Using this method you can actually place anything inside a gridview even a webview also. So here we start. We customize a gridview by… Read More »

How to Sort a String array in Android.

Hello all…. This is a simple example showing how to sort a string array which is a arraylist in android. we sort the array using the “Collections” class in android. Here is a simple example Take a look at the LogCat for the output.

ListView with Sections in android.

Hello all………. We have seen many posts about ListViews like creating a listview, adding data to it, customizing a listview etc. Take a look at some of these examples 1. Single Selection ListView in android 2. Flitering a ListView using an input from an EditText in Android. 3. How to create a custom ListView in… Read More »

Sony’s new HD Android SmartPhone Sony Xperia S – Really Smart.

Features include GENERAL 2G Network GSM 850 / 900 / 1800 / 1900 3G Network HSDPA 900 / 2100 – LT26i HSDPA 850 / 1900 / 2100 – LT26a BODY Dimensions 128 x 64 x 10.6 mm Weight 144 g – Touch-sensitive controls DISPLAY Type LED-backlit LCD, capacitive touchscreen, 16M colors Size 720 x 1280… Read More »

Sony’s new HD Android SmartPhone Sony Xperia S – Really Smart.

Features include GENERAL 2G Network GSM 850 / 900 / 1800 / 1900 3G Network HSDPA 900 / 2100 – LT26i HSDPA 850 / 1900 / 2100 – LT26a BODY Dimensions 128 x 64 x 10.6 mm Weight 144 g – Touch-sensitive controls DISPLAY Type LED-backlit LCD, capacitive touchscreen, 16M colors Size 720 x 1280… Read More »

Sony's new HD Android SmartPhone Sony Xperia S – Really Smart.

Features include GENERAL 2G Network GSM 850 / 900 / 1800 / 1900 3G Network HSDPA 900 / 2100 – LT26i HSDPA 850 / 1900 / 2100 – LT26a BODY Dimensions 128 x 64 x 10.6 mm Weight 144 g – Touch-sensitive controls DISPLAY Type LED-backlit LCD, capacitive touchscreen, 16M colors Size 720 x 1280… Read More »

How to use global variables in android? -Part 2

Hello all…. In a previous post I showed a method to share global variables across your android application. Those were done using a static class. Now today I will show you another way of sharing global variables across the application Check these posts for sharing data across the application. 1. http://coderzheaven.com/2011/05/global-variables-in-android/ 2. http://coderzheaven.com/2011/05/global-variables-in-android%e2%80%a6/ 3. http://coderzheaven.com/2011/03/passing-data-between-intents-in-android/… Read More »

Evi more intelligent than Siri and Iris

Ever Since the launch of Siri in iOS smartphones has become more user friendly and funny for people. After that Iris was launched a rival for Siri, this too was a big hit. A little bit about Siri The application uses a natural language user interface to answer questions, make recommendations, and perform actions by… Read More »

Angry Birds Again, Angry Birds Space, the new Angry Birds coming.

We know Angry Birds have conquered almost all tablets and now the completely new edition is launching this March. Acoording to the reports the new game will be launched on March. Angry Birds Space already has an official website with an image of a slingshot on the Moon overlooking Earth. The official blog spot says… Read More »

Listening to EditText input in Android using TextWatcher.

Hello all……. In todays post I will show you how to listen to an EditText input in Android. Often we need this in our applications. We implement this with the help of TextWatcher class. Here is the java code for this. Here I am checking whether the input value in the edittext is between 20… Read More »

Listening to checkBox stateChange in Android

This is a simple example showing how to listen to checkbox in android. To check whether the checkbox is in on state or in off state just add a listener to the checkbox you want to listen. This is how we do this. ch.setOnCheckedChangeListener(new OnCheckedChangeListener() { }); This is the layout contaning a checkbox. This… Read More »

How to change the activity orientation through java code in android?

Here is a simple way to change the orientation of the activity in android Through java code we do this…. Through xml we do this Following are two other values that you can specify in the android:screenOrientation attribute: ➤➤ portrait — Portrait mode ➤➤ sensor — Based on the accelerometer Please leave your valuable comments.

How to place layouts one over another in android using addContentView()?

Hello all… In today’s tutorial I will show you how to add different layouts one over another in android through java code. For this we use the function addContentView() which is a variation on setContentView(View, android.view.ViewGroup.LayoutParams) to add an additional content view to the screen. Here I will create an xml with a textView and… Read More »

How to use Preferences in android?

Hello all… Today I will show you how to use preferences in android? First we will create preferences using Create a folder named “xml” inside the “res” folder and inside that create an xml named “preferences.xml”. Now create a java file named “PreferenceDemo.java” in your src folder and copy this code into it. Now in… Read More »

CustomAlert without any custom Layout in android.

We can create a dialog with custom alert dialog with our xml in android. But for making simple alerts we can make custom alerts through code itself. Here is a simple function for this. Here I am having a Listview and an edittext with two buttons in the alertBox. Please leave your valuable comments on… Read More »

Apply Custom Theme for your activity in android.

In today’s tutorial I will show how to apply custom theme for your activity in android. Android has several built in themes for applying to your activity but you can also provide your own custom themes for your activity. Now we will start creating an activity with a custom theme applied. Create a fresh project… Read More »