Author: farifam


Kotlin – Using Extensions

In Kotlin you can add new function without having to inherit from the class or use any type of design pattern such as Decorator, this ability called “Extension”. For example: fun MutableList<String>.addPercentage(){ for((index, item) in...


Android Kotlin – Using toObject() to get Firestore Data

From our post about how to get Firestore data on Kotlin here, we grab Firestore data by it name: for (document in task.result) { list_member.add(Member(,document.get(“first”).toString(), document.get(“last”).toString(), document.get(“born”).toString())) } Since Firestore allow us to convert...


Loops in Kotlin

Kotlin provide some way to do loops on your code, here they are:   FOR LOOP There’s some kind of FOR loop in Kotlin: Using Range for(x in 1..5){ print(x) } output: 12345 for(x in...