Category: Kotlin

  • Update Android Recyclerview Using Diffutil

    Update Android Recyclerview Using Diffutil

    If you are an Android Developer, I am sure you’ve used RecyclerView in your android application. In this tutorial, I am going to explain how to update the RecyclerView with DiffUtils. What exactly is RecyclerView? RecyclerView is a more adaptable and efficient version of ListView. It is a container for displaying a larger data set […]

  • MVVM Unit testing on Android

    MVVM Unit testing on Android

    In this tutorial, I am explaining about writing test cases for MVVM on android. Unit testing is testing every unit of your code. Unit testing is a must to build robust android applications. It is an important element while building quality applications. Unit tests are the smallest (individually) and with the least execution time. Benefits […]

  • How to pick multiple files from Android

    How to pick multiple files from Android

    In this tutorial, I am explaining how to pick multiple files in android using the default file chooser. By using this example, you can select images and files. In my previous post, I explained how to capture images using a content provider. Step to pick multiple files in android Setup File Picking Intent Once we […]

  • Kotlin Coroutines – Exception Handling and Cancellation

    Kotlin Coroutines – Exception Handling and Cancellation

    It’s very important to handle the exception that occurs during the networking operation or any IO operations in kotlin coroutines. So, in this tutorial, we are going to see how to handle the exceptions and how to cancel the particular job running on the kotlin coroutines. Before getting into this tutorial, If you are not […]

  • Kotlin Coroutines for Android Development

    Kotlin Coroutines for Android Development

    If you want to get started with Kotlin Coroutines for Android Development and want to master it, then this article is for you. In this tutorial, we are going to master the Kotlin Coroutines in Android by covering the following topics: Before getting started, check out my other post on kotlin. Beginning Android Development with […]

  • Kotlin High Order Functions and Lambdas Explained

    Kotlin High Order Functions and Lambdas Explained

    A higher-order function is a function that takes functions as parameters or returns a function. Instead of Integer, String, or Array as a parameter to a function, we will pass an anonymous function or lambdas. Frequently, lambdas are passed as parameters in Kotlin functions for convenience. before getting started into scope functions, I have explained […]

  • Kotlin Scope Functions Explained [Example]

    Kotlin Scope Functions Explained [Example]

    By definition, Scoped functions are functions that execute a block of code within the context of an object. Kotlin “scope functions” are functions that allow for changing the scope, or the range, of a variable. There are five such functions included in the Kotlin standard library: apply, run, with, let, and also. before getting started […]

  • MVVM with Kotlin Coroutines and Retrofit [Example]

    MVVM with Kotlin Coroutines and Retrofit [Example]

    Coroutines are a neat new feature of the Kotlin language that allows us to write asynchronous code in a more idiomatic way. — This also means you can write asynchronous code the same way you would normally write synchronous code in your project. Already, I have explained MVVM in detail in another post. Please check that […]

  • How to display popupwindow in android with example

    How to display popupwindow in android with example

    Popupwindow is a floating view that is displayed on top of an activity. Android provides a PopupWindow class for creating a popup window with a custom design. It is present from the first versions of the API but is not as popular as other dialog boxes due to the need for additional configuration, which is […]

  • Beginning Android Development with Kotlin

    Beginning Android Development with Kotlin

    Contents What is Kotlin? Why kotlin in Android? Kotlin internals Java vs Kotlin Features available in Kotlin What is Kotlin? Kotlin is a general purpose, open source, statically typed programming language for the JVM, Browser, Native, and Android that combines object-oriented and functional programming features. In July 2011, JetBrains unveiled Project Kotlin, a new language […]