출처: stackoverflow.com/questions/16857108/how-to-add-code-snippets-in-android-studio-ide
91
To add/edit templates:
On the menu choose File -> Settings, then under IDE Settings (or Editor) go to Live Templates.
To insert a template:
On the menu choose Code -> Insert Live Template (or use it's assigned shortcut key).
Screenshot Android Studio 3.4
Follow
76214 silver badges25 bronze badges
answered Jun 1 '13 at 8:35
17.5k6 gold badges50 silver badges51 bronze badges
- 4
- This is now through Android Studio, Preferences (not file settings) Shortcut Key is Command J on the Mac – Ryan Heitner Sep 30 '13 at 7:47
- 26
- Highlight a piece of code -> Select Tools Menu -> Save as Live Template – mkto Feb 7 '14 at 16:04
- 5
- Ctrl-J is the shortcut on Windows. – Anubian Noob Jan 9 '15 at 5:21
- I have xml of live template . But how to import that file into windows 7. Please suggest for it. I find solution for it but still not get any solution . – Anand Savjani Jan 1 '16 at 12:06
- Live Templates is in File > Settings > Editor in Android Studio 1.5.1 – Casey Murray Feb 5 '16 at 11:37
'개발일지' 카테고리의 다른 글
http 연결 허용시키기 (0) | 2021.05.22 |
---|---|
graphql_flutter subscription 구현 저장 (0) | 2021.05.13 |
nestjs oneToMany/ManyToOne relation 오류 (0) | 2021.02.01 |
ts 7016 에러 해결법 (0) | 2021.01.16 |
Nestjs test할때 src/**/ 어쩌구 절대경로 오류 해결법 (1) | 2020.12.18 |