If you, like me, recently started to develop applications for the Android platform (or any other mobile platform) it is likely that you encountered the problem of designing user interfaces.
One of the first application that I developed for the Android platform was some kind of "data entry" application. In some parts that application requires input of large amount of data, and it was necessary to design a screen for entering the required data.
Since I have been mainly developed desktop or web application I developed data entry screens that look like desktop applications.
An example of such screen can be seen here:
I spent lots of time to make the screen look better, but after a while I realized that this screen layout has several disadvantages:
Creating such a layout is quite tedious because you must use relative layout and this leads to that you must take care about relationship between controls.
If you found that there is a need for displaying and entering new data then adding new controls to this layout is not such easy task.
Changing the ID of a control can be very problematic because it can disrupt the entire layout.
If the screen contain too much controls then entire layout may not fit on the screen, so the whole layout must be wrapped inside the ScrollView.
You must take care about focusing correct control in data entry process.
This layout will hardly be usable in landscape screen orientation
There is hard to find correct place for displaying "hint" about data to be entered
I spend some time to try to find a user interface design pattern for the "data entry" applications. I found few sites with helpful design patterns for the Android platform, but I could not find "something" that I need.
Some of these sites you must visit are:
www.androiduipatterns.com
www.androidpatterns.comAfter spending some time thinking about the best way to present and allow the user to enter and change data obvious solution appeared to me. Why not using ListView control in a similar way how it is used to manage application preferences ?
Each list item within the control can be set to present different type of data. When you touch specific list item there will be displayed dialog for entering and changing that data according to the type of data. With this idea in mind I developed a small framework that utilize ListView and ListAdapter in similar way like preferences already work in android applications.
Result can be seen here:
When you tap one of the list items you will get dialog for entering or changing data:
Advantages over previous design are obvious:
Advantages for developers are:
- Simple layout in main xml file
- Each list item layout is in separate file
- Easy to add new or rearrange existing data items
Advantages for the users are:
- Consistent and natural look of the screen
- Easy navigation through the data
- An intuitive way to change the data
- Layout will look good on the landscape screen orientation
If we compare old and new look we will see that there are more advantages in new design:
1. There is more space for displaying caption text in new design.
2. In new design each data is displayed and changed in similar way (tap and change)
3. There is no need for visual data separator like one in old design
4. In new design it is easier to describe data cause you have more space for caption in each list item
I hope you will find this article usefull and please feel free to leave a comment or tell me your experience about developing “data entry” applications for android.