Giter VIP home page Giter VIP logo

avidraghav / mynotes Goto Github PK

View Code? Open in Web Editor NEW
127.0 2.0 26.0 703 KB

πŸ“ A demo todo/notes app which demonstrates the use of MVVM architecture with Test-cases, Navigation Component Library, Room Database, LiveData, Coroutines, Datastore etc.

License: Apache License 2.0

Kotlin 100.00%
android mvvm-architecture kotlin kotlin-coroutines room-persistence-library viewmodel-livedata dependency-injection dagger-hilt mvvm-android datastore-android

mynotes's Introduction

πŸ“ MyNotes

Android-CI Actions Status GitHub license GitHub stars GitHub forks Twitter Follow

Hactoberfest 2022 Android Weekly Contributions Highly Welcome Availble issues to contribute

MyNotes is a Demo app which demonstrates the use of MVVM architecture, Dependency Injection, Navigation Component Library, Room Database, LiveData, Coroutines, Datastore and other Modern Android Development.

πŸŽ₯ Working Demo

πŸ—‘οΈ Dependency Injection

The project uses Hilt for Dependency Injection πŸ’‰

I highly recommend to start with Manual Dependency injection method and then move to Hilt, see branch di-ManualInjection for implementation.

  • To Implement DI with Hilt see di-hilt

πŸ”§ Built With

  • Kotlin - Programming Language Used in the app.
  • Navigation Component Library - For setting up app's navigation.
  • Room Database - For persisting data/tasks in device's local storage.
  • Kotlin Coroutines - To execute code asynchronously.
  • Flow - In the simplest of ways consider this as a pipe through which the data flows in the app, by using flow a developer doesn't need to refresh variables which contain data.
  • LiveData - Used to observe the data on the UI layer
  • ViewModel - To Store UI-related data that isnt destroyed on UI changes.
  • RecylerView - To Display data in a list format.
  • Hilt - For Dependency Injection
  • Datastore - For Storing Data

see feature/Prefernces-Datastore to Implement Preferences Datastore by following Abstraction

βœ… Tests

  • For an example of Room Database Schema Migration see branch room-migration-testing
  • For Implementing Instrumented Test Cases for Room Database see branch testing
  • For Implementing Unit Tests for ViewModel and Repository by using the latest testing apis (as of August 2022) see branch testing-coroutines- 1.6.1

πŸ—οΈ Architecture Design

Screenshot 2022-01-18 at 1 31 48 PM

πŸ¦Έβ€β™‚οΈ Contribtors

Made with contrib.rocks.

This project is made for educational purposes so don't be shy of asking any questions about any concept from the app or about android developement.

Do open issues and raise PRs to I'll try my best to assist you. If this project helps you then do leave a 🌟 πŸ˜ƒ

πŸ“© Contact

Don't let yourself get caught in the decision paralysis, just start learning and building. πŸ˜‰

DM me at πŸ‘‡

License

 Copyright 2022 Raghav Aggarwal

   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.

mynotes's People

Contributors

avidraghav avatar binayshaw7777 avatar devrahul-2508 avatar newtoncesarroncari avatar rahullraghuwanshi avatar ravi-kumar7 avatar rishujam avatar yazh1202 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

mynotes's Issues

Improve ui

@avidraghav Sir can i improve all fragment recyclerview item layout below is the reference image of improvement like its not exact because screenshot is of another ui but improve in same way.

WhatsApp Image 2022-10-05 at 7 48 59 PM

Add BaseFragment and BaseActivity

To reduce Boiler plate code Base Classes are used which contains generic code and methods which can be applied to every Activity and Fragment either directly or after overriding. These Base Classes are inherited by Fragments and Activities to implement the required behaviour.

Implement Animations for various transitions

Implement animated transitions for various actions such as

  1. When a user clicks on add note/todo button and moves to the next screen where he fills the details of that note/todo.
  2. Initially when the user opens the app the already saved notes/todo should have a descent and simple entry animation.

Deleting Multiple Tasks at once shows overlapping toast messages.

When a user deletes multiple tasks quickly then toast messages are being showed one after the other till every toast message completes it's duration.
This leads to a bad user experience as though tasks are deleted instantly but the toast messages keep on showing for some duration.

Adding frequency in Note

Add frequency/time attribute to note. For example an exercise for 30 min (time) or Eat banana 4 (frequency).

Improve the overall UI of the app

The styling of Shown Tasks is very basic, improve it by changing the delete icon style, font style etc.

Screenshot 2022-03-20 at 4 22 26 PM

The above image is just an example, the complete UI of the app needs to be revamped, a descent color scheme and UI needs to be implemented uniformly through the app by following Material guidelines

Set a custom color by note

I Would like to set a custom color on the note, to make my cluster notes
I select the color on note screen and a piece of that color appears in the list item

if possible, I would like to create this feature

Bug Keyboard over snackbar

bug keyboar stays over the sanckbar when the user, dont select a deadline

Screenrecorder-2022-10-08-12-13-28-718.mp4

Implement Datastore to store 'Sort By Deadline' flag

If the user enables the 'Sort By Deadline' checkbox it's state is not saved in the local storage. Hence when the user reopens the app the tasks are not presented in the sorted order.

Conclusion - Implement Jetpack Datastore Library to store the state of Sort By Deadline checkbox in the local storage.

Improve UI

The styling of Shown Tasks is very basic, improve it by changing the delete icon style, font style etc.
Screenshot 2022-03-20 at 4 22 26 PM

Add Up Button in the Action Bar for AllTasksFragment

The App has single activity (MainActivity) and this activity's action bar is used for both the fragments which are inflated inside it.
The task is to implement action bar for both fragments and setup a conditional navigation in which an Up Button
Screenshot 2022-04-25 at 1 01 25 PM
is showed in the action bar of AddTaskFragment but not in the action bar of AllTasksFragment

The usage of a Up Button is that it should navigate a user back to previous destination of the app he visited but not exit the app
https://developer.android.com/guide/navigation/navigation-principles

Replace Toast with Snackbar

Currently the Toast messages are implemented in such a way that if multiple toast requests are made the previous toast gets cancelled and the latest toast is showed. (One toast message is shown at a time).

Check File ToastUtils
This implementation is causing a Memory leak, this implementation needs to be updated or replaced with an implementation of SnackBar.

Clean up code with Dispatchers

When running a sonar lint in code, issues arise about the unnecessary Dispatchers when call suspend functions

Captura de Tela 2022-10-06 aΜ€s 19 18 35
Captura de Tela 2022-10-06 aΜ€s 19 35 51

can i improve these parts ?

Automated testing

Hey @avidraghav , how did you set up automated testing so that whenever someone commits to your code, it runs those tests and generates the report? Could you explain it step by step, or if you have any resources on this? Is there anything else I should know before setting up a CI/CD pipeline?

Dispatcher Dependency

Why is it necessary to provide a dependency for CoroutineDispatcher instances using a DispatchersProvider class, rather than directly inserting the instances into the components that use them?

  • You have done this for the centralize management of dispatchers ?
  • Can you explain your thought process behind this ?

AppModule

DispatcherProvider

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.