android kotlin – ViewPager example

android kotlin – ViewPager example MainActivity.kt package com.cfsuman.kotlinexamples import android.support.v7.app.AppCompatActivity import android.os.Bundle import kotlinx.android.synthetic.main.activity_main.* class MainActivity : AppCompatActivity() { override[…]

android kotlin – ViewPager with Tabs example

android kotlin – ViewPager with Tabs example MainActivity.kt package com.cfsuman.kotlinexamples import android.support.v7.app.AppCompatActivity import android.os.Bundle import android.support.design.widget.TabLayout import kotlinx.android.synthetic.main.activity_main.* class MainActivity[…]

android kotlin – LayoutInflater example

android kotlin – LayoutInflater example MainActivity.kt package com.cfsuman.kotlinexamples import android.support.v7.app.AppCompatActivity import android.os.Bundle import android.support.v4.content.ContextCompat import android.view.LayoutInflater import android.view.View import android.widget.ImageView[…]

android kotlin – Extension function example

android kotlin – Extension function example MainActivity.kt package com.cfsuman.kotlinexamples import android.content.Context import android.support.v7.app.AppCompatActivity import android.os.Bundle import kotlinx.android.synthetic.main.activity_main.* import android.widget.Toast class[…]

android kotlin – NumberPicker example

android kotlin – NumberPicker example MainActivity.kt package com.cfsuman.kotlinexamples import android.support.v7.app.AppCompatActivity import android.os.Bundle import kotlinx.android.synthetic.main.activity_main.* import android.widget.Toast import java.text.NumberFormat import java.util.*[…]

android kotlin – Navigation drawer example

android kotlin – Navigation drawer example MainActivity.kt package com.cfsuman.kotlinexamples import android.content.Context import android.graphics.Color import android.support.v7.app.AppCompatActivity import android.os.Bundle import android.support.v4.view.GravityCompat import[…]

android kotlin – ListView ViewHolder example

android kotlin – ListView ViewHolder example MainActivity.kt package com.cfsuman.kotlinexamples import android.support.v7.app.AppCompatActivity import android.os.Bundle import kotlinx.android.synthetic.main.activity_main.* class MainActivity : AppCompatActivity() {[…]