Q: How do I enable Android Studio/IDEA closure folding for anomynous class in Java 8? I really like Android Studio's code folding for anonymous class:
new AsyncTask<Void, Void, Void>() {
    @Override
    protected Void doInBackground(Void... params) {
        doSomething();
        return null;
    }
}.execute();

into
(AsyncTask) (params) -> {
    doSomething()
}.execute();

This folding option is under "closures" in the settings. I switched to Java 8 (using retrolambda) since I wanted to use lambda expressions, however now Android Studio doesn't fold anonymous class. Is there a way to re-enable it?
P.S. 
I know I can stay at Java 7 and Android Studio would fold single-method anonymous class into lambda expression, but I want to be able to type lambda expressions directly, while still have multi-method anonymous class folded.

A: First you need to set JDK location to java 8 in under project structure -> SDK Location
Right now Android Studio 2.1 does not support lambda notation for java 8 but there is workaround for that.


*

*You need to enable Jack compiler to support this feature

*Add 
    android {
      jackOptions {
        enabled true
      }
   }
in build.gradle file

*Also it would require Android Sdk Build-tools 24 or later. To download that open standalone SDK manager under sdk manager and download

