How do you hide an ImageButton in Android?
In order to hide the button, call the setVisible method with either one of two argumentsimageButton.setVisible(View.INVISIBLE)OR imageButton.setVisible(View.GONE);
View ArticleHow to build simple Hashmap cache in Android?
The following snippet shows how to build a simple Bitmap Cache in Android:import java.util.HashMap;import android.graphics.Bitmap;// TODO: Auto-generated Javadoc/** * The Class ImageMemoryCache....
View ArticleHow to check if a file is an Image in Android using FileFilters?
In order to check if file is an Image, one can check for the file extension (jpg, png, etc.) using FileFilter as shown below:packagecom.livrona.apps.sikh.wallpapers;...
View ArticleHow do you center an Image to display in a Splash Page in Android?
Generally the splash page displays an image of the App on launch of the app. Most of time its just an single image that is intended to be displayed.Depending of the size of image and device it runs, it...
View ArticleHow to download and store file contents from Remote location on the SD Card?
The following functions fetches the file contents from a remote location, stores it in a given directory with a given file name on the SDCard of the device
View ArticleHow to generate a random number in CSharp?
In order to generate a random number between two numbers, use the Next Function of the Random class as shown below:Example :
View ArticleHow to create 2D Canvas in HTML5 using Javascript?
SnippetThe following snippet shows how to create a div called as canvas (can be any name) and then in javascript we get the handle to canvas by calling document.getElementById method. Finally we get...
View Article