A short news android app that shows trending news with different category options and search functionality.
The app consists of a single activity with multiple fragments using MVVM architecture-
- Home Fragment
This contains a list of latest news with ability to filter by category using TabLayout and filter by country using Dialog - Search Fragment
This view contains ability to search news using edittext - News Detail Fragment
This view contains news in detail
- Android Jetpack
RecyclerView, Navigation-UI, Material Design, Lifecycle components - Glide (image rendering)
- Network
Retrofit, Gson(serialize / deserialize)
The news data api used here is newsdata.io
GET api/1/news
Parameter | Type | Description |
---|---|---|
apikey |
string |
Required. Your API key |
country |
string |
country code |
category |
string |
news category |
page |
integer |
page number |
GET api/1/news
Parameter | Type | Description |
---|---|---|
apikey |
string |
Required. Your API key |
q |
string |
query to search for |
page |
integer |
page number |
Add the following line in your project's root directory, inside the local.properties
file (create one if unavailable) include the following line:
KEY="your api key"