Skip to content

Short news app with with search functionality and paging

Notifications You must be signed in to change notification settings

REXRITZ/SnapNews

Repository files navigation

SnapNews

A short news android app that shows trending news with different category options and search functionality.

App

UI

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

Libraries used

  • Android Jetpack
    RecyclerView, Navigation-UI, Material Design, Lifecycle components
  • Glide (image rendering)
  • Network
    Retrofit, Gson(serialize / deserialize)

App screenshots

Api Info

The news data api used here is newsdata.io

Get latest news by category and country

  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

Search news

  GET api/1/news
Parameter Type Description
apikey string Required. Your API key
q string query to search for
page integer page number

Add API Key

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"