Skip to content

TktkOkym/CurrencyViewer

Repository files navigation

Currency Viewer

Features

  • Display list of Currency Items, containing Currency and its amount
  • Update currency amount whenever user change input(EditText) or change currency(Spinner)
  • Call Currency Api every 30 minutes by using Periodic WorkManager
  • Save data to Room DB once getting currency api response
  • Swipe to Refresh List to call api (replace worker)
  • Display timestamp of last updated (which is being updated once a day)

Architecture & Libraries

  • MVVM - Separate View from Model to have better maintainability and testability. More details in Implementation Details below.
  • Single Activity Concept / Navigation Architecture Components - To reduce memory usage especially when navigating to multiple pages (use replace instead of add when moving to other pages). Easy data sharing between views. Reduce boilerplate codes.
  • ViewModel - To store UI-related data. Data does not affected when screen rotation when using with LiveData
  • LiveData - Lifecycle aware observable data holder, no memory leaks. No crashes due to stopped activities. Always up to date data
  • ConstraintLayout - Allows to position and size widgets in a flexible way. Also can have better performance by having flatter view (with less hierarchy)
  • ListAdapter - Adapter for Recycler View, computing diffs between Lists on a background thread when submitted list is updated. Animation is provided when there's change in the list. Nearly identical to PagedListAdapter, it can be easily converted to it when Paging is needed.
  • DataBinding - 2-way dataBinding and easy access to child view when there's nested layouts
  • Koin - lightweight DI to have less dependency
  • Coroutine - lightweight thread, to do background work for tasks, such as Api Call, accessing RoomDB or heavy calculation
  • Retrofit2 - Type-safe HTTP client for Android.
  • Android KTX - reduce boilerplate Kotlin codes
  • AndroidX - Fully replaces the Support Library by providing feature parity and new libraries. All new Support Library development will occur in the AndroidX library.
  • Espresso - UI Test

TODOs

  • Error Handling - Properly handle network error in Worker
  • Increase test coverage
  • Improve Performance

References

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages