Android studio creating live templates

225 views Asked by At

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

1

There are 1 answers

0
dj_frunza On BEST 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.