Author Archives: James
All about ArrayList – Android.
Download complete tutorial PDF from here. Please check the LogCat for Output.
Dynamically Adding, Removing, Toggling and Removing all ActionBar Tabs in Android – Part 2?
Hi all.. In today’s post I will show you how to add actionbar tabs dynamically, remove one by one , hide and unhide them, removing all tabs at once etc. This simple java code does that. First create a project and in the MainActivity, paste this. You may be getting many errors, we will be… Read More »
How to find your Google Plus ID
This is so simple 1. Go to your Google + account (https://plus.google.com/). 2. Click on the Profile icon on the Left. 3. If you look at the URL in the address bar, it should look something like this: https://plus.google.com/104653270154306099169/posts 4. The long numerical string in the URL is your Google+ ID. Here is CoderzHeaven’s from… Read More »
How to get table values from a MySQL database and show it in Android as Tables.?
Here we are accessing a mysql database and get the table values and show it in the Android side as tables. These are some tutorials that I have posted on connection with php and getting tablevalues. 1. Android phpmySQL connection redone. 2. Simplest Lazy Loading ListView Example in Android with data populated from a MySQL… Read More »
How to get all email addresses associated with an android device?
This is a simple code. Check out this. PLease check the LogCat for the List of EMAIL ADDRESSES.
Simplest Lazy Loading ListView Example in Android with data populated from a MySQL database using php.
Hello all… You may have seen many implementations of Lazy Loading ListView. Today I will show you my method to create Lazy Loading ListViews. I dont know whether it can be any more simple than this. In this I am using AsyncTask to download each image. So we will start. Here we have 6 classes.… Read More »
How to show error in an EditText using setError() in Android?
We will go straight to the code. This is the layout containing the EditText and the Button.
How will you create a custom Notification in Android with a custom Layout?
This sample application does that. First create an xml for your notification. custom_notification.xml Now the java code.
How to create a Scrolling Text (marquee) in android using TextView?
OK At first we will create the XML that contains a TextView. marqueetext.xml Now the java code Note : The XMl alone will not create the marquee. For that the most important thing is to do this in java code. Now run the project and see the result.
How to Uninstall Avast Anti Theft for Android?
If you have installed Avast and the Avast anti theft application on your Android and decide you no longer need it, you may find it difficult to remove. It is protected so you first need to remove it’s protection. Here’s how to do it. Go to Device Settings Security Select Device Administrators – you can… Read More »
How to create a blinking text in Android?
Hello everyone… Here I am explaining two methods on how to create a blinking textview in Android. One with the help of Animation class and other with a Logic. Now let’s see that.. Place a textview with an id of “tv” in your layout and attempt this. Download the complete android source code from below.… Read More »
How to create a Slide from Left animation while deleting a row from a ListView in Android?
Hello all…… I have written a lost of posts on Listviews. You can see that by just searching Listviews in my site. Today I will show you how to create a slide out animation while we delete a row from a ListView. So this is the xml that contains the ListView. Let it be in… Read More »
How to read and write files to SDCARD and application SandBox in Android – A complete example?
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 show two different DatepickerDialogs on same activity with only one listener function in android?
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.
Android – JellyBean Features
Some new features introduced in Jelly bean are listed below: Offline voice typing: In contrast with the conventional SIRI assistant, voice dictations in Jelly bean can be done in flight mode or without an internet connection. All the phrasing and voice processing is performed locally, i.e. by the phone processor itself. No server interaction is… Read More »
Which you think is the best – Android or iPhone?
This is a question that has been here since 2007. We know there are many advantages for Android phones and Apple’s iPhone. So what you think, which one is the best. I will say my personal opinion. And I think Android is the best. What is your opinion? Are you an iPhone or ANDROID User?… Read More »
How to start with ActionBar in Android?
With Android 3.0 Google eliminated the need of hardware menu button which is replaced by Action Bars. Here is a quick example on how to use ActionBars. First create a new project and name it ActionBarExample. Now create a folder named “menu” in res folder and create a new XML file inside it named “action_bar_menu.xml”.… Read More »
Uploading and Downloading of files – Popular and Useful posts from CoderzHeaven
Here are the links of my most popular posts on downloading and uploading of files to and from your android device. 1. How to download a file from a remote site in android? – Another simple example – Method -3 2. How to download a file to your android device from a remote server with… Read More »
How to set different layouts for Portrait and Landscape in Android?
This simple example shows how to set different layouts for portrait and Landscape in Android. If you need a detailed explanation please check this url http://developer.android.com/guide/practices/screens_support.html Android Supports these different categories of screens. 1. xlarge screens are at least 960dp x 720dp 2. large screens are at least 640dp x 480dp 3. normal screens are… Read More »
How to make a Button appear like a TextView in Android?
Hello all….. This is a simple trick where we can make the Button appear like a TextView in Android. This is done by setting the background of Button to null like this. b.setBackgroundDrawable(null); This is the xml that contains the button.
How to load an image from the assets folder in android?
Here is a simple example showing how to load an image stores in assets folder in android? Done.
How to read a serialized object from a file in the raw folder in android?
In my previous post I showed how to serialize an object and save it in sdcard in a file and retrieve it. Pull out the file from the sdcard and then create a folder named “raw” inside the “res” folder and copy it. This example shows how to retreive it when it is in the… Read More »
Serialization in Android – A Simple example.
Serializing a class file provides a fast and efficeint way to store information produced by your application! What is serialization? Serialization is essentually taking a screenshot of a class file and its contents. For example, lets say you have the following class: Now we will save this data to a file in the SDCARD. Make… Read More »