本文介绍了Android Studio自定义模板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

我制作了一个模板,以节省结构化项目的时间.

I made a template to save time for my structured projects.

这是一个基本模板,因此我仅在创建新项目时使用它,但是Android Studio在我想要创建新对象(Xml,类,活动,片段等)时也会显示我的模板.

It's a base template so I only use it when I create a new project, but Android Studio shows my template also when I want to create a new object (Xml, class, activity, fragment, etc).

我只想在创建新项目时将模板显示为选项.我试图找到可以改变它的东西,但是没有得到任何有用的东西.

I want to only show my template as an option when I want to create a new project. I tried to find something to change it, but I didn't get anything useful.

推荐答案

只需转到<android studio directory>\plugins\android\lib\templates\activities并查看在那里定义的模板.

Just go to <android studio directory>\plugins\android\lib\templates\activities and look to templates defined there.

我做了同样的事情.我没有找到如何为新项目创建模板的方法,所以我刚刚为新模块创建了模板.

I done same thing. I didn't found how to create a template for new project, so i have just created a template for new module.

推荐阅读:

  • http://www.i-programmer.info/professional-programmer/resources-and-tools/6845-android-adt-template-format-document.html
  • http://www.i-programmer.info/projects/215-mobile/6843-custom-projects-in-android-studio.html
  • http://robusttechhouse.com/tutorial-how-to-create-custom-android-code-templates/
  • https://coderwall.com/p/fsxvyw/file-templates-in-android-studio

这篇关于Android Studio自定义模板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-06 18:43