Skip to content
This repository has been archived by the owner on Dec 7, 2018. It is now read-only.

App searchscreen

Jonathan Carter edited this page May 29, 2013 · 3 revisions

![](images/app structure - search results.jpg)

The app search screen is the display of all the results from the current search. the main view is a fixed size with many empty views each of which is created on application startup. When new content is ready for display the application calls application wide events to clear the current content and then populate each of the views with new content. Each view also has listeners for srolling and detects whether it is on or off page and dynamically unloads its content so as to provide the maximum amount of working memory specificslly for ipad-1 issues where memory is an issue.

The main display area is actually a table with a table row containing a series of views which lay them selves out horizontally. these are in pairs of thin/ thick or thich/thin which alternate from row to row.

Each item is created in itemViewShell and has a number of listeners attached. each one also is numbered with a sequential ID and created some application wide listeners based on this id. All of this is illustrated in the following diagram.

![](images/app structure - search results - layout.jpg)

When the results are returned there is also enough data for the filter to be created. this is called with the function refreshplaces2() and the display is toggled with a function mainviewR_close().

The layout of the filter is ver detailed and is visually documented as follows :

![](images/app structure - search results - filter.jpg)

Data from the json feed is mapped into the fields in the search results display as described below. In order to save memory the same display is also used for your favourites. When you favourite an item it is appended to a local json variable which is in turn saved as string in local storage When you dislay your favourites it calls the funrtion redisplayPersonal() which uses the same logic to fill the empty display items with your favourites.

Mapping of data from the json feed to the search results

![](images/screenshots and data explanation - the results display.jpg)

Mapping of the data from the json feed to the filter view

![](images/screenshots and data explanation - the side filter.jpg)