Tip of the Day(Android Studio)

1. 2016-03-17

这里写图片描述

    Use Code | Reformat Code to reformat code according to your code style preferences (File | Settings | Code Style).
    You can also use Code | Optimize Imports to automatically optimize imports (remove unused imports, etc.). 
    To access the corresponding settings, use File | Settings | Code Style | Imports.

    根据你的代码样式偏好(可在 File | Settings | Code Style 下设置)使用Code下的Reformat Code(快捷键:Ctrl+Alt+L)来格式化代码。
    备注:File | Settings 的快捷键:Ctrl+Alt+S

    你也可以使用 Code | Optimize Imports (快捷键:Ctrl+Alt+O)来自动导包(移除没有引用的包,等等),
    对应的设置在 File | Setting | Code Style | Imports 中。
    备注:在 File | Setting | Code Style 下没有找到 Imports ,但在File | Setting | Code Folding 下找到了 Imports,如下图

这里写图片描述

2. 2016-03-18

To see your local history of changes in a file, invoke Local History | Show History from the context menu. 
You can navigate through different file versions, see the differences and roll back to any previous version.
Use the same context menu item to see the history of changes on a directory. You will never lose any code with this feature!

你可以通过在当前代码中右键选择 Local History | Show History 来查看当前文件的各个不同的保存版本
(每次保存都会在History中存储一个副本,有点类似git或者svn)。

3. 2016-03-19

Press Alt+Q (View | Context Info) to see the declaration of the current method without the need to scroll to it.

快捷键Alt+Q (或者通过: View | Context Info)来查看当前方法的声明信息,而不用滑动去查找
(即:包含当前光标所在位置的不可见的第一层方法声明。有点绕,感觉使用的不多=。=)。

4. 2016-03-20

这里写图片描述

    Ctrl+E (View | Recent Files) brings a popup list of the recently visited files. Choose the desired file and press Enter to open it.
    Besides recent files, you can bring up results of the usage searches you have performed recently. To do that, 
    use the same Ctrl+E shortcut with the Find tool window having the focus, and select the desired find usages result from the Recent Find Usages popup.

    使用Ctrl+E (View | Recent Files)来查看最近访问过的文件,另外,你也可以在光标在Find上时使用Ctrl+E来查看最近Find用过的情况。

5. 2016-03-21

    Use F2/Shift+F2 keys to jump between highlighted syntax errors.
    Use Ctrl+Alt+向上箭头/Ctrl+Alt+向下箭头 shortcuts to jump between compiler error messages or search operation results.
    To skip warnings right click on the validation side bar / marker bar and choose Go to high priority problems only.

使用F2(自上而下)/Shift+F2(自下而上)在高亮的错误语法间跳动;
使用Ctrl+Alt+向上箭头/Ctrl+Alt+向下箭头 在错误的编译信息或者查找操作历史中跳动;
为了跳过警告信息,你可以在validation side bar 或 marker bar上右击,然后选择优先级更高的问题;

6. 2016-03-22

这里写图片描述

    Use Ctrl+J to complete any valid Live Template abbreviation if you don't remember it. 
    For example, type it and press Ctrl+J to see what happens.

使用Ctrl + J来进行模版的调用,类似eclipse中输入syso后按Alt + / 。

7. 2016-03-23

这里写图片描述

To show separator lines between methods in the editor, open the editor settings 
and select the Show method separators check box in the Appearance page.

为了在两个方法间添加分割线,你可以打开编辑器设置,在Appearence 中选择Show method separators 选项。

8. 2016-03-24

这里写图片描述

When using basic code completion (Ctrl+空格), type any characters that exist anywhere in an identifier.

输入部分关键字可以利用“Ctrl+空格”进行代码补全,类似Git中使用Tab键。备注:经测试发现“Ctrl+空格”不起作用,更改快捷键后可以正常使用。

9. 2016-03-25

Use Alt+向上箭头 and Alt+向下箭头 keys to quickly move between methods in the editor.

使用Alt+向上箭头 和 Alt+向下箭头可以使光标在相邻的方法间跳动。

10. 2016-03-26

Ctrl+Shift+J shortcut joins two lines into one and removes unnecessary space to match your code style.

使用Ctrl+Shift+J可以将选中的多行代码合并为一行,并且自动移除无用的空格。

11. 2016-03-27

Use Refactor | Copy to create a class which is a copy of the selected class. This can be useful, for example, 
when you need to create a class which has much in common with some existing class 
and it's not feasible to put the shared functionality in a common superclass.

使用Refactor | Copy(快捷键: F5)可以复制一份当前选择的类,当然你也可以通过Ctrl + C ,Ctrl + V 来实现相同的效果。

12. 2016-03-28

Use the Ctrl+Shift+V shortcut to choose and insert recent clipboard contents into the text.

使用 Ctrl+Shift+V 可以选择最近保存在剪切板上的内容,Ctrl+V的增强模式。

13. 2016-03-29

这里写图片描述

To see the inheritance hierarchy for a selected class, press Ctrl+H (Navigate | Type Hierarchy). 
You can also invoke the hierarchy view right from the editor to see the hierarchy 
for the currently edited class.

利用Ctrl+H (Navigate | Type Hierarchy)可以查看当前所选类的继承层级,你也可以点击编辑器的右边的 hierarchy来实现相同的效果。

14. 2016-03-30

这里写图片描述

Right-clicking on a breakpoint marker (on the bar to the left from the text) invokes the speedmenu 
where you can quickly enable/disable the breakpoint or adjust its properties.

在断点上右击鼠标,你将能够快速地对该断点调整。

15. 2016-03-31

To easily evaluate the value of any expression while debugging the program, 
select its text in the editor (you may press a Ctrl+W a few times to efficiently perform this operation) 
and press Alt+F8.

当debug程序时,你可以用通过Ctrl+W选中表达式,然后按下Alt+F8来快速验证表达式的值。

16. 2016-04-01

这里写图片描述

To quickly evaluate the value of any expression while debugging the program, 
hold Alt and click this expression to see its value and calculate it, call a method, etc.

当debug程序时,你可以通过按住Alt的同时点击表达式来查看表达式的值。

17. 2016-04-02

这里写图片描述

Use Basic Completion (Ctrl+空格) for completing words in text and comments in files of many different types.
All the words from the current file that start with the typed prefix will appear in the lookup list.

同8.2016-03-24

18. 2016-04-03

这里写图片描述

The shortcuts such as Ctrl+Q (View | Quick Documentation), Ctrl+P (View | Parameter Info), Ctrl+B (Navigate | Declaration) 
and others can be used not only in the editor but in the code completion popup list as well.

快捷键Ctrl+Q (View | Quick Documentation), Ctrl+P (View | Parameter Info), Ctrl+B (Navigate | Declaration) 等,
不仅可以在编辑器中使用,还可以在弹框中使用。

19. 2016-04-04

When using Code Completion, you can accept the currently highlighted selection in the popup list 
with the period character (.), comma (,), semicolon (;), space and other characters.
The selected name is automatically entered in the editor followed by the entered character.

当使用代码自动不全的时候,你可以通过Enter键自动输入弹框中高亮的被选择的内容。

20. 2016-04-05

To help you learn the purpose of each item in the main menu, its short description is shown 
in the status bar at the bottom of the application frame 
when you position the mouse pointer over this item.

21. 2016-04-06

这里写图片描述

搜索时*通配符的使用

22. 2016-04-07

这里写图片描述

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值