ResposNews was intially a project during one of my interview. Later became one of my playground project. App follows MVVM pattern, and have two screens. One containing all the news fetched from RoomDB. Another screen for news details, which is shown on news list item click.
The news search SEARCH_KEYWORD
is hardcoded currently as India
- Swipe refresh layout removed for news list
- News list is showing via Paging 3 component now
- Two new modules added: core & weather_feature
- core: holds room, api
- weather_feature: holds the dynamic feature module for weather details screen.
- Showing current temperature of 'Kolkata' and city name on main screen, UI updated. Used OpenWeather
- ViewModel class name changed, also StateFlow migration is done. No more LiveData.
- UI updated for top headlines.
- Top headlines now connected to UI from data source.
- News UI changed.
- New API added for top headlines added. UI will be updated on next commit.
News data is fetched from News API. You can check the documents from here.
Once you have the api key, add it inside API_KEY=<your_api_key>
in local.properties
file.
- Data Binding - Declaratively bind observable data to UI elements.
- Lifecycles - Create a UI that automatically responds to lifecycle events.
- LiveData - Build data objects that notify views when the underlying database changes.
- Navigation - Handle everything needed for in-app navigation.
- Room - Access your app's SQLite database with in-app objects and compile-time checks.
- ViewModel - Store UI-related data that isn't destroyed on app rotations. Easily schedule asynchronous tasks for optimal execution.
- Coroutine - for async operations
- Glide for image loading
- Hilt: for dependency injection
- Kotlin Coroutines: for managing background threads with simplified code and reducing needs for callbacks
##Upcomings:
- News search option
- To convert into clean code architecture: Issue: #1
- To modularize app, new module with MVP architecture: Issue: #2
- Add testing for entire app: #3
Pull requests are welcome. For major changes/add new feature, please open an issue first to discuss what you would like to change. Please make sure to update tests as appropriate.