Android Studio Template

来源:互联网 发布:ubuntu 16.04怎么分区 编辑:程序博客网 时间:2024/06/05 04:19

这篇文章是转载hongyang的文章,里面预设了非常多的Activity模板,可以方便的添加各种效果,极大的减少了bufenbiao

插件收集

对于Activity的模板,在
Appaction/AndroidStudio.app/Contents/plugins/android/lib/templates/activities
这里写图片描述

每个Activity模板,对应一个文件夹,对应我们创造Activity时,New Activity,如图:

这里写图片描述

除了内置的几个模板,我们可以自己开发,当然github上也有部分开源的模板,只需要下载别人提供的模板文件,copy至

{Android Studio installation dir}\plugins\android\lib\templates\activities\

然后重启Android Studio即可。

可以参考的插件如下

  • https://github.com/kanytu/Android-studio-material-template
    A template for Android Studio to create applications with material design and Navigation Drawer.包含:MaterialNavigationDrawerActivity
  • https://github.com/MontazzeStudio/android-studio-template
    包含DrawerWithTabsActivity和RecyclerRefreshActivity
  • https://github.com/gabrielemariotti/AndroidStudioTemplate
    包含SwipeRefreshLayout,还有一些常用的模板。

模板开发相关资料

http://www.jianshu.com/p/81d03519dd33
https://www.zhihu.com/question/46979171
http://www.i-programmer.info/professional-programmer/resources-and-tools/6845-android-adt-template-format-document.html
https://developer.android.com/studio/projects/templates.html
http://robusttechhouse.com/tutorial-how-to-create-custom-android-code-templates/

下面这个是关于鸿杨的自定义模板的地址,可以链接过去学习一下
http://mp.weixin.qq.com/s/u_yaTIfT79Nxz9oWWpEcnA

原创粉丝点击