Privacy Policy

Kotlin collections and mutability
Privacy Policy

Kotlin Mutable and Immutable Collections

In this article I would like to emphasise over a few options that we have when working with data structure and more precisely with collections in a mutable and immutable fashion. So let’s start with a few of them and see their mutability state. But first, what makes a list mutable or immutable? Immutable Collections

, , , ,
Privacy Policy

Android Studio / IntelliJ IDEA productivity guide

Android Studio and productivity One interesting feature that Android Studio and IntelliJ IDEA have is the Productivity Guide panel. It helps you see how much of the productivity tools that are available and you are using. You can see here a quick screenshot with the one I have, on one of the computers I am

, ,
Privacy Policy

Xamarin Forms: ActivityIndicator Size

We all will need at some point to show an activity indicator when our app has to perform lenghty data processing operations or when we have to wait for our app to load content. In Xamarin Forms we can use in a xaml file this property called ActivityIndicator. Below is the result of the above

, , ,
Privacy Policy

Xamarin Forms: Circle With Label No Renderer

In your application you might need to create a Circle image with a text inside it or just a simple circle that needs different colors for status for example. In this case we can use a Frame and add CornerRadius property like this: As you can see, there are more properties added like HasShadow or

, , , , ,
Privacy Policy

Kotlin RecyclerView with Click Listener

Create a RecyclerView in Android with Kotlin – A Step-by-Step Guide In today’s tutorial we’ll learn how to create a RecyclerView in Kotlin for Android with items that are clickable. This approach, distinct from the traditional ListView, offers a more dynamic and flexible way to display a scrollable list. Read on to discover how to

Privacy Policy

ListView with ViewHolder in Kotlin

In this post we will create a ListView with ViewHolder adapter but we will write the code in Kotlin. For creating xml files for ListView and list items, follow the steps from this post. Next, you have to create a new Kotlin class for the adapter. Name the new created file MyCustomAdapter MyCustomAdapter.kt import android.content.Context import

Privacy Policy

Kotlin – for, while, if, when

Control flow: for, while, if, when This post is for beginners who want to start learning Kotlin language and already know Java. We will show simple examples of for, while, if, when in both languages, in parallel, for an easier understanding. We will use Log.e in order to print string messages, as from our point of view,

, , , , , , , , , , ,
Privacy Policy

Functions in Kotlin

In this post I will talk about 5 cool things that functions can do in Kotlin, better than methods in Java.   1. Forget about overloaded methods In Java, when you need the same method to have 1 parameter in one case and more parameters in another case, you would have to overload the method.

, , , , , ,
Privacy Policy

Anonymous Functions and Lambdas – Kotlin

Note! This is a post for beginners in Kotlin language. What are lambdas and anonymous functions? In order to define them let’s see what is a function literal. Function literal Function literal is a function that was not declared, but was passed as an expression. val sum = { a: Int, b: Int -> a + b

, ,
Privacy Policy

Kotlin – Hello world

Introduction What is Kotlin? It is a new programming language built by JetBrains, and as you may already know, Google announced at Google I/O 2017, that they will now officially support this language. It is inspired by existing languages such as Java, C#, JavaScript, Scala and Groovy. What are the advantages of using Kotlin? it’s

,
Scroll to Top