Android

Android
Custom Android ListActivity

In a previous post I demonstrated the concept of “master pages” in Android. Essentially what this did was allow you to have a base layout so that you didn’t have to repeat the same layout on all views that had the same things at the top and bottom of the layout. In the comments someone asked how this could be applied to the ListActivity. I haven’t done much with Android the last few months and have not had the chance to use this activity type yet so I decided to look into it. After throwing some simple pages...

posted @ Monday, August 08, 2011 11:45 PM | Feedback (76)

Review of Professional Android 2 Application Development

For those of you who have been following some of my recent posts you have noticed that I have been doing quite a bit of Android development lately. Nathan suggested in the comments of one of my posts that I review the book I used to get started. I bought the book Professional Android 2 Application Development over the summer shortly after buying an Android phone. I had tried to get started by just using the Android website, but I am not one for browsing all over a site to learn all the features of a language or platform....

posted @ Sunday, January 09, 2011 10:08 PM | Feedback (7)

“Master Pages” in Android

The title of this post may be a little confusing because there aren’t master pages in Android. I have done a lot of development in Asp.Net which has the concept of master pages. A master page in Asp.Net allows you to put content that will be the same into the master page file and use place holders to the content that will be different for each page. The runtime then combines the master page with the requested page at runtime. I have been working on a project for a client and the wanted their logo to be at the...

posted @ Saturday, January 08, 2011 12:09 PM | Feedback (18)

Custom Adapter for AutoComplete

In my last post I showed how to create your own Adapter to display items how you want to in a ListView. In this post I will show you how to extend that example to allow you to set your adapter to an AutoComplete box in android. You can’t bind just any Adapter to an AutoComplete in android. In addition to deriving from the BaseAdapter class it also has to implement the Filterable interface. I thought that this would be a piece of cake and that simply extending the interface would cause some magic to happen and I would be...

posted @ Sunday, December 19, 2010 10:38 PM | Feedback (18)

Custom Android ListAdapter

This article  will explain how to make a custom adapter for a ListView used to display a list of items. For those of you not familiar with how to bind a ListView to a list of items here is a brief overview. First you need an ArrayList of a certain type and an ArrayAdapter of the same type. In the constructor of the ArrayAdapter you pass in the context, a layout id and the ArrayList of the same type and set the lists adapter to the ArayAdapter. This simply displays a list calling toString() on every item which means you...

posted @ Sunday, December 19, 2010 10:03 PM | Feedback (20)

Intents in Android

Intents are very important to Android development. They allow you to pass data between different activities in your app and in some cases between apps. Intents were something I had trouble understanding at first but once you use them a couple times they aren’t that bad. You can use intents to start an activity that you expect to return a result or start an intent with no intention of any data being returned. They also allow you to pass data from the calling activity into the activity being started. We’ll start by looking at how to start an intent...

posted @ Tuesday, November 23, 2010 10:46 PM | Feedback (0)

Handling Orientation Change in Android

This summer my brother and I decided to give my parents a break and get our own cell phone plan. I know, how grown up of us. Anyway, we decided on Verizon and the HTC Incredible. Me being a developer I immediately had visions of writing all kinds of sweet apps for my phone. Unfortunately the process of learning how to develop for Android took a little longer than i had hoped. I went to Android’s website and followed the instructions to set up the IDE and a few tutorials and then bought a book to get an overview of...

posted @ Wednesday, October 27, 2010 11:13 PM | Feedback (10)