Utilizes urban dictionary API to lookup word definitions
This project follows Clean Architecture and MVVM
Using the following APIs I found to use instead of https://rapidapi.com/community/api/urban-dictionary. There was more I wanted to do like pagination but didn't have time.
- https://api.urbandictionary.com/v0/autocomplete-extra?term={term}
- https://api.urbandictionary.com/v0/define?term={term}
- https://api.urbandictionary.com/v0/random
- Results Screen - Show results of search term. If on initial screen, show list of random results.
- Search Screen - Allow users to input a search term. Hits autocomplete API to get a list of potential search terms.
Only calls to the https://api.urbandictionary.com/v0/define?term={term} endpoint are cached. This allows you to lookup previous search terms even when offline. There is no expiry time in this implementation.
- View Binding - generates binding classes which hold reference to XML id'd elements
- List Adapter - Convenience wrapper that provides default behavior for item access and counting
- Recycler View - Displays lists of elements
- Swipe Refresh Layout - Library that supports swipe to refresh on lists
- Concat Adapter - Easily concat multiple adapters for recycler views
- Diff Util - Utility class that effeciently calculates differences between two lists
- Spannable String Builder - Convenience builder for spannable
- Search View - Adds search interface in app bar
- Hilt - Dependency Injection library based on dagger
- Jetpack Navigation - Navigation library
- SafeArgs - Type safe navigation
- Room - SQLite abstraction library
- Retrofit - Rest Client
- okHttp - HTTP Client
- moshi converter - JSON Serialization library used for retrofit
- arrow-kt - Functional companion to kotlin std lib. But only using it for Either :D
- Leak Canary - Memory leak detection library
- Timber - Logging utility class built on top of Android Log
- ktlint - kotlin linter
- ktlint-gradle - gradle plugin that provides ktlint tasks
- detekt - code analysis tool
Run with ./gradlew check
Auto ktlint with ./gradlew ktlintFormat
- Junit - unit testing library
- kotlinx-coroutines-test - used for
runBlockingTest
- MockK - Kotlin mocking library
- MockWebServer - webserver for unit testing retrofit
- Espresso - integration testing library
- Espresso with Hilt - espresso with hilt support
- Firebase Robo Test - Testing tool that automatically simulates user activity