[英]How to automate adding multiple methods in android studio 1.0?
I am following a tutorial on how to create a flappy bird clone from http://www.kilobolt.com/day-3-understanding-the-libgdx-framework.html 我正在遵循有关如何从http://www.kilobolt.com/day-3-understanding-the-libgdx-framework.html创建虚张声势的鸟克隆的教程。
This is where I am at 我在这里
I know what's going because GScreen is a concrete class, it has to provide implementations of all the methods in the Screen interface. 我知道这是怎么回事,因为GScreen是一个具体的类,它必须提供Screen接口中所有方法的实现。
To do this, I looked up "Add unimplemented methods" feature in the Android Studio and used the control o shortcut to get to this dialog. 为此,我在Android Studio中查找了“添加未实现的方法”功能,并使用快捷控件Control进入了此对话框。
However from this dialog, is there a way of selecting multiple methods that you want stubs for? 但是,从此对话框中,是否可以选择想要存根的多个方法? If I double click one, I just get the stub for that method. 如果我双击一个,则只获得该方法的存根。 Is there a way to get multiple stubs at a time, for efficiency sakes? 为了提高效率,是否可以一次获取多个存根?
You can select multiple methods using the control (Command on a Mac) key or the shift key, then single click. 您可以使用控制键(在Mac上为Command)或Shift键,然后单击以选择多种方法。 The shift key selects a continuous list of methods, the control key allows non-contiguous selections. Shift键选择一个连续的方法列表,控制键允许不连续的选择。
You can right click on the class name in java file . 您可以右键单击java文件中的类名称 。 A drop down arrow will come containing an various options like "GENERATE" . 下拉箭头将包含各种选项,例如“ GENERATE” 。 Click it and select which unimplemented you want to apply it will be automatic generated. 单击它,然后选择要应用的未实现的将自动生成。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.