I’m often asked by students from my Android courses as to how I’m able to use Lambda expressions like the following in my Android programs.
The short answer is: I’m not able to use them. 🙂 What I typed was the following.
The Lambda expressions appear in the editor due to a feature of Android Studio called “Code Folding”.
Android Studio does this sort’a thing in a number of scenarios. You can tell the Lambda expression is a result of code-folding by the highlight that appears over the folded portion of code.
You can also easily identify that the Lambda expression is a result of code folding because the editor will display a plus-sign to the left of the statement. You can view the full, original statement by clicking on the plus sign.
Lamba expression substitution is controlled by the following value in the Android Studio Settings dialog.
As this is my first post of 2014, let me take this opportunity to wish everyone … Happy New Year!!
Good explanation!
Thanks, added this reference to http://stackoverflow.com/a/34647619/192373 and http://stackoverflow.com/tags/lambda/info!