Book Library is an Android application designed to help users manage their personal or public library by storing records of books, including title, author, and the number of pages. The app utilizes an SQLite database for offline data storage, ensuring users can access and manage their library records without an internet connection. The application also features a customizable theme, allowing users to switch between light, dark, and system default themes.
- Add Books: Users can add new book records, including the title, author, and number of pages.
- Update Books: Existing book records can be updated with new information.
- Delete Books: Users can delete book records from the library.
- View Books: All stored books are displayed in a RecyclerView for easy viewing.
- Theme Selection: Users can choose between light, dark, and system default themes for the app's interface.
- Android Studio
- Android SDK
- A device or emulator running Android API level 23 or higher
-
Clone the repository:
git clone https://github.com/yourusername/book-library.git cd book-library
-
Open the project in Android Studio:
- Open Android Studio.
- Select
Open an existing Android Studio project
. - Navigate to the cloned repository and select the
book-library
folder.
-
Build the project:
- Click on
Build
in the top menu and selectMake Project
or pressCtrl+F9
.
- Click on
-
Run the application:
- Connect an Android device via USB or start an emulator.
- Click on
Run
in the top menu and selectRun 'app'
or pressShift+F10
.
-
Add a Book:
- Click on the
+
button to open the add book screen. - Enter the book title, author, and number of pages.
- Click
ADD
to add the book to the library.
- Click on the
-
Update a Book:
- In the main screen, click on the book you want to update.
- Modify the book details in the update screen.
- Click
Update
to update the book information.
-
Delete a Book:
- In the main screen, click on the book you want to delete.
- Click
Delete
to delete the book information.
-
Delete All books:
- Tap on the "Delete" icon at top right of the menu to remove all book records.
- Confirm the deletion in the popup dialog.
-
Select Theme:
- Click on the
Theme
on menu in the top. - Choose your preferred theme (Light, Dark, System Default).
- Click on the
The app uses an SQLite database with the following schema:
- Table Name: books
- Columns:
id
(INTEGER, PRIMARY KEY, AUTOINCREMENT)title
(TEXT)author
(TEXT)pages
(INTEGER)
Contributions are welcome! If you have any improvements or new features to add, please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature/YourFeature
). - Commit your changes (
git commit -m 'Add some feature'
). - Push to the branch (
git push origin feature/YourFeature
). - Open a pull request.
This project is licensed under the MIT License - see the https://en.wikipedia.org/wiki/MIT_License#:~:text=The%20MIT%20License%20is%20a,therefore%20has%20high%20license%20compatibility. for details.
- Thanks to the open-source community for providing valuable resources and tools.
- Inspired by various book management applications.