How to change Runnable to lambda expression in Java with IntelliJ shortcut

Let IntelliJ do the lifting here; you can invoke Alt + Enter (or Option + Return on Mac) to allow IntelliJ to replace it with a lambda expression.


Alt + Enter is good way to change each one individual

but there is away to change all lambda expression across app

Run Inspection by Name

Ctrl + Shift+ Alt + I

source site

How we can use it in our Android Studio and lambda expression:

just write replace lambda as Inspection name called anonymous type can be replaced with lambda

List of occurrence will appear change each one manually

Tutorial Video