📜 ⬆️ ⬇️

Android Studio hotkeys that can increase your productivity by 100%

Translation of Shikar Sha's notes from medium.com

Intro spoiler
About the author of the original: Shikar Sha, Android developer certified by Google (Shikhar Shah, Google Certified Android Developer).

From the translator:
If you find any inaccuracies in the translation of terms or their distortion, as well as the distortion of the meaning of the original article, then write about it in the comments or directly to me in private messages .
')
For assistance in eliminating syntax and punctuation errors, thanks to ZAEZU;)

Transfer


Let's get right to the point. You are not here to learn the story of my life. Let's start.



There are a number of hot key combinations that I encountered when entering the corporate world. I distinguish them in two groups.

1. Search hotkeys


Do not remember where they used a particular word? Use these hotkeys to solve your problem.

i) Ctrl + Shift + F : When you use this combination, a search window opens where you can find a word, class or any other object. AS (Android Studio) will scan the entire project to find it in the project.



ii) Shift + Shift : Tired of using the left navigation bar? Then you can get to the desired file from this window, which is opened by double-clicking on Shift. Just enter the beginning of the name or the full name of the desired file and AS in the window will list the search results. You can also open specific settings windows with this key combination.



2. Navigation hotkeys


i) Ctrl + Click : Get to the markup file or Java file by clicking on it while holding down the Ctrl key.



ii) Alt + up / down : Calmly navigate through the headings of classes and their methods using this combination.



iii) Alt + left / right : Use the right / left arrows in conjunction with the Alt key to navigate through open project files, such as a markup file or a class file.



Active Templates


i) “Toast” + Tab : Dialing the word “Toast” and then pressing the Tab key will generate a ready-made Toast template.



There are many built-in templates that will help you in your work, such as
ii) loge + Tab
iii) logd + Tab
iv) logr + Tab

and many others. The beauty of this feature is that you can add your active templates to the settings. Just use double shift and go to the section of active templates (Live Templates), where you can add your own template.
And the most important and saving combination is

v) Ctrl + D

which automatically completely duplicates the line on which the cursor is located at the current moment.



That's it guys.

LAST:
Want your code to be clean? Just use
Ctrl + Shift + L

and your code in the currently selected files will be properly formatted.

PS: Over time, more hotkey combinations will be added. Let me know if they were helpful. And applause (like on medium.com; approx. Translator) is the best way to thank :)

Source: https://habr.com/ru/post/359376/


All Articles