I just launched my first (official) app in the Android market – FuelTrack! Basically, it’s an app that tracks your fuel purchases and uses that data to give you lots of information about your fuel consumption, spending, and efficiency! There are plenty of details and more information on the apps page, so check it out!
In the last part of my Custom UI Tutorial, commenter Knut asked:
Is there an easy way to declare the listener in XML (similar to the android:onClick=”onMyButtonClick” in the stock controls)?
This is a great question, and in answering his question, I’ll go ahead and show you how to create other custom attributes you can put in the XML for your custom widgets. The goal will be something like this in your layouts:
<!-- ...more stuff here... -->
We have a custom
MyCustomWidget, and along with the standard
android: attributes, we have a few of our own:
onAction="doSomething". Presumably, these would map to attributes we already have for our custom widget which we could set in code, but we want a shortcut to set them from XML.
I recently was doing some investigation into doing image blending in android, and came across the quite powerful built-in capabilities of
Paint. I was wondering if it was possible to combine several grayscale images into a color image, using the grayscale images as the color channels. If you are familiar with Photoshop or other graphics-editing programs, you are probably familiar with the concept of color channels, and how they are combined to create a color image. For this example, we will re-create the following image from its separated color channels:
The original image. Original by Steve Berger Photography via flikr
[This is the third part of the tutortial so far. If you haven’t already, check out Part 1 and Part 2 to get up to speed on where we are. You can also grab the source code we ended up with at the end of Part 2 to follow along.]
[This is the second part in a three-part tutorial for creating an odometer widget in android. If you haven’t already, check out Part 1 to get up to speed on where we are. You can also grab the source code we ended up with at the end of Part 1 to follow along.]
This series of tutorials will provide an introduction to creating custom user interface elements in Android. By the end, you will have a complete custom widget that will allow input of numbers as if on an odometer. The user will slide the digits up and down, and change the digits.
This first part of the tutorial will get our test project created, and start building out the basic element of our odometer – a single-digit spinner.
This past Saturday I went diving down in Boynton Beach with the great guys at American Divers. I just got a new camera and couldn’t wait to try it out underwater! We did a three-tank dive at a few reefs, and actually ended up doing somewhat of a reverse dive profile with a really short dive first, with a longer second and third dive (depths for all were around 45-50 ft). But it worked out well, since the best reef by far was the last – with a lot of cool wildlife! Saw 3-4 turtles, a couple of rays, and a good number of bugs (lobster). Even saw my first eel! All in all it was a reminder of why I love diving so much – and a reminder that I really should get my nitrox cert…
I have put up a bunch of photos from my trip last summer to Europe. Destinations include Germany, Austria, Italy, and Switzerland. Few images have meaningful titles or details yet, but check them out anyways!
This is the label I did up for the commemorative beer made specially for the 16th Commander SAAZ Interplanetary Homebrew Blastoff. Continue reading
I absolutely Love TED. I think it might just be one of the greatest things on the web, and should be required viewing in every school. In fact, I could see an entire class devoted to watching and discussing TED talks. The variety of topics and level of prestige the presenters have is amazing, and just being exposed to the amazing work in a domain you are unfamiliar with is extremely beneficial, regardless of what you do.