private void setDisplayItems() {
        ArrayList<ToDoItem> temp = new ArrayList();
        ArrayList<ToDoItem> allItems = this.database.getAllItems();
        ToDoItem item;

        if (this.selectedCategory == null || this.selectedCategory.equals("All")) {
            this.displayList.setList(allItems);
        } else {
            Iterator iterator = allItems.iterator();

            while (iterator.hasNext()) {
                item = (ToDoItem) iterator.next();
                if (item.getCategory().equals(this.selectedCategory)) {
                    temp.add(item);
                }
            }
            this.displayList.setList(temp);;
        }

    }