A simple android app that draws shapes on a canvas showcasing MVVM + Clean Architecture using Kotlin, Coroutines, Flow, Dagger, Room, LiveData, View Model etc. The app is modularised by feature.
Editor screen
- There are 3 buttons (square, circle, and triangle). Each time you tap on a button: an object of that shape will be created, and displayed in a random position on screen.
- Tapping on a shape will cause it to become another shape: tapping a square will make it a circle, tapping a circle will make it a triangle, tapping a triangle will make it a square.
- Long pressing on a shape will remove the shape.
- You can undo any action. Each time you press undo it will cancel the last action performed.
Stats screen
- Shows a list with the name and count of each shape.
- Tapping on a list item will delete all shapes of that kind.
- Kotlin + Coroutines + Flow
- Android ViewModel
- Livedata
- Room for Disk Persistance
- Dagger Hilt for Dependency Injection
- Lottie for easy animations
- Timber for logging
- JUnit 5, Mockito-Kotlin and AssertJ for testing
Copyright 2020 Rahul Sainani
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.