Join Slack
Powered by
Do we need {} in if? When it is only one operator,...
# announcements
h
hamid.s
10/03/2018, 7:02 AM
Do we need {} in if? When it is only one operator, should I add {} after if? Here is a sample: if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { window.statusBarColor = Util.getColor(R.color.accent_color) }
a
arekolek
10/03/2018, 7:55 AM
With regards to braces for `if`s I follow this rule
https://android.github.io/kotlin-guides/style.html#braces
2
Views
Open in Slack
Previous
Next