Home » Android » Page 14

Android

Android Password Field Example

In this tutorial we will see how you can use a normal EditText component in order to take a password as an input. Additionally we’ll see how to create a custom Label with some text in it, as well as a simple Button. When the user press the button, the password will be displayed in a toast message.     ...

Read More »

Android Textbox Example

In your Android application, you may want to accept user input. There are many ways you can do that and one of the most basics is the textbox. In Android you can use the EditText class in order to create a textbox on your screen in which the user will write text. Then, we have to bundle this textbox with ...

Read More »

Android Button Example

One of the most basic elements in any Graphical User Interface is the button. So in this post we’ll talk about creating a button and adding it to our application. Furthermore, we’ll show how to bundle a specific button with an action, which will occur every time the user presses the button.                For ...

Read More »

OpenGL ES Texture Mapping

With this example we are going to demonstrate how to perform OpenGL ES Texture mapping (OpenGL ES on Android). We shall create a square and we will apply a texture onto it. A texture is nothing more than a bitmap image. This method is very useful when creating 2D games and is the preferred way to display images using OpenGL. ...

Read More »

Displaying Graphical Elements with OpenGL ES

In this example we shall show you how to display graphical elements with OpenGL ES on Android. First off, 3D graphics happens in the Cartesian Coordinate System. That means that the coordinate system used has three dimensions. X, Y and Z. Traditionally X goes from left to right, Y from bottom to top, and Z from me into the screen ...

Read More »

OpenGL ES rendering example

This is an example of how to perform OpenGL ES rendering on Android. OpenGL for Embedded Systems (OpenGL ES) is a subset of the OpenGL 3D graphics application programming interface (API) designed for embedded systems such as mobile phones, PDAs, and video game consoles. OpenGL ES rendering can be done following these steps: Create a class that extends Activity Create ...

Read More »

Measuring Frames Per Second (FPS)

This is an example of how to measure frames per second (FPS) in an Android application or game. Measuring FPS in an Android game is very important because it allows you to gauge how smooth the game is. In general, the more FPS the better user experience. For a better understanding, make sure to check the Android Game Loop example ...

Read More »

Game loop example

In this example we shall show you how to create a game loop in Android. Before starting, you should check our Basic Game loop example in order to understand the basic concepts. To create a game loop in Android one should perform the following steps: Create a thread that will be used as the game loop Implement the run() method ...

Read More »

Basic game loop

This is an example of how to create a basic game loop with Android. Before following this basic game loop example, you might wish to check out our Android Game Development Tutorials series. To create a basic game loop in Android one should perform the following steps: Create an Android activity (here called DroidzActivity) Implement the onCreate method Create a ...

Read More »

Using bitmap fonts

With this example we are going to demonstrate how to use bitmap fonts in an Android Application. Android is running on a wide variety of devices with lots of different screen sizes and resolutions. So bitmap fonts can help you address the problem of using a consistent font face across different devices. For this tutorial we are going to use ...

Read More »