And lastly, there is a keyboard shortcut to convert java into compilable kotlin code. ctrl + alt + shift + k
n
neuber
07/15/2018, 3:11 AM
Java before
public BoardDefaults(Context applicationContext) {
this.context = applicationContext;
res = this.context.getResources();
}
kotlin after
class BoardDefaults(private val context: Context) {
private val res = context.resources
}
neuber
07/15/2018, 3:12 AM
I have issue here:
neuber
07/15/2018, 3:12 AM
val bd = BoardDefaults(this.applicationContext)
var i2cIndex = -1
neuber
07/15/2018, 3:14 AM
expression 'boarddefaults' of thype 'boarddefaults cannot be invoked as a function. this function invked() is not found