Skip to main content

Posts

Showing posts from March, 2017

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 ...

Simple View Pager using Fragment in Android Studio | Slide Navigation

View Pager In such case you have seen the slide in application while install it first time which will guide you how to use the particular application. Here is the small example which can be useful to you as a start up application. You just have to replace my Fragment Buttons to your image that's it. activity_main.xml < ? xml version = "1.0" encoding = "utf-8" ? > < RelativeLayout xmlns:android = "http://schemas.android.com/apk/res/android" xmlns:tools = "http://schemas.android.com/tools" xmlns:app = "http://schemas.android.com/apk/res-auto" android: id = "@+id/rl_pager" android:layout_width = "match_parent" android:layout_height = "match_parent" android:paddingBottom = "@dimen/activity_vertical_margin" android:paddingLeft = "@dimen/activity_horizontal_margin" android:paddingRigh...