"FakeStore Andro" is a mock e-commerce mobile application using Fake-store API designed for educational purposes. This repository contains an Android app created using Kotlin that simulates the functionality of an e-commerce platform. It is intended for developers to practice building and managing simple HTTP requests in an Android environment. The app allows users to view products, add them to their cart, payment simulation (click to watch video) and complete mock orders. It is a valuable resource for learning and honing Android development skills.
You can also check multi-module version this application. Click or change the branch.
Home | Product List | Product List By Category | Product Detail |
---|---|---|---|
Basket Empty | Basket with items | Profile |
---|---|---|
- 100% Kotlin
- Kotlin Coroutines
- Kotlin Flow - StateFlow - SharedFlow
- ViewModel
- Jetpack Navigation for navigatin between screens
- Hilt for Dependency Injection
- Ktor Client for HTTP requests
- Room database for local database
- Glide is an image loading library
- Lottie Animation
- Kotlinx.Serialization
- Parcelize
- Version Catalog
- ViewBinding
This can be used in cases where a custom Snackbar is desired to display a success message for successful events, an error message for situations where an error message is desired, and an information message for scenarios where information needs to be conveyed. Click to see all code.
Simple usage:
// types -> SnackbomType.SUCCESS, SnackbomType.ERROR, SnackbomType.INFO
Snackbom.make(
view = requireView(),
text = "Error: ${state.errorMessage}",
type = SnackbomType.ERROR
)
This custom view can be used to increase or decrease the product count in the basket. Click to see all code.
Simple usage:
in XML:
<com.example.fakestoreandro.ui.customview.ProductCountView
android:id="@+id/product_count_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
With Kotlin code:
productCountView.setItemCount(quantity = item.productQuantity)
productCountView.onAddButtonClickListener {
callback.onAddClickListener(item)
}
productCountView.onRemoveButtonClickListener {
callback.onRemoveClickListener(item)
}