Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tonyvu2014/android-shoppingcart
An implementation of android shopping cart library project for Android
https://github.com/tonyvu2014/android-shoppingcart
android android-shoppingcart ecommerce shopping-cart
Last synced: about 4 hours ago
JSON representation
An implementation of android shopping cart library project for Android
- Host: GitHub
- URL: https://github.com/tonyvu2014/android-shoppingcart
- Owner: tonyvu2014
- License: mit
- Created: 2015-04-05T14:49:52.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-04-03T10:42:13.000Z (over 1 year ago)
- Last Synced: 2024-11-03T21:12:06.744Z (13 days ago)
- Topics: android, android-shoppingcart, ecommerce, shopping-cart
- Language: Java
- Homepage:
- Size: 888 KB
- Stars: 87
- Watchers: 18
- Forks: 70
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# android-shoppingcart
An implementation of android shopping cart library project for Android.
To use this library, follow these steps:
Download and include `library` in your dependencies
dependencies {
// ...
compile project(path: ':library')
}For any product that you want to add in your shopping cart, create a class that extends the
`Saleable` interface and implements these 2 methods:getName() // must return the product name
getPrice() // must return the product priceAlso override `equals()` and `hashCode()` methods.
Now from anywhere in your application, you can retrieve the shopping cart with
Cart cart = CartHelper.getCart();
After retrieving the shopping cart, the library provides various methods to manipulate the shopping
cart like adding, removing, updating products or clear the entire shopping cart.For an example on how to use this library, please see the `demo` (https://github.com/tonyvu2014/android-shoppingcart/tree/master/demo) app module.