Large lists


One of the features that distinguishes the Sales Manager from its competitors is its ability to handle large amounts of data. It can easily cope with 50,000 customers or products, with almost no loss of performance. To achieve this, the mobile app is heavily optimised, and provides a rich set of features to search such large datasets.

The lists involved are:

  1. The customer list.
  2. The product list.
  3. The list of lines that can be added to an order.

The main difference between the customer and product lists is that the latter can be divided into categories. The lines behave in a similar way, but have additional properties. This chapter will focus primarily on the product list, but the others behave in a similar manner.
The name of the category is used as the title of the screen, and tapping on it displays a list of categories to choose from. This is a standard Android paradigm.

Sort Order

The list can be sorted either by id or by name. When a list is opened, it is always sorted by name, but this can be changed by tapping on the Sort button in the action bar. Changing the sort order also changes the field that gets searched. If the list is ordered by name, that is the field that gets searched, and vice versa.


To search a list:

  1. Tap the Search icon (magnifying glass) in the action bar. The action bar is filled with an input field, and the input panel (soft keyboard) pops up.
  2. Enter the target text to search for, and tap the back button, to dismiss the input panel. The list will now be restricted to the items whose names (or ids) contain the target text. If a category has been selected, only the items in that category will be displayed. An example is shown in the screenshot on the right.
  3. Tap the back button, to end the search and return the list to its normal state.
    Note that the search is case insensitive – upper and lower case characters are treated in exactly the same way. Note also that only the key field is searched. It is not possible to search for text in any other field. This is done by design, in order to speed up the search process.

Author: Philip Sheard

Philip Sheard has been working in IT for over 40 years, and on this project for the last 20. His current skills include Java, Android, Objective-C, iOS, PHP, MySQL, ASP.Net, SQL Server, HTML, CSS, Apache and WordPress.