在Mac上,尝试使用cmnd+N,然后选择generate -> Delegate Methods。在Windows和Linux上,使用Alt+Insert。(仅在Mac上测试过)。
Android Studio可以像Eclipse一样生成方法:
您将有以下任何方法的生成选项:
- 构造函数
- Getter
- Setter
- Getter和Setter
- equals()和hashCode()
- toString()
- 覆盖方法
- 委托方法
此外,在Android Studio中生成方法的快捷键组合(在Windows操作系统上)是alt + ins
Alt+Enter
吗? - Cyanotis