Log.v(“ThreeTips”, “#17”)

1 — Operator Overloading in Kotlin

val disposables = CompositeDisposable()
val observable1 = your_observable
disposables.add(observable1)
operator fun CompositeDisposable.plusAssign(disposable: Disposable){
add(disposable)
}
disposables += observable1

2 — Using font in Support Library (As of 26.0.0)

Caused by: java.lang.NullPointerException
at android.graphics.FontFamily.nAddFontFromAssetManager
<font
android:font="@font/product_sans_regular"
android:fontStyle="normal"
android:fontWeight="400"

app:font="@font/product_sans_regular"
app:fontStyle="normal"
app:fontWeight="400" />

3 — Gradle 3.0: “api” vs “implementations”

//before gradle 3.0
compile
“android.arch.lifecycle:runtime:1.0.3”
//After gradle 3.0
implementation
“android.arch.lifecycle:runtime:1.0.3”

Basically you can use “api” instead of “compile”.

Software Engineer at Storytel

Love podcasts or audiobooks? Learn on the go with our new app.

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
Mert SIMSEK

Mert SIMSEK

Software Engineer at Storytel

More from Medium

What is Android Jetpack Compose?

Carousel Slider in Android Jetpack Compose with Auto Play …

Tabbed SlidingPaneLayout (Primary/Detail) using the Navigation Component Library ➡️🗔✨

Fused Location Provider in Kotlin