Tag Archives: coderzheaven

Central aligning the default message text in AlertDialog in android.

By | January 30, 2012

Hello all.. Today I will show you how to align the message text to center in an AlertDialog. By default it is left aligned, so we have to get a reference to it to align it to center.This is how we do it. Please leave your valuable comments on this post.

Android removes the need of Menu button from devices with ActionBar.

By | January 28, 2012

Hello all.. The latest development in android is that google has removed the menu button from android, instead they provide something called the actionbar like in the Honeycomb devices. Google introduced the ActionBar class as the standard solution to make actions from the user options immediately visible and quick to invoke The ActionBar looks like… Read More »

Working with SQLite databases through command Line in android.

By | January 23, 2012

Hello all, In todays tutorial I will show you how to work with sqlite databases in android through command line. Advantages 1. You can browse any number of databases. 2. You can write any queries and execute. First go through these tutorials to get a glance of how to work with sqlite databases in android.… Read More »

How to save data or score in Android Cocos2D?

By | January 21, 2012

Hello Friends Today I will show you how to save data in cocos2D android in a database and reload it when the game starts. This has been always a problem withe game developers for cocos2D android. I will show you a way to save almost any number of data in a database using SQlite in… Read More »

How to show a sliding window from below in Android?

By | December 22, 2011

Hello everyone, I have already showed you how to use a SlidingViewer to create a slidingWindow. Today I will show another way to create such a window with the help of animation. Please check one of my previous posts to do this in another way. How to show a sliding window from below in Android?… Read More »

Displaying Zoom Controls and Changing the View of Google Maps in Android. or Create ZoomIn or Out by Code

By | December 19, 2011

Hello all……… In the previous post I showed you how to start with Google maps in android. In this post I will show you how to show zooming controls and changing the view of the map. Actually this is really simple. Add these lines to the previous code to add the zooming controls. Now how… Read More »

Most Common and most important String functions in Corona.

By | December 12, 2011

Here are some of the string functions that are most commonly used in Corona SDK. In this example you can find all the common string functions with a wroking example for each. This example contains functions to 1. Check the first character in a string 2. Check the last character in a string. 3. Changing… Read More »

How to use shapes in android? A simple example.

By | October 23, 2011

In android with shapes we can create beautiful layouts. Lets look at an example. Create an xml named “gradient.xml” in your drawable folder and copy this code into it. Now the main layout file main.xml The main java file. Done. You can now run the application.

How to create a MD5 hash of a word in android?

By | September 3, 2011

This is one of the most useful things in android. We can use the MD5 algorithm to create a hash of any string we want. Here is the code for doing that. Check the LogCat for output. Please leave your valuable comments on this post.

How to close All activities in your View Stack in android in one click?

By | August 27, 2011

Hello everyone… Today I will show you how to close all views in android in a single click of a button. Basically if you open a number of activities, each activity is stacked one above the other like a stack if you are not calling finish() on each activity. But there is a way to… Read More »

How to use RadioButtonGroup in Android?

By | August 20, 2011

Hello everyone , In today’s tutorial I will show you how to how to use RadioButton group in Android. Lets go directly to the code. Let’s see the layout for the RadioGroup first. The file is named main.xml This will create a layout file with a radioGroup with 5 radioButtons and a button to clear… Read More »

How to Upload Multiple files in one request along with other string parameters in android?

By | August 16, 2011

Hello everyone, I have shown two methods to upload files in android. In today’s tutorial I will show another simple method to upload files. With this method you can upload multiple files in one request + you can send your own string parameters with them. Here is another method on working with uploading of images.… Read More »

How to get the current progress on your SeekBar in android?

By | August 11, 2011

I have already shown how to use seekBar in android. This simple snippet helps you to get the current progress in the seekbar. It’s same code from this post, only thing is I added the getProgress method. Check the Logcat for the current progress or the TextView in which I am showing. Take the xml… Read More »

Customizing a spinner in android.

By | July 18, 2011

Hello everyone……… You all knew that a spinner or combobox is an inbuilt widget in android. And Like any other widgets spinners are also customizable. Here is a simple example to customize a spinner. First we will look at the java code. The getView method is called for each row in the spinner. So with… Read More »

Customizing a spinner in android.

By | July 18, 2011

Hello everyone……… You all knew that a spinner or combobox is an inbuilt widget in android. And Like any other widgets spinners are also customizable. Here is a simple example to customize a spinner. First we will look at the java code. The getView method is called for each row in the spinner. So with… Read More »

Customizing a spinner in android.

By | July 18, 2011

Hello everyone……… You all knew that a spinner or combobox is an inbuilt widget in android. And Like any other widgets spinners are also customizable. Here is a simple example to customize a spinner. First we will look at the java code. The getView method is called for each row in the spinner. So with… Read More »

Customizing a spinner in android.

By | July 18, 2011

Hello everyone……… You all knew that a spinner or combobox is an inbuilt widget in android. And Like any other widgets spinners are also customizable. Here is a simple example to customize a spinner. First we will look at the java code. The getView method is called for each row in the spinner. So with… Read More »

Customizing a spinner in android.

By | July 18, 2011

Hello everyone……… You all knew that a spinner or combobox is an inbuilt widget in android. And Like any other widgets spinners are also customizable. Here is a simple example to customize a spinner. First we will look at the java code. The getView method is called for each row in the spinner. So with… Read More »

How to use SeekBar in ANDROID?

By | June 21, 2011

Here is a simple example to show how to use seek Bar in android. Create a new project and place this code in it. The main.xml file The strings.xml file. Here is another example to show How to get the current progress on your SeekBar in android? Please leave your valuable cmments

Get All Details from Contacts in ANDROID.

By | June 13, 2011

Hi all.. In today’s post I will show you how to get all information from the ANDROID Contacts programatically. Just copy and paste this code to your mail java file and check the Logcat for output. Note : Make sure you add this permission to the AndroidManifest File. Download the complete android java source code… Read More »

Simple View Animation in ANDROID?

By | June 11, 2011

Hi all….. In this post I will show you a simple animation using a textView. It’s really simple. Steps. 1. Create a fresh project and copy this java code into it. 2. Create a folder named “anim” inside the res folder and create a file named “animation.xml” and copy this code into it. 3. copy… Read More »

TextView with link in ANDROID…….

By | May 10, 2011

Hi all……. All of you may be familiar with TextViews in ANDROID. But how many of you know that we have have html as text in a textView. This post is a simple example to show this. Create a fresh project and copy this code to the main java file. The main.xml The AndroidManifest.xml file

Using Tabbars in ANDROID, A Simple Example……….

By | May 9, 2011

This is a simple example showing how to use tabbars in ANDROID. First create a new project and copy this code to it. Now create three another java files by right clicking the src folder and name it FirstTab.java, SecondTab.java, ThirdTab.java. Now copy the following code to FirstTab.java. SecondTab.java Now ThirdTab.java. Main.xml file AndroidManifest.xml You… Read More »