Category Archives: Android Studio

Android Studio Live Templates

One of best programming practices is DRY. Don’t repeat yourself. And yet we often write similar blocks of code over and over again. And sometimes it really cannot be avoided. You can save yourself lot of time when you meet Android live and file templates. In this post, I write about live templates but I am sure I will come back to file templates later.
So how can you use live templates? Simply type template abbreviation, press Tab and block of code defined in template comes up. There are many live templates already included in Android Studio, but you can also define your own. To see them go to Editor, Settings and Live Templates. There they are, by default sorted by a programming language of their use. Looking like this.
Continue reading