Android Studio Cheat Sheet
Here's a cheat sheet summarizing some of the common features and shortcuts in Android Studio:
yaml
// Android Studio Cheat Sheet
General Shortcuts:
- Ctrl + Space: Code completion
- Ctrl + Shift + Space: Smart code completion
- Ctrl + P: Parameter info (within method call)
- Ctrl + Q: Quick documentation lookup
- Ctrl + F1: Show error description (when cursor is on error)
- Ctrl + /: Comment/uncomment selected lines
- Ctrl + Shift + /: Comment/uncomment block of code
- Ctrl + Shift + V: Paste from clipboard history
- Ctrl + D: Duplicate current line or selection
- Ctrl + Y: Delete current line
- Ctrl + Shift + Z: Redo
- Ctrl + Shift + F: Find in path
- Ctrl + Shift + R: Replace in path
Code Navigation:
- Ctrl + N: Go to class
- Ctrl + Shift + N: Go to file
- Ctrl + B: Go to declaration
- Ctrl + Alt + B: Go to implementation(s)
- Ctrl + F12: File structure popup
- Ctrl + E: Recent files popup
- Ctrl + G: Go to line
Build and Run:
- Shift + F10: Run
- Shift + F9: Debug
- Ctrl + F10: Run context configuration
- Ctrl + Shift + F10: Run edited configuration
Debugging:
- F8: Step over
- F7: Step into
- Shift + F8: Step out
- Alt + Shift + F9: Debug App
- Alt + Shift + F10: Run App
Layout Editor:
- Ctrl + Left Mouse Click: Jump to XML declaration
- Alt + Enter: Show suggestions (for errors or warnings)
- Ctrl + Alt + L: Reformat code
- Ctrl + Alt + O: Optimize imports
Git Integration:
- Ctrl + K: Commit changes
- Ctrl + T: Update project
- Ctrl + Shift + K: Push changes
- Ctrl + Shift + A: Find action
Refactoring:
- Shift + F6: Rename
- Ctrl + Alt + M: Extract method
- Ctrl + Alt + C: Extract constant
- Ctrl + Alt + V: Extract variable
These are just a few of the many shortcuts and features available in Android Studio. Exploring the IDE and experimenting with different shortcuts will help improve your productivity and efficiency while developing Android applications.
This cheat sheet covers some of the commonly used shortcuts and features in Android Studio, including general shortcuts, code navigation, build and run commands, debugging, layout editor, Git integration, and refactoring. It serves as a handy reference for quick look-ups and reminders while working with Android Studio.
Comments
Post a Comment