All Projects → puke3615 → TemplateBuilder

puke3615 / TemplateBuilder

Licence: other
Android Studio模板一键生成插件

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to TemplateBuilder

SideMirror
An Android Studio plugin to mirror your android devices with scrcpy directly from Android Studio.
Stars: ✭ 49 (+25.64%)
Mutual labels:  androidstudio, androidstudio-plugin
Root-Checker
Displays all root related info(Device Rooted, Root Available, Root Path, Root given, Busy Box installation) of an Android Device. Fully implemented in Jetpack compose using Material 3 dynamic theming and also has a separate implementation in xml with MDC 3.
Stars: ✭ 21 (-46.15%)
Mutual labels:  androidstudio
Folivora
An android library that supports set various drawables to view directly in your layout.xml
Stars: ✭ 207 (+430.77%)
Mutual labels:  androidstudio
php-best-practices
What I consider the best practices for web and software development.
Stars: ✭ 60 (+53.85%)
Mutual labels:  agile-development
Modern Android Development
Modern Android Development tools & key points
Stars: ✭ 219 (+461.54%)
Mutual labels:  androidstudio
dsl-api-generator
Generates binary compatible and Java interoperable DSL boilerplate code
Stars: ✭ 25 (-35.9%)
Mutual labels:  androidstudio-plugin
Mvpautocodeplus
🔌An IDEA/Android Studio plug-in that automatically generates an MVP template code
Stars: ✭ 176 (+351.28%)
Mutual labels:  androidstudio
bdd-for-all
Flexible and easy to use library to enable your behavorial driven development (BDD) teams to easily collaborate while promoting automation, transparency and reporting.
Stars: ✭ 42 (+7.69%)
Mutual labels:  agile-development
ChipView
A simple Chip based EditText with a searchable ListView
Stars: ✭ 44 (+12.82%)
Mutual labels:  androidstudio
AndroidProguard
android代码混淆AndroidStudio插件
Stars: ✭ 27 (-30.77%)
Mutual labels:  androidstudio
flutter bolg manage
Flutter实战项目,采用Getx框架管理,遵循Material design设计风格,适合您实战参考或练手
Stars: ✭ 373 (+856.41%)
Mutual labels:  androidstudio
Grabredenvelope
微信抢红包Android APP
Stars: ✭ 245 (+528.21%)
Mutual labels:  androidstudio
markdown-inception-deck
No description or website provided.
Stars: ✭ 51 (+30.77%)
Mutual labels:  agile-development
K4kotlin
A sweet, small set of Kotlin functions to reduce your android boilerplate code
Stars: ✭ 210 (+438.46%)
Mutual labels:  androidstudio
doubleClick
A lib To handle double click on android View's components.
Stars: ✭ 47 (+20.51%)
Mutual labels:  androidstudio
Tinderclone
Tinder App Clone
Stars: ✭ 196 (+402.56%)
Mutual labels:  androidstudio
WiFiADB
An IntelliJ platform plugin use for connecting Android device over WiFi
Stars: ✭ 131 (+235.9%)
Mutual labels:  androidstudio-plugin
Biometric-Authentication-Android
A sample implementation of AndroidX biometrics API using Kotlin. Authenticate using biometrics or PIN/Password if biometrics isn't available on device. Fully implemented in Jetpack compose using Material 3 dynamic theming and also has a separate implementation in xml with MDC 3.
Stars: ✭ 29 (-25.64%)
Mutual labels:  androidstudio
awesome-android-tips
😎 A curated list of awesome Android tips
Stars: ✭ 34 (-12.82%)
Mutual labels:  androidstudio
Android-Live-Templates
A curated android live templates to make your android development more fast🚀 and easy✨.
Stars: ✭ 197 (+405.13%)
Mutual labels:  androidstudiotemplate

English Version

声明

Android Studio的模板包括以下三种,这里讲的是第三种Multi Template。在阅读本文之前,默认你是了解该模板的,知道为什么要使用它,如果不清楚它是什么,可以在网上自行查阅相关资料,当然也可以直接点击这里查看一下同行们对它的评价

  • Live Template:代码片段级别
  • File Template:单文件级别
  • Multi Template:多个文件级别(以下称 Android Studio Template

WHAT

TemplateBuilder是一款能够帮助我们快速生成Android Studio Template的AS插件,将通过逐个文件去配置模板的方式改进为通过插件来实现,对于简单的模板制作,只需要一键即可生成。

HOW

安装

打开Android Studio,Preferences -- Plugins -- Brown Repositories, 搜索TemplateBuilder 并下载,下载之后重启IDE即可使用。

使用

这里我们就拿对一个MVP模板的抽取来举例,首先选中需要制作为模板的类文件(如果需要选中某个包下面的全部文件,可以直接选中该包),然后按下启动改插件的快捷键ALT + T,便能看到如下界面

下面来说明一下该界面对应的内容

  • Template Category 对应模板的分类,对应选择导入模板时的模板分类,这里默认值是电脑的用户名。

  • Template Name 对应模板名称,对应选择导入模板时的模板名称,默认值是当前的Project名称。

  • Template Description 对应模板描述信息,对应导入模板时弹出的导入界面的文字描述,默认为空。

  • Template Folder 对应生成模板所存放的位置,如果是Mac操作系统则默认为/Applications/Android Studio.app/Contents/plugins/android/lib/templates, Windows系统的话由于差异比较大,就默认为空了,可以自行配置[Android Studio安装目录]/plugins/android/lib/templates(这里只需要配置一次即可,插件将自动保存该位置)。

  • Input data区域 对应使用我们模板时的变量输入,如果你想增强模板的可配性将会用到它,它就对应着AS模板中Template.xml<parameter />标签,也就是下面的每一个配置项。

整个的UI界面很明了,如果你只是想简单抽取你写的这个模板,你只需要输入下Template NameTemplate Description即可,当然如果你不想输入的话这也可以省略掉。接下来直接点击Finish,就能在IDE底部看到弹出如下图所示的提示,此时你已经制作成功,重启IDE即可使用该模板。

到这里,如果你了解Android Studio Template制作流程的话,你可能觉得相对于完全自己手动去做这样固然简单,但是灵活性上降低了不少。例如模板中有组价依赖关系的时候,你需要在build.gradle.ftl中去添加对应的依赖;导入模板之后你想自动打开某个文件时,你需要编辑recipe.xml.ftl;选择模板适用于哪个版本时,你需要编辑template.xml等等。如果你有这方面的需求,可以点击Next来代替Finish,点击之后你就能看到如下界面,在这里提供了所有你需要关注的配置文件的编辑,编辑完成直接点击OK开始自动生成。

WHY

如果你尝试过自己去制作一个Android Studio Template的话,相信你一定会为模板配置、更改文件名、添加可配参数等等繁琐的操作而烦恼,因为哪怕一个很简单的模板抽取都需要把这一系列流程全都走一遍,更改好几个配置文件。

说下我的个人感受,当我发现Android Studio Template时我顿时感觉有太多太多可以抽取出来的模板以供日后快速使用,但当我刚开始抽取几个模板的时候就已经被深深的恶心到了,因为这个过程真心很繁琐。记得当时还专门写groovy脚本来辅助进行这些模板的配置,但也还是需要向脚本里添加一些模板文件的入参信息,依然很麻烦。后来我决定将这个制作过程尽可能通过自动化来完成,当时考虑Gradle插件Java GUIAS Plugin等多种方式来完成模板制作,最终选择了快而方便的AS Plugin,插件的名称就是上面所提到的TemplateBuilder

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].