Posts

Showing posts with the label Retrofit

Top 10 Most Useful Android Libraries For Android Developers

Image
Here i am giving you “ Top 10 Awesome Android Libraries ” t hat are the ones who are interesting to try it out. Without further ado, let’s jump right into our list. We’ll kick off with one of the oldest, and I’d argue, one of the most useful Android libraries. 1. Retrofit Retrofit is type-safe HTTP client that allows you to define your REST API as an interface. You can manipulate the API requests’ body, headers, query parameters and much more via annotations, which makes everything clean and simple. Retrofit also allows synchronous and asynchronous API calls execution. interface ApiService { @GET ( "movie/{id}" ) fun getMovieDetails ( @Path ( "id" ) id : String ) : Call < MovieDetails > }   To top it off, Retrofit offers a separate Rx module. If you are using Rx, this module returns your API call as an Observable so you are able to chain it with the rest of your application. These are just a few of the many reasons we at I...

Facebook Shimmer Effect Android Example

Image
Shimmer  effect was created by Facebook to show loading status instead of showing ProgressBar. In this article, I’m going to take you through my journey of replacing the ProgressBar with Shimmer  effect. App Intro To replicate the Facebook Shimmer  animation, I built a simple app where we’re gonna execute movies fetching network request. We’re gonna hit an URL  and download Json data and show in a GridView. While application fetching movies instead of showing ProgressBar, we’re gonna show the Shimmering  effect and in successful or in error case stop the effect. Gradle Stuff Facebook Shimmer  effect requires us to add some more stuff to our application modules  build.gradle  file. We start by adding the following dependencies right after the  android  section: Recommended for you // Facebook shimmer effect dependency implementation 'com.facebook.shimmer:shimmer:0.1.0@aar' // Retrofit dependency implementation 'com.sq...