In android the default transition between activities is to slide from left to right. But with custom animations we can change that. First create a folder inside the res/drawable folder called “anim”. Then create a file named “fade.xml” and copy this code into it. create another file named “hold.xml” in the same place hold.xml. activity_animation.xml Now the main… Read More »
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 dont forgot to put the following permission in the manifest file.
In android with shapes we can create beautiful layouts. Lets look at an example. Create an xml named “gradient.xml” in your drawable folder and copy this code into it. Now the main layout file main.xml The main java file. Done. You can now run the application.
Here is a simple code to get the current time in android in your own format. The output will look like this.
Hello all….. In today’s tutorial I will show you how to create a custom listview in android. For that we need 3java files. One holding the ListView itself another a Model object that holds the data for the listview and the third one for the Adapter which extends the ArrayAdapter class for holding the model. First the Model.java… Read More »
Here is a sample code to get the version of your application in android. Try changing the version in the AndroidManifest file and check the result in the console. Note : “pack.coderzheaven” should be replaced by your application package name.
This example will test whether a service is running in android if you know it’s package name. Run this sample of code to check this.
This is a simple example showing how will you disable any input on your current application screen in android. This is done by showing a transparent overlay dialog on the screen. This is how it is done. The layout for the above java file- main.xml