Ad

Android Studio Creating Live Templates

- 1 answer

I am creating a simple live template to show an AlertDialog in AS, snippet:

enter image description here

However, the Edit variables option is now inactive, even after I have selected the language type. Any help with this?

Previously I was able to do this

Ad

Answer

A variable in Live templates is specified between '$' characters. I noticed that, in your example, $className is specified instead of $className$. Just use the $className$(ends wit $) instead of $className and the "Edit Variables" button should become active.

Ad
source: stackoverflow.com
Ad