Android Studio Tips & Tricks: Moving Around
2015-09-16 11:53
399 查看
Opening ClassFileSymbol
打开新类Ctrln
Open Filectrlshiftn
Open Symbolctrlaltshiftn
部分匹配Partial Matching
Line Number
recent file
Recently opened filesctrle
Recently edited filesctrlshifte
Navigate BackForwardctrlaltleftright
Last Edit Locationctrlshiftbackspace
Show Usage
In a Persistent Panelaltf7
In Placectrlaltf7
Goto DeclarationImplementation Drill Down
Goto Declaration去定义声明的地方
Goto Implementationctrlaltb
Goto Type Declarationctrlshiftb
Goto Superctrlu
比如:ExcitingClass:22 或者EC:22
When the caret is on a variable, it will go to the declaration of its type. For example, if I have the following line:
Developer phil = new Developer(“Phil”);
If the caret is on the variable “phil”, this shortcut will go to the declaration of the “Developer” class.
Pretty much the opposite of Goto Implementation. If the cursor is in an overriden method, it will open its parent implementation. If the caret is in a class but outside the method or on the class name, it will open the parent class.
打开新类Ctrln
Open Filectrlshiftn
Open Symbolctrlaltshiftn
部分匹配Partial Matching
Line Number
recent file
Recently opened filesctrle
Recently edited filesctrlshifte
Navigate BackForwardctrlaltleftright
Last Edit Locationctrlshiftbackspace
Show Usage
In a Persistent Panelaltf7
In Placectrlaltf7
Goto DeclarationImplementation Drill Down
Goto Declaration去定义声明的地方
Goto Implementationctrlaltb
Goto Type Declarationctrlshiftb
Goto Superctrlu
Opening Class/File/Symbol
1.打开新类:Ctrl+n
新创建一个类,可以很方便的看到类创建之后的路径。以及输入字母字母时候会有相关的提示名字,很智能。2.Open File:ctrl+shift+n
用于打开在你项目中的文件。对于打开AndroidManifest.xml 或者任何在res/和 assets/ folder下的文件都非常有用。3.Open Symbol:ctrl+alt+shift+n
通过输入方法或者变量的名字就可以直接打开。4.部分匹配Partial Matching
即使输入不完整的字符串,它也可以帮你查找。比如ItemDetailFragment”, 你输入“IDF”就可以找到。5.Line Number
查找在某个类某一行,可以用类名:行数,类名可以缩写。比如:ExcitingClass:22 或者EC:22
recent file
1.Recently opened files:ctrl+e
显示你最近操作过的文件。2.Recently edited files:ctrl+shift+e
和上面那句差不多,但只显示最近有编辑过的文件。Navigate Back/Forward:ctrl+alt+left/right
Last Edit Location:ctrl+shift+backspace
Show Usage
1.In a Persistent Panel:alt+f7
Shows where something is used. For a class member, it will show where reads and writes are made. For a method, it will show where it is called. For a class, it will show where new instances are created.2.In Place:ctrl+alt+f7
和上面一样,不过提示的地方在变量上方。上面提示的地方在左下角。Goto Declaration/Implementation (Drill Down)
1.Goto Declaration去定义声明的地方
两种方式:ctrl+click或者用ctrl+b。2.Goto Implementation:ctrl+alt+b
Shows a list of all the classes/interfaces implementing the selected class/interface. Also works on methods to find where they are implemented/overriden. On variables, it has the same effect as Goto Declaration。3.Goto Type Declaration:ctrl+shift+b
类型声明:When the caret is on a variable, it will go to the declaration of its type. For example, if I have the following line:
Developer phil = new Developer(“Phil”);
If the caret is on the variable “phil”, this shortcut will go to the declaration of the “Developer” class.
4.Goto Super:ctrl+u
打开当前 symbol的父类。Pretty much the opposite of Goto Implementation. If the cursor is in an overriden method, it will open its parent implementation. If the caret is in a class but outside the method or on the class name, it will open the parent class.
相关文章推荐
- Android四大基本组件介绍与生命周期
- Android列表对话框用法实例分析
- android 系统优化包括哪些方面
- Android中设置TextView的颜色setTextColor
- Android日志打印命令
- Android SDK在线更新镜像服务器
- Android framework系统默认设置修改
- android EditText自定义样式
- 查看Android keystore签名信息
- Android异步消息处理机制(2)源码解析
- Android引导页面去除白屏
- Android 常用性能测试工具汇总
- Android高级图片滚动控件,编写3D版的图片轮播器
- android Service(二)
- android程序的加固解析
- android 获取video列表和缩略图 亲测()
- AndroidMediaPlayer.prepare已经报错解决办法
- Android 开源框架Universal-Image-Loader完全解析
- Android Textview 阴影效果
- android listview adater