Home » Android (page 34)

Android

Android: Gallery View without Pictures

Android’s Gallery View is one of the first widgets Android created. It’s so old now that some people even find it hard to find. The Gallery view provides a list of scrollable objects much like the standard ListView. The one main benefit of using the Gallery View is its snap-to-position feature. When the user stops scrolling, the images that end ...

Read More »

Android Game Development – Particle Explosion

Ever wondered how explosions are created? Let’s take a little detour and try to implement a basic particle explosion. An explosion is nothing more than a bunch of particles (be them pixels, small shapes or images) scattered across the screen, originating from a single point. Not all the time but mostly and for the sake of simplicity we’ll assume that ...

Read More »

Android Interview Questions and Answers

Last updated Jan. 4, 2019 Our Android interview questions and answers collection is all about different types of questions that can be used in an interview, in order for the employer to test your skills and knowledge. In the following sections we will discuss about Android OS regarding its functionality, Command line tools, Performance and other topics. Here are some ...

Read More »

Android Game Development – Sprite Animation

If you followed the series so far we are pretty knowledgable in handling touches, displaying images and moving them around. But a moving image it’s a pretty dull sight as it looks really fake and amateurish. To give the characters some life we will need to do more than that. That is what animation is all about. A rock is ...

Read More »

Android Game Development – Measuring FPS

In the previous entry we have created a game loop that runs at a constant speed and constant (more or less) FPS. How can we measure it? Check the new MainThread.java class.           package net.obviam.droidz; import java.text.DecimalFormat; import android.graphics.Canvas; import android.util.Log; import android.view.SurfaceHolder; /** * @author impaler * * The Main thread which contains the game ...

Read More »

Android Game Development – The Game Loop

The game loop is the heartbeat of every game. We used a very rudimentary one so far (you can find it here) without any control over how fast or slow we update our game state and which frames to render. To recapitulate, the most rudimentary game loop is a while loop that keeps executing some instructions until we signal it ...

Read More »

Android Game Development – Moving Images on Screen

In the previous post we’ve displayed an image and implemented a very simple drag functionality. Things we should know by now following the series: launch an Android application in full screen use a separate thread which controls the application (the game loop) load an image from the resources acquire the canvas and draw the image onto it handle basic touch ...

Read More »

Android Game Development – Displaying Images with Android

Before moving to the actual game loop let’s display some graphics so we can get some measurements done. If you haven’t checked it out please do as it is imperative that you understand how a thread updates the screen. You can check it out here. Displaying an image using Android is extremely simple. To scale the problem down we will ...

Read More »