How to add code snippets in Android Studio IDE?

后端 未结 5 1599
独厮守ぢ
独厮守ぢ 2020-12-04 21:04

does anyone know how to add code snippets in Android Studio IDE? I didn\'t found a menu entry or something like this.

I also want to know is it possible to change th

5条回答
  •  感动是毒
    2020-12-04 21:39

    Go to Settings (File > Settings, or CTRLALT + S) then search for "Live Templates".

    A template screen will be opened. You can see here all live templates and you can also create your own custom live templates.

    It is important that you choose the correct template group to define your new template (e.g. "Android").

    As an example, I will define a Toast method as a live template.

    You can also click "use static import as possible" not to be handle importing stuff.

    enter image description here enter image description here

提交回复
热议问题