Use Intel HAXM Hardware acceleration to drastically speed up your Android emulator

This post will show you how to enable hardware acceleration for your Android emulator. It will supercharge developing and testing apps and make it a much better experience. You need: Android SDK An x86 image of the Android emulator you wish to run (not the regular ARM version) Install via the Android SDK. Intel HAXM (Hardware Accelerated Execution Manager) Intel cpu with support for VT-x, EM64T, and Execute Disable Bit (can be enabled in the bios if supported) Eclipse (Optionally,

» Read more

Eclipse ADT has been updated. Brings nice features!

I just noticed throught Eclipse that ADT had been updated. The new ADT version brings some nice touches to the layout editor. Now you can select items and drag and drop them onto the layout. It’s a nice touch that will certainly help new android developers a lot. To get the new features, in eclipse go to Help and then Check for updates. You can read more in the ADT changelog. They have also tweaked the XML formatting. Which

» Read more

How to try out Android 4.0 Ice Cream Sandwich!

A couple or hours ago, the Galaxy Nexus was announced, along with Android 4.0. At the same time, the Android 4.0 SDK was released into the wild.  Here I will show you how to already get it up and running, so you can try it out, and start developing/adapting your Android apps for ICS. It will give you a nice “hands on” feeling for ICS The steps in this post is quite similar to the post I

» Read more

How to align your TabHost at the bottom of the screen

This little tip will show you how to align your TabHost at the bottom of the screen in your Android app, like this: I assume you know how to use the TabHost the usual way (I might write a tutorial on that later). Say you are using your TabHost the following way: <?xml version="1.0" encoding="utf-8"?> <TabHost xmlns:android="http://schemas.android.com/apk/res/android" android:id="@android:id/tabhost" android:layout_width="fill_

» Read more

How to change the icon of your Android app

This is just a small follow-up post to The easiest way to create nice icons for Android apps. Say, if you follow that guide, and have made an icon to represent your app, how do you use it? If you have one icon image, or three icon images (one for each screen density, ldpi, mdpi and hdpi, like in the guide), you put your icon files in the res/drawable folder where they belong. Depending on what API level you

» Read more

The easiest way to create nice icons for Android apps

In this article I will show you a very easy way to create nice looking icon drawables you can use in your Android applications. Using this method we can easily skip through the difficult and time-consuming parts of creating icons. Yes, I know this method does not work for everyone, some Android developers have their own designer and so on, but for a small and simple app, this will definateley do! The problem Creating icons for Android apps may sound

» Read more

How to easily extract strings from your Android code into the strings.xml file

This handy little feature can save a lot of time and manual work when working with Android apps. If you during Android development in Eclipse use hardcoded strings in your java code, like in the example below: package test.layout; import android.app.Activity; import android.os.Bundle; import android.widget.Button; public class LayoutTest extends Activity { private Button btn; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); btn = (Button) findViewById(R.id.Button01); btn.

» Read more

How to create Gradient Lines with Drawables in Android

This article will show you how to create simple gradient line separators to spice up the layout a little bit. We are going to create gradients like these: About Drawables First off, we are going to create a drawable. A drawable resource is graphics that can be drawn on the screen, it can be a couple of different things, here are some examples; Bitmaps – png, jpg or gif images Nine-Patch image – A png that can be stretched, to create buttons

» Read more

Stretching and Spanning layouts in Android

When I was working on my BF2Stats Android app, I had to find out how to place 2 widgets/layout elements on the same horizontal line, while keeping them stretched at the same time so they are filling the width of the screen. It took me a little research before I found a solution, so I will share two methods with you today. This tutorial will show you how to create layouts that stretches in the width. In Eclipse I

» Read more

Formatting Android XML files in Eclipse

The XML auto formatting in Eclipse ADT is currently not working properly. When I am working on Android apps with big XML layout files in Eclipse ADT, the XML tends to get a little cluttered, and sometimes the many attributes ends up on one single line like this: With attributes on one line. It Looks bad, and has low readability. This makes reading the XML layout far more difficult than if they were all ligned up properly below each other.

» Read more