• Fling Gesture in Android

    On implementing the onGestureListener you can get the events like Fling LongPress Scroll ShowPress SingleTap Its really simple, otherwise we have to calculate the distance between the touchdown and touchup event to check a fling event is happened or not.

  • Java check memory Allocation

    When run the code the output will be similar to this Total memory is: 5177344 Initial free memory: 4986744 Free memory after garbage collection: 5063784 Free memory after allocation: 5045296 Memory used by allocation: 18488 Free memory after collecting discarded […]

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

    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 […]

  • How to listen to the softkeyboard done button in android?

    Instead of using a button on the view we can use the softkeyboard done button to trigger an action. The action can include calling another activity or retrieving the data from the EditText etc. The main.xml contains an Edittext For […]

  • Merge two layout xml in android

    Merging layout is an excellent feature in android. Separate xml can be included in a single xml. For this first i create a main.xml file In the bottom you can see that i have included a xml file named footer2button.xml The Merged […]

  • C++ program to add two complex nos.

    The program contains a class complex with two member variables x and y and a string class with one member variable. Two objects are created for complex class and string class and accepted values through read () function and their […]

  • C++ program append the two text files

    Three file objects are created using the fstream class one for first, second for second file and third for the appended file. The first two files are opened in the input mode and third in the append mode. The first […]

  • C++ program to copy the contents of a text file to another

    Two file objects are created using the fstream class for the two files, one for source file and another destination file. The first file is opened and its contents are copied to the second file using get ( ) and […]

  • Applet FlowLayout Example

    The FlowLayout class puts components in a row, sized at their preferred size. Creates a new flow layout manager with the indicated alignment and the indicated horizontal and vertical gaps. The hgap and vgap arguments specify the number of pixels […]

  • Listening incoming sms message in Android

    When a new sms message is received by the device, a Broadcast Receiver is registered. For this IntentFilter filter = new IntentFilter(SMS_RECEIVED); registerReceiver(receiver_SMS, filter); should be included . Also sms are sent in PDU’s(Protocol Description Units) format, which act as […]

  • emulator: ERROR: the user data image is used by another emulator. aborting

    Restart the adb.exe First stop the adb by typing the command in the Terminal adb kill-server Then start the server adb start-server

  • Android: Conversion to Dalvik format failed: Unable to execute dex: null

    This error often comes when your android project size is large. Try the following steps to remove the error 1. Clean the project Project > Clean 2. Increase the memory allocated in eclipse.ini Open the eclipse.ini file in the the […]

  • Android frame Animation

    A series of frames is drawn one after the other at regular intervals. For this create a xml which contains ImageView for showing the animation The main java file is Next the main part, an xml which holds each image […]

  • Android dialog with ListView

    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 […]

  • Applying a shape to xml in android

    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 […]


Theme by HermesThemes

Copyright © 2018 CoderzHeaven. All Rights Reserved

Please wait...

Subscribe to our newsletter

Want to be notified when our article is published? Enter your email address and name below to be the first to know.