Saturday, 13 August 2016

Android Studio Shortcuts


Are you a Android Developer ? You use android studio too? Well, if so is the case, I have something to share with you guys. I am gonna share some coolest keyboard shortcuts which you can use anytime.
Again like my last post, I am not sure whether these shortcuts will work on Windows or not. All I know is ....there is no harm in trying.
Let’s start now,


1. Highlight All the Things


cmd + Shift + F7 (Mac)
ctrl + Shift + F7 (Linux)


Select the text and press the above keys and it will highlight every occurrence of the selected text in the current file. We can then navigate up or down using the shortcuts from Edit → Find → Find Next/Previous
    We can cancel the highlighting by pressing Escape.
Additional tips:
  • Highlighting a “return” or a “throw” statement in a method will also highlight all the exit points of the method.
  • Highlighting the “extends” or the “implements” portion of the class definion will also highlight the methods that are overriden/implemented.
  • Highlighting an import will also highlight where it is used.


2. Move Between Methods and Inner Classes



ctrl + up/down (Mac)
alt + up/down (Linux)


This wil move our cursor to the name of the next method or class in the current file. If we are in the body of a method, going up will put the cursor on its name.


3. Move Lines Up/Down



alt+shift+up/down (for both Mac & Linux)


If we have to shift a line of code to some other place. Try this....!!


4. Delete Line



cmd + backspace (Mac)
ctrl + Y (Linux)

It deletes the current line or selection.

Reference : http://www.developerphil.com/android-studio-tips-of-the-day-roundup-1/

No comments:

Post a Comment