安卓常用的方便快捷键 快捷键Alt+insert 快捷键Alt+insert 这个我暂时用来给变量添加方法,getter和setter。 在需要封装的变量界面使用Alt+insert,然后会出现这个界面,点下Getter and Setter 然后按住CTRL,选中要封装的变量,再点击确定就可以了