update:以下方式已过时,推荐使用butterknife
快速生成findViewById:
Ctrl+J 输入findviewbyid后->自动补全
生成 ->() findViewById(R.id.);
填入控件类型后
Alt+Enter ->intriduce local variable
注意:Ctrl+J 中的里面的缩写fbc,再点击enter,自动生成() findViewById(R.id.);当然,还有还多其他用法。
Shift+Tab键:
去改变变量的类型
Alt + Enter + Extract string/dimension resource
1.把鼠标定位在“长度”字符串上,然后按 Alt + Enter
2.在弹窗内选择 “Extract string resource”