Skip to main content

Posts

Showing posts with the label RecyclerView

Retrofit Simple Example || Bind Data in Recycler View with full Source code | Android Studio

What is Retrofit? Retrofit is REST client for Android as well as JAVA by Square Retrofit easily retrieve and  upload JSON by using REST based web service. You can also configure a converter which is used for the data serialization. Generally for JSON we can use GSON or you can also add your own or custom converter to process other protocols or XML. In most case Retrofit uses the OKHTTP library for HTTP Request. For using Retrofit basically we need three classes Model Class Interface RetrofitBuilder class Let's start the code : First of all add following permission to your AndroidManifest.xml file. <uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> <uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/> Add following dependencies to your build.gradle file. compile ...