How to create content sliding using ViewPager in Kotlin

Make a content slider, modification from ViewPager with Kotlin programming language. Step 1. Add view pager into your layout activity_main.xml <?xml version=”1.0″ encoding=”utf-8″?> <RelativeLayout xmlns:android=”http://schemas.android.com/apk/res/android” xmlns:app=”http://schemas.android.com/apk/res-auto” xmlns:tools=”http://schemas.android.com/tools” android:layout_width=”match_parent” android:layout_height=”match_parent”> <android.support.v4.view.ViewPager android:id=”@+id/viewPager” android:layout_width=”match_parent” android:layout_height=”match_parent” /> </RelativeLayout> Step 2. Create your fragment Read more…