很全: https://ydmmocoo.github.io/2016/06/28/Android-Studio%E6%8F%92%E4%BB%B6%E6%95%B4%E7%90%86/
**1,Android ButterKnife Zelezny **
如果使用ButterKnife 做注入开发的话,使用这个可以生成Activity、Adapter或者Fragment
**2,Android Code Generator **
用法和Android ButterKnife Zelezny 差不多,不过生成的是基本的Activity,没有ButterKnife规范
同时可以生成:Create view holder(http://www.imooc.com/article/1174)
public class ViewHolder {
public final TextView time;
public final ImageView isnew;
public final TextView username;
public final TextView department;
public final ImageView enter;
public final CircleImageView avatar;
public final RelativeLayout listcontent;
public final View root;
public ViewHolder(View root) {
time = (TextView) root.findViewById(R.id.time);
isnew = (ImageView) root.findViewById(R.id.is_new);
username = (TextView) root.findViewById(R.id.username);
department = (TextView) root.findViewById(R.id.department);
enter = (ImageView) root.findViewById(R.id.enter);
avatar = (CircleImageView) root.findViewById(R.id.avatar);
listcontent = (RelativeLayout) root.findViewById(R.id.list_content);
this.root = root; }
}
**3,Android Parcelable code generator **
对实体类自动生成实现Parceclable的接口,setter和getter还是需要自己生成(暂时没找到类似于lombok的东西去生成实现Parceable的代码)
4,Android Selectors Generate 或者SelectorChapek for android
主要用来生成一个按钮不同点击的时候的状态的selectors的状态,使用方式一样的
http://blog.csdn.net/amoscxy/article/details/53907343
&&
https://github.com/inmite/android-selector-chapek
5,Android Layout Id converter
能把layout中的所有的有id的组件全部找出来并生成代码:不过如果用ButterKnife 的话这个就没必要了。改成注入方式了
private EditText mSearchEt;
private ImageView mClearIv;
private TextView mSelectedStatusTv;
private SwipeRefreshLayout mSwipeLayout;
private SwipeMenuRecyclerView mAuditListRv;
private void assignViews() {
mSearchEt = (EditText) findViewById(R.id.search_et);
mClearIv = (ImageView) findViewById(R.id.clear_iv);
mSelectedStatusTv = (TextView) findViewById(R.id.selected_status_tv);
mSwipeLayout = (SwipeRefreshLayout) findViewById(R.id.swipe_layout);
mAuditListRv = (SwipeMenuRecyclerView) findViewById(R.id.audit_list_rv);
}
6,GsonFormat
idea也可以用
可以将json字符串生成bean(跟后端交互很重要!!!!)