Small knowledge, big challenge! This article is participating in the creation activity of “Essential Tips for Programmers”.
👉 About the author
As we all know, life is a long process of constantly overcoming difficulties and reflecting on progress. In this process, there will be a lot of questions and thoughts about life, so I decided to share my thoughts, experiences and stories to find resonance!!
Focus on Android/Unity and various game development tips, as well as various resource sharing (websites, tools, materials, source code, games, etc.)
Welcome to pay attention to the public account [Mr. Empty name] for more resources and communication!
👉 premise
The current environment
2020.3.1 Patch 2 version was last downloaded on October 8, 2021
👉 Practice
😜 shortcuts
As long as the computer, shortcut keys are essential, she can effectively avoid some complex operations to complete the task, greatly improve efficiency. Be familiar with Android Studio’s shortcuts as well.
Quick search: Double click on Shift or Ctrl+ Shift+F or Ctrl+F
Multi – line edit: this function is quite important, small empty in peacetime basic is the inevitable use of skills. Select multiple simultaneous edits. The default should be Alt+J. You can add shortcuts, such as Alt+D, to make things easier.
Add Selection for Next Occurrence go to file-settings-keymap
Parameter definition hint: sometimes when you call a method, you pass too many parameters, forget the type or meaning of the parameter, and press Ctrl+P when the cursor is placed over the method to quickly remind you what to pass.
Move line up and down: Alt+Shift+ up arrow or down arrow
Quick copy when first: [Ctrl+D]
View the outline: When the class is too long, you can view the current minimization screen. Ctrl+F12 is similar to Stucture in the panel.
One-click removal of useless Imports: Although the default import is folded, the gray and useless import is really confusing. Androit doesn’t like it either, so it offers one-click removal: Code-Optimize Imports, shortcut Ctrl+Alt+O.
When a class is writing a lot of code, the collapse method gives you a good idea of the main functionality of the class.
【Ctrl+Shift+ Number key + sign 】 : Expand all methods
[Ctrl+Shift+ Number key minus] : Fold all methods
【Ctrl + number key + sign 】 : Expand the current cursor location method
[Ctrl + number key minus] : Fold the current cursor location method
😜 Demo Mode
Medium and large companies have a habit of reviewing code, which can quickly improve code quality and learn from each other. But you can’t have a bunch of people around a small computer screen, which is fine if the code area is still that small.
So Android Studio provides a demo mode that makes it easy to zoom in on areas of code and “point the way.”
👉 other
📢 author: Kom and Kom in Kom
📢 reprint instructions – be sure to specify the source: Zhim Granular’s personal home page – column – Nuggets (juejin. Cn)
📢 welcome to like 👍 collect 🌟 message 📝