In android for each time picker Dialog we can associate with a dialog. So with this dialog and a global variable we can have any number of Dialog listeners. Here is the sample java code. This is the layout file – main.xml MyAndroidAppActivity .java Please leave your valuable comments on this post.
This is a simple example to how to stream an audio in android. Here is the java code for that. This is the xml that contains the button. When you run this program you will see a button and on clicking on that button you will see a dialog with message “Buffering…..”. Once the buffering is complete the… Read More »
Hello everyone… In this post I will show you how to listen to hardware button in an android smartphone. This post especially shows how to listen to the home button in android. But my advice is never override the home button in your app. Home button is to move the currently running process to background. But you can… Read More »
Hello all.. This post is also about how to sign an android apk to publish it to the android market. I have already shown another method to sign the apk, which is through the command line. How to sign an android APK ? – a simplest way Here is another simple method without using the command line options… Read More »
Actually this is really simple. I have already posted an example for how to download a file in this post. How to Download an image in ANDROID programatically? This is another one little different with a progressbar included. Previously I have shown three other methods to upload files to a server. Check these posts to refer this. 1.… Read More »
The following code simply allows you to select a date and time using the datepicker and timepicker in ANDROID.
Hello Friends…. Today I am going to talk about how to use ndk in android to run c code. Note : These steps are for Mac and Linux Users not for Windows users. Follow these step exactly to set up and run ndk in android. 1. I think that you are having your eclipse and android uptodate. 2.… Read More »
Hello all……. In today’s post I will show you how to use Calendar in android. Actually it is really easy to use calendar in android. For that android provides a calendar widget. We use calendar class to show the Calendar widget. Here is the java source code for this example. This is the main.xml for the layout for… Read More »
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 »
We can create any type of alert in android. Today I will show a simple example showing how to create a custom alert in android. i.e you can provide any layout to your alert dialog. Now we will start. First create an xml for your alert dialog. Here I am creating an xml that contains a textView, an… Read More »
Hello everyone, Here is a simple example showing how to change the theme of default AlertDialog in android. Check this post before for understanding how to use styles. http://www.coderzheaven.com/2012/04/17/inherit-styles-extend-styles-android/ To start first create a fresh project named AlertTest. In the AlertTestDemo.java file copy this code Now create a file named “styles.xml” inside the res/values folder and copy this… Read More »
In this post I will show you how to install an apk on to the emulator or the device through the shell or command prompt. Before experimenting with this post I assume that you have these done 1. Installed the Android SDK. 2. Added the adb path to the environment path. This is how you add the path… Read More »
This is a simple example showing how will you disable any input on your current application screen in android. This is done by showing a transparent overlay dialog on the screen. This is how it is done. The layout for the above java file- main.xml
For implementing a ListView, we first create a xml which contains a ListView named list.xml Next we create a Dialog Object and inflate the above xml and when the listItem is clicked then a Alert Dialog windows comes The java file is listed below The alert window look like this When the Item is selected then