Posts Tagged ‘Android’

Posts that contains tutorials and information about Google’s OS, Android.

Unity and Android: Create an Unity app with a custom layout

Click here to read Unity and Android: Create an Unity app with a custom layout

Although Android and Unity3D are both common topics here at 41post.com, this tutorial is the first one featured in this website to combine those two topics into a single post.

So, this first Unity/Android post is going to show how to create an Unity Android application that uses a custom layout which makes the Unity View to take up only part of the screen. Additionally, this post shows how to have some Android buttons underneath that View and how to make them interact with Unity. And as a simple example, those buttons will determine which direction the camera should rotate around a blue box. As usual, there’s a sample project is available at the end of the post. Here’s a GIF illustrating how the application looks and behaves:

This is what this post is trying to achieve

The View used by Unity only takes part of the screen. The three buttons are native Android UI buttons.

(more…)

Android: hexadecimal color input using an EditText

Click here to read Android: hexadecimal color input using an EditText

This Android programming tutorial shows how to create a simple application that takes the value of a hexadecimal color at an EditText field and displays it as an ImageView. In order to do so, this post goes into detail on how to correctly parse the EditText String as 32 bit hexadecimal Integer. Additionally, it explains the part of the code that constrains the characters between A to F and 0 to 9 at the EditText. Finally, it tries to solve some of the EditText problems when applying these constrains.

The application in this post has been tested on Android 2.1, 2.3 and 4.0.

So, here’s a screenshot of the example project application in action:

Hexadecimal Color Input

A screenshot of the example project. It’s available for download at the end of the post.

(more…)

Android: Change color of the standard button inside Activity

Click here to read Android: Change color of the standard button inside Activity

This post explains how to change the color of the standard Android button. It also shows how to change the color of the text inside those buttons. It goes into detail on how to create a ColorFilter effect that changes the color of the button using three different approaches . The code featured in this post has been tested on Android 2.1, 2.2, 2.3 and 4.0.

Before starting, a little advice: know that changing the color of the standard Android button through XML is an easier and more straightforward approach. For that, please refer to the link Custom color buttons for Android (9-Patch). If the button color isn’t going to be changed after the application is initialized, then use XML. If that isn’t the case, then do it programmatically, which is what this tutorial focuses on.

So, here’s the code: (more…)

Android: ADB remote emulator access

Click here to read Android: ADB remote emulator access

This post shows how to access an emulated Android device over a local area network, so you can test and debug applications on another computer. It’s a step by step explanation based on this thread on Stack Overflow. The main goal behind this post is to show just one of the possible ways of doing it. So, if you have a suggestion on how to improve or make this process more secure, please, feel free to comment below.

The technique described on this post has been tested on a computer with Windows 7 64 bit (the one that executes the emulator) and an Ubuntu virtual machine running on another computer. The Ubuntu PC is the one that is running Eclipse and the one where the applications are being coded. For the sake of simplicity, this tutorial will reference it as “dev machine“. The other PC, the one running Windows 7 64 bit, will execute the Android emulator, which will be remotely accessed. This PC will be referenced as “remote machine” from now on.

(more…)

Arrows Live Wallpaper, an arrow flood on your screen!

Click here to read Arrows Live Wallpaper, an arrow flood on your screen!

Update: Get the FULL version ! Or, get the FREE version!

For the last couple of weeks, I’ve been creating an Android live wallpaper and preparing its release. It’s called Arrows Live Wallpaper. As the name implies, it’s an Android live wallpaper that consists of colorful arrows that are constantly moving around. At the background, there’s a equally colorful image that fills up the entire screen adding to the overall effect. Also, you will get lots of options to customize just about everything on the wallpaper, such as the theme, color scheme, arrows speed and battery consumption. Here’s a screenshot:

Arrows Live Wallpaper Screenshot

It’s extremely colorful. Click on the image to enlarge.

(more…)