本文介绍了如何在Android Studio IDE中添加代码段?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道如何在Android Studio IDE中添加代码段吗?我没有找到菜单项或类似的内容.

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 the existing snippets?

推荐答案

添加/编辑模板:

在菜单上选择File -> Settings,然后在IDE Settings(或Editor)下转到Live Templates.

On the menu choose File -> Settings, then under IDE Settings (or Editor) go to Live Templates.

要插入模板,请执行以下操作:

To insert a template:

在菜单上选择Code -> Insert Live Template(或使用为其分配的快捷键).

On the menu choose Code -> Insert Live Template (or use it's assigned shortcut key).

Android Studio 3.4截图

这篇关于如何在Android Studio IDE中添加代码段?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-22 11:39
查看更多