Photo by Marcin Jozwiak on Unsplash

Prelude

The day has come at last! The day, when you are going to setup SonarQube in your Android project. And again, you are relying on google to lend you a helping hand, but this time it might not come that easy, because there is no copy-paste solution to take from the beloved stackoverflow.

At Disqo we are working on a multimodule multiflavor 100% Kotlin Android app. And the exact same day has came for us too. I’ve wasted a good amount of effort for simply writing a couple of dozen lines of code because:


What will happen if you override a method from a parent class and within this overriden method simply call super ‘s implementation?

The overriden method won’t introduce any issues and the behavior of the class won’t get changed — I bet you think just the way as I though.

You wouldn’t see this post if that was the case. Consider a simple fragment class with following implementation:

class MyFragment : Fragment() {

override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
return inflater.inflate(R.layout.my_fragment, container, false)
}

}

Adding this fragment into activity will work as expected. …


In this series I’m going to talk about APIs of Android, that most of developers, despite being quite experienced with Android SDK, do not know about their existence.

In part 1 we examined <blink> tag. In this episode we are going to dive into a feature of LinearLayout , that I have never seen anybody using.

Imagine a simple horizontal LinearLayout , wherein 5 fancy squares are shown:

Now the requirement is to introduce a divider between these 5 views like this:


In this series I’m going to talk about APIs of Android, that most of developers, despite being quite experienced with Android SDK, do not know about their existence.

Image, that for some weird reason you have got a specification to implement such a feature:

Topeka app

Basically, you have to blink your view hierarchy indeterminately.

How are you going to achieve this?

Sure there are plenty of ways to implement it. But turns out there exists a specific API for this use-case. It’s the <blink> tag that will do the magic for you. …


I am not fond of long and wordy articles, thus I’ll try to be concise.

Problem

Imagine situation, when it is acceptable for the stream to include “error” events, and you want to continue listening to events regardless it is error or no, i.e. you do not want the stream to be interrupted.

As you know, the stream will be interrupted after once onError() has been called on a stream.

PublishSubject<String> publishSubject = PublishSubject.create();

publishSubject.subscribe(System.out::println, System.out::println);

publishSubject.onNext("1");
publishSubject.onError(new IllegalArgumentException("err1"));
publishSubject.onNext("2");

This will result in the following output:

1
java.lang.IllegalArgumentException: err1

Note, “2” is not present in the output, because stream is…


Have you ever wondered what are WindowInsets used for? Why would you ever need them? You have seen people applying android:fitsSystemWindows=”true” to their layouts but you actually see no difference sometimes? What an API is this? We’ll try to demystify them in this article.

WindowInsets are insets (or sizes) of system views (e.g. status bar, navigation bar), that are applied to the window of your application.

The best way to understand something — is to see it in example. Let’s imagine you have requirement to achieve this UI:

Andranik Azizbekian

Android enthusiast, Google Certified Android developer, Stackoverflower

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store