Articles

Various IT/development/android interesting articles

Kotlin collections and mutability
Articles, Tutorials

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 […]

, , , ,
Articles, Solutions, Tools

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

, ,
Articles, Solutions

Load instrumentation test local files

Sometimes you might need to add setup files (json/xml/.properties/etc.) to your instrumentation tests (androidTest) and load them in your tests. You usually do that when loading for example some mocked data set or some fixture. In testing, fixtures often take the form of JSON or yaml files that mimic the responses from real API calls.

, , ,
Articles, Solutions

Print Android instrumentation tests logs in the terminal/console

While debugging some Android instrumentation tests that were ran using adb shell am instrument, I needed to print some logs into the terminal/console to inspect the flow and resolve some issues. Ever been coding away, trying to track down what’s happening under the hood, thinking Log.i/e/d or System.out would be your trusty sidekicks for logging

, , , ,
Articles, Did You Know?

Kotlin Common Questions

1. Where should we keep constants in Kotlin? if you need constants to be accessed globally use const as top-level properties (not inside a class). In order to do this create a Kotlin file named Constants.kt. The file would look like this: This way you will be able to access the constants from anywhere within the

Articles, IoT

Smart home (IoT) – the beginnings

Intro Since I am a fan of DYI and love gadgets(and IoT), I started to play with a Raspberry Pi and ESP8266 for a while. I had some failing ideas like automating my curtains, after long plans and setup, I abandoned the idea because I couldn’t see a way to make it look nice with

, , , , ,
Articles

Android Activity launchMode

In Android you can specify activity launchMode. You can do this either from AndroidManifest.xml file, either using intents with flags. Some of the flags produce the same effects like those from AndroidManifest.xml, but there are some flags that can be declared only with intents and also there are flags that can be declared only inside

, , , , , , ,
Articles, Solutions

Android – HTML in textView

Display HTML format First we will present below what are the supported tags for a textView and what are not supported. You can skip this section if you are already familiar with these or you want to jump directly into action :) Supported tags Unsupported tags <a href=”…”> <b> <big> <blockquote> <br> <cite> <del> <dfn>

, , , , , , , , , ,
Articles

Kotlin – How to pass a function as parameter

Recently, I’ve noticed that there are a few different ways to pass a function as parameter in Kotlin. In this post I will use 2 functions: sum and divide. We have to declare the sum function, in such way that it can receive the divide function as argument. The most common and often more convenient

, , , , , ,
Exit mobile version