Category Archives: ANDROID

Faster Loading images in GridViews or ListViews in Android using Menory Caching, Complete implemenation with sample code.

By | September 1, 2013

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 »

What is a Memory Heap Size in android? and how can use Bitmap Efficiently?

By | August 25, 2013

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 »

FlipCard animation using Fragments in Android.

By | August 17, 2013

Hello all I am back with fragments again. I know you have seen a lot of posts on fragments and fragment animation. This one will be another useful post for you. This post helps you to show a FlipCard animation using Fragments. Let us see how can we do this. At first I will show… Read More »

Process lifecycle in Android and Different types of processes.

By | July 29, 2013

The Android system tries to maintain an application process for as long as possible, but eventually needs to remove old processes to reclaim memory for new or more important processes. To determine which processes to keep and which to kill, the system places each process into an “importance hierarchy” based on the components running in… Read More »

How to write multilingual Android apps?

By | July 22, 2013

To build multilingual Android apps you need to collect the texts into resource files and translate them. Once you provide the translation, Android OS will choose the resources that match user’s locale. If your application is available in several languages, Android will select the language that the device uses. In this tutorial, we’ll cover: Application… Read More »

What are the main differences between a service and an Intent Service and when you should use it?

By | July 12, 2013

Service is a base class of service implementation. Service class is run in the application’s main thread which may reduce the application performance. Thus, IntentService, which is a direct subclass of Service is borned to make things easier. The IntentService is used to perform a certain task in the background. Once done, the instance of… Read More »

Handling Multiple Instances of a Widget in Android and Identifying each instance with it’s own ID.

By | July 5, 2013

Hey everyone…….Hope all are well….. This post is about Android Widgets. This is going to be one of the bigger posts in Coderzheaven. This posts helps you to handle multiple instances of a Widget. Many of our problem is to identify different instances of the same widget. But there is a solution to this problem.… Read More »

How to get a return value from a DialogFragment? or Using DialogFragments in android.

By | July 1, 2013

Hello all…… This post examples how to get an edittext value from a dialog fragment. You can use the same method to get a button click from a dialog or events like that. You can click on the download link to get the source code. At first we will create a layout for the Dialog… Read More »

Navigation Drawer Example in Android.

By | June 28, 2013

Navigation Drawer The navigation drawer is a panel that transitions in from the left edge of the screen and displays the app’s main navigation options. Displaying the navigation drawer Creating a Navigation Drawer The user can bring the navigation drawer onto the screen by swiping from the left edge of the screen or by touching… Read More »

How to create a fully customizable Toast which will use your own time duration and gravity and layout with ease without using the default toast in android?

By | June 24, 2013

Hello all We all have seen toasts right…ok then you have already customized your toasts right. Here I will show you a method to create toasts which will last the time you set and the gravity. You can download the code by clicking on the download links. This is the class that creates the toast… Read More »

Use of custom animations in a FragmentTransaction when pushing and popping a stack. or How to apply animations in Fragments when pushing on to a stack?

By | June 13, 2013

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 »

How to display a context menu from a fragment?

By | June 9, 2013

Hello all I think you all know about the context menu in android. It appears as a popup when you long press something. Fragment also provides some methods for registering with the contextmenu and showing it. Let’s see how we can do it. You can click on the download links to download the source code.… Read More »

How to initialize a Fragements with attributes as a Bundle at runtime and from attributes in a layout?

By | June 6, 2013

This post Demonstrates a fragment that can be configured through both Bundle arguments and layout attributes. You can click on the links to download the source code. Here there are two fragments in the layout, one is directly in the layout and the other is created dynamically with arguments at runtime. Here is how we… Read More »

How to hide and show a Fragment with animation in Android? and How to retain a state in a Fragment in Android?

By | June 5, 2013

Hello everyone This posts helps you to hide and show a fragment with animation (without XML files animation). And also it shows how to retain a saved state(for eg: a value in a textview). A little about Fragments A Fragments is an independent component which can be connected to an activity. A Fragment typically defines… Read More »

Google’s Android will beat Apple’s iphone in total number of apps downloaded in next few months.

By | June 4, 2013

Analysts are saying that Google play store will be the most popular platform for downloading mobile apps in the next few months. History of Google Play Google Play, formerly known as the Android Market, is a digital application distribution platform for Android and an online electronics store developed and maintained by Google. The service allows… Read More »

How to create animation by default in a GridLayout in Android?

By | June 2, 2013

This example shows you how to create animation using the default XML tag in a gridview. This application demonstrates how to use the animateLayoutChanges tag in XML to automate transition animations as items are removed from or added to a container. Click on the download link to get the source code. Let’s have a look.… Read More »

How to create a SearchView with Filter mode in a ListView in Android?

By | June 1, 2013

Actually this is fairly simple. Android by default provides a SearchView class that has the ability to filter. Just look at the XML layout that I am using in this post. It consists of a SearchView and a ListView. The searchView searches the listview for the matched content. Click on the link below to download… Read More »

Wave Scale Animation in GridViews in Android

By | May 28, 2013

Hello all Previously I have shown many posts where we animate each row of the GridView randomly, linearly etc. GridView RandomFade animation in Android and Cascade animation in a ListView in Android. In today’s post I will show you how to create a wave scale animation in the ListViews. Please refer to my old posts… Read More »

Samsung Galaxy S4

By | May 26, 2013

Display 5inch Full HD Super AMOLED (1920 x 1080) display, 441 ppi AP 1.9 GHz Quad-Core Processor / 1.6 GHz Octa-Core Processor The seletion of AP will be differed by markets Network 2.5G (GSM/ GPRS/ EDGE): 850 / 900 / 1800 / 1900 MHz 3G (HSPA+ 42Mbps): 850 / 900 / 1900 / 2100 MHz… Read More »

How to create a beautiful wheel animation in android?

By | May 18, 2013

Today’s post is about animation, a beautiful animation, exploring capabilities of android. You can click on the link to download the code. Here we will have three java classes and no XML files. 1. GraphicsActivity.java 2. PictureLayout.java 3. Sweep.java At first we start with PictureLayout.java Now our second java file, GraphicsActivity.java No need to declare… Read More »

900 million Android activations

By | May 15, 2013

Google’s Android OS has more than 900 million users, the company said Wednesday at its I/O event began in San Francisco. Google also announced several APIs that will let developers add more capabilities to their Android apps, including in the areas of location and improving battery life. “It’s been an amazing year for Android developers,”… Read More »

How to create a List with Alphabet Overlay in Android

By | May 14, 2013

Hello everyone… Today’s post is about simply loading the ListView with some alphabetically sorted data BUT with the first alphabet overlay over them when you scroll. It’s same as the overlay you see when a user scrolls through the contacts application. SO Let’s start with the code. At first I will create a class that… Read More »

How to start with Android – Basics and Fundementals.

By | May 13, 2013

Hello all This post for everyone who like to start with android and know the basics. It includes Introduction to Android Android Architecture Dalvik Virtual Machine Android Application Fundamental Components The above links will be going by another android blog which also teaches you the basics of Android. Check out these links and start coding… Read More »