This Shopping List App allows users to add, edit, and view items in their shopping list. The app provides a simple interface to manage shopping items, including the item's name, quantity, and any notes. The app is built using Android Studio and is developed in Java. The data is stored using ContentProvider and SQLite database.
- Add Item: Allows users to add new items to the shopping list.
- Edit Item: Allows users to modify existing items in the shopping list.
- View Items: Displays a list of all the items with their name, quantity, and notes.
- Delete Item: Allows users to delete an item from the shopping list (not included in this code, but you can extend it).
| Home Page | Add Item | Added List |
|---|---|---|
![]() |
![]() |
![]() |
| Edit Item | After Editing List | |
![]() |
![]() |
- Android Studio (latest version recommended)
- Java (JDK 8 or higher)
- Android Emulator or an Android device for testing
-
Clone the Repository: Clone this repository to your local machine using the following command:
git clone https://github.com/vinayakvthayil/Shopping_List_App.git
-
Open the Project in Android Studio:
- Open Android Studio.
- Select Open an existing project.
- Browse to the folder where you cloned the project and select it.
-
Build and Run the Project:
- Click on the Build button .
- Once the build is complete, you can run the app on the Android emulator or on a physical device.
- Click the Run button to launch the app.
- Main Activity: Displays a list of items and includes buttons to add and edit items.
- Add/Edit Item Activity: This screen allows the user to input details of the item (name, quantity, and notes). If an item is being edited, the fields are populated with the existing item details.
- Database: Data is stored in an SQLite database accessed through a
ContentProvider.
-
Add Item:
- On the main screen, there is an "Add Item" button. Clicking it takes the user to the
AddEditItemActivitywhere they can enter the item details. - If the item is new, the app adds it to the database.
- On the main screen, there is an "Add Item" button. Clicking it takes the user to the
-
Edit Item:
- When the user clicks on an existing item in the list, they are taken to the
AddEditItemActivity, where they can edit the details of the item. - After editing, the item is updated in the database.
- When the user clicks on an existing item in the list, they are taken to the
-
Save Data:
- When adding or editing an item, the data is saved in the database using
ContentValues.
- When adding or editing an item, the data is saved in the database using
- MainActivity.java: Displays the list of items.
- AddEditItemActivity.java: Handles adding or editing items.
- ShoppingListProvider.java: Manages database access via content provider.
- ShoppingListDbHelper.java: Handles SQLite database creation and queries.
- activity_add_edit_item.xml: XML layout for adding or editing items.
- activity_main.xml: XML layout for displaying the shopping list.
The app uses the following dependencies:
- SQLite for database management.
- ContentProvider for data access.
- Android Support Libraries for backward compatibility.




