This Activity shows a simple layout animation. Here we add a new Button to the layout with “APPEARING” animation. You can have a variety of Default animations. Activity The layout. All Done. Please send your comments to firstname.lastname@example.org.
Here is a simple example in which we will save or retain the state of the progress using fragments. Note : We have handle a configuration by another way – by ignoring the change i.e using this property in the activity tag android:configChanges=”” By using this android ignores the configuration change and will never try… Read More »
Hello all we all know what are content providers right? Those who are unaware of content providers please visit this link http://developer.android.com/guide/topics/providers/content-providers.html In a breif content Providers are Content providers manage access to a structured set of data. They encapsulate the data, and provide mechanisms for defining data security. Content providers are the standard interface… Read More »
Hi all This example shows you how to load large images in the gridview without any lag or without outofmemory error. This sample application uses the LruCache to hold the images. A cache that holds strong references to a limited number of values. Each time a value is accessed, it is moved to the head… Read More »
Memory Heap Size Android is a full multitasking system so it’s possible to run multiple programs at the same time and obviously each one can’t use all of your device memory. For this reason there is a hard limit on your Android application’s heap size: if your application needs to allocate more memory and you… Read More »
Hello all We have seen many examples of how to use fragments in android. You can search coderzheaven for all types of transactions using Fragments. Today in this post we will see how we can apply animations to Fragments when pushing on to a stack. This is fairly a long example. I will try to… Read More »
We can send data between two individual applications in Android if the receiving application is configured to received that type of data. For example if an application is to receive Image data then it’s manifest should contain the ImageFilter as Shown below For example ac activity in the receiving application is named “Receiver” then its… Read More »
A little on Dialog Fragments A fragment that displays a dialog window, floating on top of its activity’s window. This fragment contains a Dialog object, which it displays as appropriate based on the fragment’s state. Control of the dialog (deciding when to show, hide, dismiss it) should be done through the API here, not with… 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.… 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… Read More »
Hello android lovers, In today’s tutorial I will show you how to 1. Create a text file and save a textfile in your SDCARD in your preferred path. 2. Read the contents from the same file and show it in a TextView. For writing a file we use the FileWriter class and for reading the… Read More »
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
Hi all….. Splitting a string in android is really easy.checkout the following snippet. Check the Logcat for output. Note: Make sure to put the escape character before the delimiter for splitting,otherwise the output may be each character.
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 »
Hello everyone…….. In this simple example I will show you how to use Text To Speech in ANDROID. This is one of the unique features in ANDROID. Unlike iPhone , ANDROID has a built in TTS Library which supports many languages. But iPhone doesn’t have this feature. They have to depend on third-party software for… Read More »
Hi all,In this tutorial I will show you how to open browser from an ANDROID application. This is done through intents. You know that intents are used to invoke other activities. So we here invoke the browser activity. The following code will open the default browser in your ANDROID phone. This is the manifest file… Read More »
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.