While working with the android studio you should know these shortcut that helps you to reduce your effort while writing code.
1:-To see recently opened files
This shortcut helps you to see the recently opened file in the form of a popup. You can use the below syntax to see your recent file.
Syntax
Windows: CTRL + E
Mac: Command + E
2:-To duplicate the current line
If you want to make a duplicate of your current line then you can use the below syntax
Syntax
Windows: CTRL + D
Mac: Command + D
3:-To delete the current line
If you want to delete the current line where the cursor is then you can use the below syntax
Syntax
Windows: CTRL + Y
Mac: Command + Delete
4:-Too see the document of your widget
If you want to see documentation of your widget then you can use the below syntax.
Syntax
Windows: CTRL + Q
Mac: CTRL + J
5:-To reformat the code
If you want to reformat the code then you can use the below syntax
Syntax:
Windows: CTRL + ALT + L
Mac: Command + Option + L
6:-To override methods
If you want to override a method in the android studio then you can use the below syntax
Syntax
Windows: CTRL + O
Mac: CTRL + O
7:-To Collapse/expand the current code block
If you want to collapse or expand a block of code then you can use the below syntax
Syntax
Windows: CTRL + '+'/'-'
Mac: Command + '+'/'-'
8:-To Collapse/expand all code blocks
If you want to collapse or expand all code blocks then you can use the below syntax
Syntax
Windows: CTRL + Shift + '+'/'-'
Mac: Command + Shift + '+'/'-'
9:-To remove unused imports
If you want to remove unused imports then you can use the below syntax
Syntax
Windows: CTRL + ALT + o
Mac: Command + Option + 0
10:-To search everywhere
If you want to search everywhere in the projects then you can use the below syntax.
Syntax:
Shift+Shift
11:-To find text in a single file
If you want to find text in a single file then you can use the below syntax.
Syntax
Ctrl+F