-
Notifications
You must be signed in to change notification settings - Fork 0
Crc cards
addItem(): uses Item
deleteItem(): uses Item
getName()
load(): loads from sqllite into the list, uses the ShoppingListDataAdapter
calculateTotalSpent(): uses Item
calculateTotalCostOfList(): uses Item
name: String
items: list of Items
incrementNumberToBuy()
resetNumberToBuy()
calculateTotalSpent()
calculateTotalCostOfItem()
perhaps convenience functions for reading/writing to ShoppingListDataAdapter?
name, isBought, numberToStock, numberToBuy, cost, sizeOfUnit, label, pantryOrder, shoppingOrder
databaseID
display() uses a custom array adapter and ShoppingList[] Includes appropriate title message
launch a StockActivity or a ShopActivity via an intent, sending the name of the ShoppingList.
addList(name: String): uses ShoppingList
deleteList(name: String): uses ShoppingList and ShoppingListDataAdapter to delete items
List of names of ShoppingLists (persisted in SharedPrefs)
abstract display() uses ShoppingList
editItem() launches a dialog: uses Item, ShoppingListDataAdapter Just nest the dialog?
addItem() launches an autocomplete field: uses Item, ShoppingListDataAdapter
deleteItem(): uses Item, ShoppingListDataAdapter
launchActivity() launches another activity using an intent
abstract unmarkAllItems(): if stock list, resets numToBuy all to 0; if shopping list, marks all as unbought (is this really required for all shopping list types?)
ShoppingList of items
ShoppingListDataAdapter
display(): details about each item in multiple size fonts. Uses an array adapter.
updateNumberToBuy (via increment or reset): uses ShoppingList, ShoppingListDataAdapter
unmarkAllItems(): resets numToBuy all to 0
display()
trackWhichHaveBeenBought using the Items’ bought flags
calculateTotalSpent(): uses ShoppingList
calculateTotalCostOfList(): uses ShoppingList
unmarkAllItems(): if shopping list, marks all as unbought
display()
loadList(): uses ShoppingListDataAdapter
saveList(): uses ShoppingListDataAdapter
rearrange order in the list (via drag and drop)
ShoppingList of items
ShoppingListDataAdapter
color, message (depend on whether stock or sort)
Font sizes
Currency type (position and symbol, eg $ or K)
Store names (a list of strings, persisted as a single string)
Current activity (main, stock, or shop), so can start at right one. Don’t bother restarting at a sort activity.
getShoppingListDataAdapter()
loadList()
saveList()
editItem()
addItem()
removeItem()
removeItemsFromList(listName)
###Attributes SQLiteDatabase
DatabaseHelper
Uses Android’s DBOpenHelper
SQLite structure: Flat table, where each row includes: rowId, listName, item data (item name, numberToBuy, price, etc)