1.打开设置弹窗 方法:点击file--otherSetting--Default Setting(快捷键Ctrl+Alt+s)。

2.在搜索框输入template在左侧菜单栏找到并选中File And Code Templates。

3.右侧选中file标签。

4.点击绿色加号+添加模板。

5.name无所谓,extension写xml,然后添加上内容。

6.最后把enable live Template(**模板)勾选上。

7.大功告成。

8.附图:

Idea创建xml文件

相关文章: