Home » Android » Page 15

Android

Particle Explosion example

In this tutorial we are going to see how can we create a Particle Explosion effect in our Android Application. An explosion is just a number of particles (pixels or small shapes in this occasion…) that move in random positions and with random speeds around the screen originated from the same source. In our tutorial we will assume that our ...

Read More »

Sprite Animation in Android

With this example we are going to demonstrate how to  create and display a Sprite animation in an Android Application. A Sprite animation is a moving image animation that you will have seen in a gif image. For example imagine a human walking.               To create this kind of animation in Android is simple. ...

Read More »

Moving Images on Screen

In this example we shall show you how to create and display moving Images on the screen in your Android Application. For example let’s have a moving image that will move through the screen and it bounces back when it hits the edge of the screen. This is an example of a very basic animation that you might want to ...

Read More »

Displaying Images with Android

With this example we are going to demonstrate how to display Images with Android using canvas. In short, to create and use a Sprite Animation you should: copy the image you want to display in one of the /res/drawable* resource folders of the Android Project lock the canvas for exclusive pixel editing model the image with a bitmap use canvas.drawBitmap to ...

Read More »

HTTP Camera live preview example

With this example we are going to demonstrate how to create Live Camera preview in Android. The Android SDK includes a Camera class that is used to set image capture settings, start/stop preview, snap pictures, and retrieve frames for encoding for video. It is a handy abstraction of the real hardware device What we are essentially going to do is setup a web ...

Read More »

Google Maps example

With this example we are going to demonstrate how to use Google maps on Android. Note that in order to use Google Maps, the Google APIs have to be present in your SDK. In case they are not already installed, you will have to manually install them. This is accomplished by using the Android SDK and AVD Manager. So, in ...

Read More »

Animations examples

In this example we shall show you how to programmatically set animations to a layout . To achieve this one should perform the following steps: Create an XML file and place it in a new folder inside the “res” folder of the Android Project Use an  AccelerateInterpolator that dictates the way the animation changes its state Use  the AnimationUtils to load the animation ...

Read More »

Prefernces and PreferenceActivity example

In this example we shall show you how to use Preferences with Android. This functionality is used for storing user’s preferences and using them for example when the application starts. For using the Preferences framework the following steps must be followed: Create a class that extends PreferenceActivity (here called QuickPrefsActivity) Use the addPreferencesFromResource method in order to read the config ...

Read More »

Gallery View without pictures

This is an example of Galery view on Android without any pictures. Gallery View is one of Android’s widgets. It provides a list of scrollables elements, much like the normal ListView or even a HorizontalScrollView. In order to use Gallery View with custom elements follow these steps: Create a Layout xml file with describing the layout of the Gallery elements Add a Gallery ...

Read More »

Creating an AppWidget for the home screen

In this tutorial we are going to see how can you create an AppWidget of your Android Application for the home screen of the device. Since version 1.5, the Android SDK includes the AppWidget framework, a framework that allows developers to write “widgets” that people can drop onto their home screen and interact with. The use of widgets is very ...

Read More »