Android UI Design Patterns & Best Practices – part 1

How to design Android application which get you more money? Do you know where money comes from? It comes from really good users feelings and experience. You should know that if your app does something that is useful but ugly, slow and confusing, people will not use it. If your app crashes, it won’t be featured. If it doesn’t have good usability and quality, you have really failed as a developer.

Everyone who gets your application, has some expectations. You should know it or try to imagine it when you design your app. The best method to measure quality is users’ expectations versus reality. Try to get what they expect and need, I know it is really hard, so you should be agile during development process. You should implement minimum functionality and show your application to your friends and find out what they feel. If they say that it is good or even cool then you can publish it as a beta version and ask what the real users expect. However, please note that you should not release functionality that are under development and not finished, because you can easily loose potential customers – people hate such things.
It is easy to get information about user feelings like is it good or bad, but not easy to get information about bugs or errors. Many of these problems you can find using not only continuous improvement, but also continuous integration process. In Android SDK there are many applications which can help you to do that e.g. Monkey. It simulates a bunch of random user interface actions, like touching screen , swiping it, pressing buttons and other action that user can possibly do. It is very effective for founding stupid bugs that you would never think of, because you never think of some action flows. To run the Monkey you need only one line of code

adb shell monkey -p -v 1000 -s random_value

When you re-run the Monkey with the same seed value (-s), it will generate the same sequence of events, so you can easily repeat the bug.
Another quite good tools is monkeyrunner which lets you write a sequence of commands to execute like open an activity, press a key, touch the screen, It is also possible to take screenshots to check if it is showing the expected behavior.
For more specific and advanced user events you can use really good framework called Robotium (I wrote about it a few blogs ago) which is used to write powerful and robust automatic black-box test cases for Android applications. Bitbar created tool called Testdroid which lets you record your manual testing and repeat it in future as Robotium code. You don’t need to write code for your test, you only need to run your application and record your actions. The most important feature is that you can create the test once and run on many Android devices and emulators. It lets you test the same application on multiple devices and multiple resolutions, which is one of the main challenges for android developers and designers (for example there are 23 different resolutions – see table below).

Low den. (120), ldpiMedium den. (160), mdpiHigh den. (240), hdpiExtra high den. (320), xhdpi
Small screenQVGA (240×320)480×640
Normal screenWQVGA400 (240×400)

WQVGA432 (240×432)

HVGA (320×480)WVGA800 (480×800)

WVGA854 (480×854)


Large screenWVGA800 (480×800)

WVGA854 (480×854)

WVGA800 (480×800)

WVGA854 (480×854)


Extra Large screen1024×600WXGA (1280×800)




Using automation testing and Testdroid you can save lots of time and money which you spend on testing. You can use this time to develop. Contact us if you are interested in developing applications or using our tools for testing