Showing posts with label Gestures. Show all posts
Showing posts with label Gestures. Show all posts
Saturday, 28 April 2012

Touch != Click

I started programming for Android a few months ago, starting a few apps while playing around with the API, re-familiarising myself with Java and getting a feel for mobile development. Having spent the majority of my programming time during the last couple of years using WinForms, ASP.NET and other Microsoft technologies, I've really enjoyed breaking out and trying something new.

When moving from using a mouse and keyboard for all input to using your finger and a soft-keyboard for the first time, there are a few things that you need to learn until you can take full advantage of the OS.

No more hover

There is no hover for touchscreens, unless of course these become the norm. You can simulate hover in a mobile browser by long pressing but of course it isn't the same.

Less control

Unfortunately, your fat fingers are not as accurate as that small cursor. Your buttons will generally have to be a bit larger when developing for touch. The Android design guidelines recommend making your buttons at least 48dp (density-independent pixel) which translates to approximately 9mm, in order to offset any inaccuracy. I find that I very rarely miss touching a button if it is 48dp or larger.

You must also be mindful of the touch areas of your widgets. This is where memorising the difference between padding and margin is useful, padding with make the widget larger whereas margin will just put space around the widget.