Android Studio is Android’s official IDE. It is the best editor when it comes to writing and building Android apps.
These tips will improve your overall efficiency and performance.
|ctrl + n||Search and open a class|
|ctrl + shift + n||Search and open a file|
|ctrl + shift + v||Open clipboard contains latest copy|
|alt + left/right arrow||Switch tab|
|ctrl + alt + l||Format code|
|ctrl + alt + i||Auto indent lines|
|alt + enter||This call Intent action. It will suggest possible solutions to issues with your code based on the current cursor placement and context. When taking this action on a string, it moves hardcoded strings to resources.|
|ctrl + r||Search and replace|
|shift + F10||Build and run app in emulator|
|alt + shift + up/down arrow||Move code line up or down|
Record emulator screen and convert to GIF
Besides taking a screenshot, Android Studio also allows developers to record a video of working emulator’s screen.
In Logcat tab at the bottom part of Android Studio, you can find these options when moving your mouse over the arrow icon.
- Move your mouse over to
>>option to open More actions.
Screen Recordoption which is the play icon.
- Bit Rate: The default is 4 Mbps.
- Resolution: Enter a width and height value in pixels, which must be a multiple of 16. Leave it blank to use the emulator’s screen size.
- Show Taps: Enables visual feedback for taps.
Start Recordingbutton to record video.
Stop Recordingbutton to stop recording.
- Save the file as webm
Enable Emulator within Android Studio
Starting from Android Studio 4.1, you can make the emulator appear in the editor within a floating panel. Multi-emulators are supported. You can switch between the emulators using tabs.
- Access File > Settings > Tools > Emulator (or Android Studio > Preferences > Tools > Emulator on macOS)
- Select Launch in a tool window and click OK.
Open the emulator by:
- Access View > Tool Windows > Emulator.
- Open AVD Manager then start the required virtual device.
Enable split screen
Right mouse click on the tab contains a file’s name to open a popup menu then choose
Split Vertically / Horizontally feature.
Color Code Logcat
Coloring logcat will help you to separate logs inside Logcat.
- Go to Settings > Editor > Color Scheme > Android Logcat.
- Choose Theme then set color for each type of logcat such as Assert, Debug, Error, etc…
- Key promoter – A plugin which shows to user how easy he can make same action using only keyboard (menus and toolbar button mouse clicks initiates shortcut display)
- String Manipulation – A plugin which provides actions for text manipulation, including case switching, sorting, filtering, incrementing, aligning to columns, grepping, escaping, encoding, etc…
- Android Material Design Icon Generator – This plugin helps you to set Material Design icons to your Android project.
- ButterKnifeZelezny – Simple plugin that allows one-click creation of Butterknife view injections. It requires you to latest Butterknife lib on your classpath.
- Android Parcelable boilerplate– This plugin can generate an Android Parcelable implementation based on fields in the class.
- ADB Idea – It helps and automates adb commands, including uninstall, kill, start, restart, clear an application and clear the application data and restart it.
- Genymotion plugin – Create and start Genymotion virtual devices from Android Studio. You must have Genymotion installed on your computer before using this plugin.
- Builder plugin – Generates a static nested Builder for a class.