Updated the look and feel of the site to focus more on the content. Also planning to post more of it.
Getting Xcode static library dependencies to work is way harder than it should be! This weekend I setup a new Xcode OS X workspace with 2 child projects. One project was the app and the other a static library used by the app. Setting the static library as a dependency of the app project took ages. Part of the reason was my lack of knowledge but Xcode should really give a bit more help. Continue reading
AndroVM is a novel alternative to the Android emulator with Android running in a virtual machine (VM) using VirtualBox. It works quite well and for some requirements can be significantly faster than the Android emulator. Continue reading
I recently created a custom UITableViewCell with a UIButton as a subview. Pretty standard except that the highlight state of the button was only activated if you held your finger on the button for more than some fraction of a second. The solution is quite straight forward but is subtle enough to justify a quick blog post. Continue reading
A state list drawable is a really useful Android resource for displaying different drawables for a view depending on the state of that view. e.g. we can define a state list drawable for the background of a button that defines a colour for both pressed and unpressed states. The button takes care of switching between the two drawables depending on the state.
You can make state list drawables even more useful by defining custom states. Continue reading
Today I released my first personal Android app into the Google Play Store. It is a stopwatch app that supports multiple stopwatches and is designed to work across phones and tablets. It is also built from the ground up to fit in with the new design paradigms used in the latest versions of Android such as the action bar. I also just wanted a better looking stopwatch app.
There are a few common operations I infrequently perform related to the Android screen:
- Converting a pixels value to the corresponding density independent pixels (DIP) value and vice versa
- Getting the screen dimensions
- Checking what orientation the device is in
- Getting the screen size (small, normal, large, extra-large)
They’re not difficult but it is annoying having to remember exactly how they’re done so I created a utility class to make it a bit easier. Continue reading
The activity lifecycle is central to Android development. Although it is quite well defined, it does take a bit of getting used to. One aspect new developers perhaps struggle with is that rotating the device will by default destroy and recreate the activity.
A well behaved activity will restore its state after a rotation so the user can continue using the application with no lose of state. e.g. EditText widgets should restore the text they contained when the device was rotated and a long running operation should resume without restarting. Continue reading
My colleague, Nick Street, and I gave an ‘Android vs iOS Development’ presentation for Edinburgh Student Techmeetup on behalf of Kotikan. We only had about 25 minutes so didn’t go into too much depth. Was good fun and worth a watch just to find out who wins.
Just finished reading ‘Application Security for the Android Platform: Processes, Permissions, and Other Safeguards’ by Jeff Six. Continue reading