In eclipse, I can just move the mouse on a new method name and click to create a new method. I wonder how can I do it with Android studio (which is based on IntelliJ Idea).
Ctrl+I
enables you to create default methods for methods you have to I
mplement.
Ctrl+O
enables you to create default methods for methods you have to O
verride.
Alt+Insert
enables you to generate commons methods (getters, setters, constructors etc...)
If you call a method that does not exist, Alt+Enter
opens a list of quick fixes. You can then generate a default code for this method.
On Mac you can use the following shortcuts
Option + Return : Implements all methods that have to be implemented or overridden
Cmd + I : Lists all methods that are unimplemented
选项+当光标位于myMethod()
返回 ,这为我提供了创建方法myMethod()
的选项。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.