AndroidStudio Tips – 1

I am going to share some Android Studio tips which is taken from the Day of the tips  hope it will help to Android developers.

1. To quickly see the documentation for a class or method at caret, press Ctrl+Q (View | Quick Documentation).

2. To navigate to the declaration of a class, method or variable used somewhere in the code, position the caret at the usage and press Ctrl+B (Navigate | Declaration). You can also click the mouse on usages with the Ctrl key pressed to jump to declarations.

3. You can quickly navigate in the currently edited file with Ctrl+F12 (Navigate | File Structure).

It shows the list of members of the current class. Select an element you want to navigate to and press the Enter key or the F4 key.

To easily locate an item in the list, just start typing its name.

4. You can comment or uncomment lines and blocks of code using Ctrl+Slash and Ctrl+Shift+Slash.

Ctrl+Slash comments or uncomments the current line or selected block with single line comments (//…).

Ctrl+Shift+Slash encloses the selected block in a block comment (/*…*/).

To uncomment a commented block press Ctrl+Shift+Slash anywhere inside it.

5. Use Ctrl+Shift+F7 (Edit | Find | Highlight Usages in File) to quickly highlight usages of some variable in the current file.

Use F3 and Shift+F3 keys to navigate through highlighted usages.

Press Escape to remove highlighting.

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

7. Use F2/Shift+F2 keys to jump between highlighted syntax errors.

Use Ctrl+Alt+Up/Ctrl+Alt+Down 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.

8. Use Alt+Up and Alt+Down keys to quickly move between methods in the ed

9. 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.

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

Add Comment