Monthly Archives: February 2012

Custom GridView in android. A simple example.

By | February 29, 2012

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 creating an adapter… Read More »

How to Sort a String array in Android.

By | February 25, 2012

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.

By | February 24, 2012

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 android? 4. Android… Read More »

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

By | February 21, 2012

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 pixels, 4.3 inches… Read More »

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

By | February 21, 2012

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 pixels, 4.3 inches… Read More »

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

By | February 21, 2012

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 pixels, 4.3 inches… Read More »

How to use global variables in android? -Part 2

By | February 20, 2012

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/ Now in this… Read More »

Evi more intelligent than Siri and Iris

By | February 18, 2012

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 delegating requests to… Read More »

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

By | February 18, 2012

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 that Angry Birds… Read More »

Listening to EditText input in Android using TextWatcher.

By | February 16, 2012

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 and 120 if… Read More »

Listening to checkBox stateChange in Android

By | February 14, 2012

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 is the java… Read More »

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

By | February 11, 2012

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()?

By | February 10, 2012

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 a Edittext and… Read More »

How to use Preferences in android?

By | February 9, 2012

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 your main java… Read More »

CustomAlert without any custom Layout in android.

By | February 6, 2012

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 this post.

How to make your activity appear like a dialog box in android?

By | February 5, 2012

Hello all.. Today I will talk about how to theme your activities the way you want. Besides that android provides many built in themes that you can use instead of all writing it yourselves. One of those kind is making the activity appear like a dialog box. Here is how you do it. After creating your activity ->… Read More »

Apply Custom Theme for your activity in android.

By | February 5, 2012

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 and name it… Read More »