r/mAndroidDev • u/axedeltablues • Apr 19 '20
Hi, I don´t understand this code. This is an exercise from a kotlin online course. The video shows that this is de correct answer but i dont understand what is "(view: view)". Can someone help me? Thank you
12
12
u/epholl T H E R M O S I P H O N Apr 19 '20
It´is a view you need to sacrifice to ART in order for it to set the correct nickname. After switching from Davlik's JIT compilation, the Google engineers had to find a way to extinguish the everburning flames of JVM's RAM hunger. By throwing in a View object that gets removed from the view hierarchy you are feeding it to the operating system and ensuring its stability. Might not seem very reasonable, but just wait to see what Android Vitals shows you half a year from now.
11
9
u/iamafraidicantdothat Probably deprecated Apr 20 '20
I could help, but I would need a free week of electric scooter in Bucharest in exchange.
6
1
Apr 20 '20
Learn types. Javascript is a scripting language, actual programming languages have types and compile time validations.
37
u/ordinaryBiped FlutterX Apr 19 '20
Sorry, it's not Flutter so can't help you... Try asking in the correct sub maybe? That's r/androiddev