Android Studio模板
2017-02-09 16:20
267 查看
Live Templates系列:
一、layout模板
二、注释模板
1、${USER}
找到androidstudio的安装目录/bin下面的idea.exe.vmoptions 和idea64.exe.vmoptions这两个文件,在里面添加
-Duser.name=bruce.zhang
2、快捷键
类注释没有快捷键,方法注释有(Ctrl+Alt+1)。类注释需要在Live Templates设置。http://blog.csdn.net/sun_promise/article/details/45642319
3、方法默认修改
方法注释如果通过Live Templates修改的话,不灵活,没法获取生成参数信息。可以通过javadoc插件实现。
三、java代码片段
一、layout模板
tv: <TextView android:id="@+id/tv_exp_label" android:layout_width="wrap_content" android:layout_height="wrap_content" android:includeFontPadding="false" android:textColor="@color/bbs_main_yellow" android:textSize="14sp" android:text="颜值" /> -------------------------------------------- image: <ImageView android:id="@+id/xxx" android:layout_width="wrap_content" android:layout_height="wrap_content" android:scaleType="fitXY" android:src="@drawable/xxx" />
二、注释模板
1、${USER}
找到androidstudio的安装目录/bin下面的idea.exe.vmoptions 和idea64.exe.vmoptions这两个文件,在里面添加
-Duser.name=bruce.zhang
2、快捷键
类注释没有快捷键,方法注释有(Ctrl+Alt+1)。类注释需要在Live Templates设置。http://blog.csdn.net/sun_promise/article/details/45642319
3、方法默认修改
方法注释如果通过Live Templates修改的话,不灵活,没法获取生成参数信息。可以通过javadoc插件实现。
三、java代码片段
singleton: private $CLASS$() {} private static class SingletonLoader { private static final $CLASS$ INSTANCE = new $CLASS$(); } public static $CLASS$ getInstance() { return SingletonLoader.INSTANCE; } --------------------------------------------
相关文章推荐
- Android Studio 自带模板Bottom Navigation Activity 结合Fragment创建主页
- Android Studio混淆模板及常用第三方混淆
- Android Studio 设置自定义注释模板
- 在 Android Studio 中自定义注释模板及颜色(基于TODO)
- android studio学习---模板
- Android Studio方法注释模板
- Android Studio中设置作者和创建日期、时间等注释模板
- android studio 代码模板
- Android Studio(六):Android Studio添加注释模板
- Android Studio混淆模板和第三方混淆--binbinyang
- Android Studio 自定义设置注释模板
- Android Studio 添加注解模板,解决办法。
- Android Studio设置注释模板
- 和大家分享一个Android Studio界面风格模板
- Android Studio 配置 toString( ) 模板,定制 JSON 格式字串的步骤
- Android Studio混淆模板及常用第三方混淆(看了都说好)
- 【 Android Studio】自定义Activity模板
- Android studio 版权信息模板
- Android Studio 自定义设置注释模板
- Android Studio(六):Android Studio添加注释模板