Live Templates in Android Studio: Getting Started |

In this tutorial, you’ll learn how to use and create live templates in Android Studio so you can write code more quickly.

This is a companion discussion topic for the original entry at
1 Like

Thanks for the tutorial. Although I struggle to find situations which I repeat so often to allow optimizations. I wanted to start with testing and I think it will become handy when writing a lot of tests.

The app you offered is neat and it was fun to create all the methods in a matter of seconds after creating the template. But in the wild I would have let intellij created the methods for me by autocomplete the error which comes by not implementing the interface methods. But to show the functionality of templates it was great.

Some tipps: for surround with braces I always activate “Surround selection on typing quote or brace”. You can select text and just type your quote or wanted brace and intellij wont overwrite your selection but surround it.

When you want custom postfix templates there is an intellij plugin for that: Custom Postfix Templates


Thank you so much! That’s really great insight, thanks for sharing.

I definitely want to look into that plugin!