preface

There are a few things about Android Studio that, if we can master them, can greatly improve our productivity and save time.

Note: this article should be regarded as a classification summary article, which quotes some excellent online articles, is I read after feel very good writing, just posted.

I. Personalized Settings

According to their own preferences, to set their own personalized development tools, just like wearing their favorite clothes to go to work, bring different feelings, originally boring coding work, shouldn’t it add some color?

1. The interface

1.1 the theme

Coding, of course, is about picking your favorite topic. Under Settings — Appearance — Theme, you can choose black and light themes, depending on your preference.

Adjust Color for red green Vision for those who are colorblind and not sensitive to Color… Options.

1.2 background

Of course, you can also set the Background Image of As (Android Studio for short), such As Goddess Lin Zhiling, the two-dimensional girl. Click the “Background Image” in the above Image to set the Background Image.

Some people don’t like black style As, but white background is not good for eyes, you can change the background color, the following is the background color modification tutorial, you can set the background to bean paste color (protective color).

Android Studio sets the background color method

2. Code style

2.1 Font size and style

In [Settings] — [Editor] — [Font] you can change the Font size, spacing, and style. I like Fira Code of 13th.

2.2 Code configuration and style

The default code colors and styles may not be what you want, but here’s a website for downloading popular color schemes.

color-themes.com/

Select the color scheme you like, click in, select IDEA to download the corresponding JAR package

In the As, we can import the downloaded JAR and restart the As to take effect. (Conversely, we can Export Settings to Export the Settings, so that if we reinstall the As, we can import the jar again and do not need to reconfigure it.)

Two, quick operation

1. Shortcut key Settings

Here to share a fried chicken comprehensive As shortcut key article, I think has not been able to detailed again comprehensive, so direct portal in the past, we must carefully remember some common operation of the shortcut key, shortcut key can provide coding speed to a certain extent oh

The best Android Studio uses tips and shortcuts

Of course you can also customize the shortcut keys, in Settings — Keymap you can set the shortcut keys, for example: fast scroll to the top, I set Alt + T; Quickly scroll to the bottom and set Alt + B; Go to file Manager to open the file and set Alt + Shift + E.

(Image source network, infringement must be deleted)

2.Postfix Completion

As actually provides code completion, and learning these frequently used Postfix completions will save you a lot of manual work. Here are two articles that I think are well written. Thank you for sharing

Android Studio High Frequency Postfix summary

Postfix Completion

(Image source network, infringement must be deleted)

3.Template

Customizing templates commonly used in projects allows you to do manual work in seconds that takes minutes, such as untechnical but time-consuming code: Splash launch page, drop-down refresh control, Adapter implementation of ListView, etc.

3.1 Introduction to Template

Android Studio Template

Amazing Android Studio Template

3.2 How can I Customize a Template

It’s amazing how easy it is to write pages using custom templates in Android Studio

Android Studio Template Usage with custom Live Templates

3.3 As plugin TemplateBuilder

The process of creating a Template is tedious, so someone made an As plugin for everyone to use

TemplateBuilder(Chinese version)

(Image source network, infringement must be deleted)

Third, the plug-in

1. The Vim plug-in

How to type code in As? You may need the Vim plugin

With Vim in As, it may not go well at first, but after you use it skillfully, you can write a flowing feeling!

Android Studio + Vim

(Image source network, infringement must be deleted)

2. High efficiency plug-ins

The As plug-ins shared below, such As GsonFormat generating Bean objects, ButterKnife automatically generating annotations, and so on, couldn’t have saved any more time

Android Studio improves efficiency with common plugin collation

Gradle configuration

If you cut gradle compilation time to the extreme, and configure Gradle well, you might save more than a cup of coffee.

What? My Gradle build builds in 1s

summary

Thank you for your selfless sharing ~