Posts

Showing posts with the label slide

AppIntro (OnBoard) Screen - Kotlin

Image
Introduction: App Intro/Onboard screen is mainly to display the key features of our app to users while launching it, in a sweet way. Let's do that simply with TabLayout, ViewPager and its PageTransformer.  Design: slide_page.xml  Desgin this layout with ViewPager and TabLayout to begin with. <?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" android: id = "@+id/introLayout" 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" android:layout_above= "@+id/tabLayout" /> <android.support....

TabLayout in Android with Kotlin

Image
1. Create New Project:            Lets create New Project with Kotlin support as follows: 2. Adding design library:           Add design library in app's build.gradle file. build.gradle         implementation 'com.android.support:design:26.1.0' 3. Drawing layouts:  Create a layout with TabLayout and ViewPager slide_page.xml <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout      xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:app="http://schemas.android.com/apk/res-auto"     android:layout_width="match_parent"     android:layout_height="match_parent">     <LinearLayout         android:layout_width="0dp"         android:layout_height="0dp"         android:orientation="vertical...