2.0, Android Studio write your application

Android Studio contains various tools for each development stage, but the most important thing is to write code.

Efficient coding

Next is the method that can help you program efficiently.

Quick fix with Lint

Android Studio provides a code scanning tool called Lint to help you identify and correct errors without having to execute the app or write test cases.
Every time you build an application, Android Studio runs Lint to check your source files and find potential bugs. Provide optimization suggestions on error correction, safety, performance, usability, internationalization, etc.

View documentation and resources

You can put the cursor on the method or member or class name and press F1 to consult the document.

Create a new file quickly

When you create a new file, click on the target directory in the Project window and press Alt+Insert, Android Studio will display a small window showing some suggested file types.

Edit resource files

Android Studio includes the following features and tools to help you create and manage resource files.

Create images that support all screen pixels

Android Studio includes a tool called Vector Asset Studio to help you create images that support each screen size. You can upload your own SVG file for editing or choose from the material design icons provided by Google. Start by clicking File> New> Vector Asset.

Preview pictures and colors

When you quote a picture or icon in the code, a preview of the picture or icon will be displayed on the left.
To preview the full-size picture, click Preview on the left. Or move the cursor to the code and press F1.

Create a new layout

Android Studio provides an advanced layout editor that allows you to drag and drop controls into the layout and preview when editing the XML file.
Click on the module you want to add a layout to, and then execute File> New> XML> Layout XML File

Translate UI characters

The Translations Editor tool gives you a separate view of the resources that need to be translated, making it easier to change or translate. You can even find missing translations.

Author: Song Zhihui
personal micro-blog: Click to enter

Guess you like

Origin blog.csdn.net/song19891121/article/details/51722406