Being More Productive With Android Studio – Part 1

We all know how to develop good applications by using Android Studio and we are preety much happy with what we are doing. But what if those things will be done with less efforts? We all are habituated to use mouse in our day-to-day life but sometimes knowingly or unknowingly it will increase our efforts as well as development time.

Today we will see some basic shortcuts of Android Studio which will be used in day-to-day life. Most of the time we will use mouse to select whole line or sometimes will select those things by using SHIFT + Arrow keys and then delete that line but in Android Studio CMD + Y(CTRL + Y) will delete current line. Here are some Android Studio shortcuts which will help you to be more productive.

Delete Single Line

Windows : CTRL + Y
macOS : CMD + Y

Android Studio shortcuts


Style and Formatting

Windows : CTRL + ALT + L
macOS : OPT + CMD + L

It will automatically apply your coding style and formate it. However you can edit your coding style from settings from File > Settings > Editor > Code Style(For Mac Android Studio > Preferences > Editor > Code Style)

Android Studio shortcuts


Search Everywhere

Windows : double time shift
macOS : double time shift

It allows you to search any item of the source code, databases, actions, elements of the user interface, etc.

Android Studio shortcuts


Move to declaration

Windows : CTRL + B
macOS : CMD + B

It allows you to move to declaration of class, method or variable.

Android Studio shortcuts


Move to implementation

Windows : CTRL + ALT + B
macOS : CMD + ALT + B

Allows you to see a list of all the classes implementing the selected class, It works with method also to find where they are implemented.

Android Studio shortcuts


Rename file/class

Windows : SHIFT + F6
macOS : SHIFT + FN + F6

It allows you to rename any file/class. It will rename all the copies of file/class/variable.


Surround with

Windows : CTRL + ALT +T
macOS : CMD + OPTION + T

It will allow you to wrap your code with some structure. It can be if statement, loop, try-catch block etc.

Android Studio shortcuts


Incremental Selection/Deselection

Windows : CTRL + W / CTRL + SHIFT + W
macOS : CMD + W / CMD + SHIFT + W

It will allow you to do contextual selection, it will select current variable, then the statement, then the method etc.

Android Studio shortcuts

RecyclerView With Android DataBinding
Being More Productive With Android Studio – Part 2