Tag Archives: File Xml

How to pass an Object from One Activity to another in Android.

By | November 5, 2012

Hello all This is a simple post that shows How to pass an Object from One Activity to another in Android. I am going to pass the following object from One Activity to another. MyObject{ String name; String website; } This is the class that defines the Object. This is the first activity that sends… Read More »

How to pass an arraylist value from one activity to another in android?

By | October 28, 2012

This simple example shows how to pass an ArrayList from one activity to another in Android. This is the first activity on which we are sending the arrayList. MainActivity Now this is the Second activity in which we are receiving the passed arrayList. SecondActivity Please check the Logcat for the Output. Source code You can… Read More »

How to read and write files to SDCARD and application SandBox in Android – A complete example?

By | September 6, 2012

Here is a complete example of How to read and write files to SDCARD and application SandBox in Android. First create a new project and inside the mainActivity paste this code. Now create another class named MyFile.java and copy this code into it. Now the layout for the xml file. Note you should give this… Read More »

How to download a file from a remote site in android? – Another simple example – Method -3

By | May 7, 2012

Hello all ……. I have shown many examples on how to download and upload files in android through this site. These are other methods for downloadign a file in android. 1. How to Download an image in ANDROID programatically? 2. How to download a file to your android device from a remote server with a… Read More »

How to download a file to your android device from a remote server with a custom progressbar showing progress?

By | April 29, 2012

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

How to upload an image from Android device to server? – Method 4

By | April 26, 2012

Hello all…. This post is also about uploading an image to server from your android device. Previously I have shown three other methods to upload an image to a server. Check these posts to refer this. 1. Uploading audio, video or image files from Android to server 2. How to Upload Multiple files in one… Read More »

How to change the hint text color in android?

By | April 20, 2012

Hello all.. This simple example will show you how to change the hint text color in android Here is the java code to simply do this. here is a sample project to view the difference. This is the contents of the main java file. The main.xml file Here I am setting a read color to… 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 »

How to take screenshot of application and store it in SDCARD?

By | October 26, 2011

The first part is explained in this Tutorial, that is taking the screenshot of the application (View). The second part is storing it in the SDCARD. This is possible by compressing the image bitmap to bytes and then store. Finally dont forgot to put the following permission in the manifest file.

How to create a splash screen in android?

By | September 10, 2011

Hello everyone today i will show you how to create a splash screen in android. This is one of the simplest ways to create a splash screen however there are another ways to create the splash screen. Lets look at the code. We need two layouts one for the splash screen and another for the… Read More »

How to find the device ID or Serial Number of an android device?

By | July 11, 2011

Here is a simple API to find the device ID of an android device. There are many ways to get the device ID in android Note : Try this in a real device, then only you will get the device ID. Also put this permission in the AndroidManifest file

How to Download an image in ANDROID programatically?

By | July 7, 2011

Hello everyone.. In one of my tutorials I have shown you how to upload an image in android.. In todays tutorial I will show you how to download an image into your phone programatically. I am just picking up an image url from google to show the download. Previously I have shown three other methods… Read More »

How to Open camera in ANDROID?

By | June 25, 2011

Hello everyone.. In today’s tutorial I will show you how to use camera in ANDROID in your program. In this tutorial we will be having a button which will open the camera and after taking the photo it will show it in an imageView. Note: This program will work only in the real device not… 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

Customizing your button or TextView or another view in ANDROID.

By | April 30, 2011

Beautifying our applications is one of the main features of your application’s success. In ANDROID there are many possible ways to do this. For eg. We need to have different colors for our buttons, However we can give backgrounds for buttons and all. But we can do many by using our custom xml files, like… Read More »

How to check SDCard free space in ANDROID?

By | April 19, 2011

This is a simple example that shows how many bytes are free in your SDCard. Inorder to run this example, you have to create an SDCard and start the emulator with the SDCard. Now create a fresh project and name it “FreeSpaceActivity.java” and copy the following code to it. The main.xml file AndroidManifest file Please… Read More »

Applying a shape to xml in android

By | April 15, 2011

By adding a custom shape we can make the layout more attractive. For this we have to create a xml file and specify this in the main layout xml file First make a xml inside the drawable folder. Then in the main file specify this shape like this. The “category” is the name of the… Read More »

Android listView with icons

By | March 25, 2011

In this post, we will have a list whose rows are made up of image, Here we just supply data to the adapter and helping the adapter to create a View objects for each row The output will be For this first create a xml file to hold the listview The next objective is to… Read More »

How to add files like images inside your emulator in ANDROID?

By | March 24, 2011

In many of our android applications we need images and other files to be inside your emulator, such as images in the gallery. But unlike iPhone we cannot simply drag and drop files inside the emulator., because iPhone’s is simply a simulator. It justs creates an envoronment for testing. But ANDROID mimics the real phone.… Read More »

How do you call an actionscript function from a html page and viceversa. How to you access the actionscript variable function from an HTML page in actionscript.

By | December 26, 2010

The following code helps you to do this. Save the following  code as am .mxml file The html file start.html

Play Video using VideoView in ANDROID.

By | September 19, 2010

Playing a video file is simple in android. This post will help you. Put your video in res/raw folder. If no raw folder present then create a new folder inside res. The main. xml file. Please leave your comments if this post was useful.