[Android development experience] Android Studio1.0 official version experience-User Guide on common features, androidstudio1.0

Source: Internet
Author: User

[Android development experience] Android Studio1.0 official version experience-User Guide on common features, androidstudio1.0

Reprinted please indicate the source: http://blog.csdn.net/zhaokaiqiang1992

In the previous article, we set up the Android Studio platform. This article describes some common features of Android Studio. The functions described below are the most commonly used, but they are certainly incomplete. If you have any other questions, please leave a message and I will tell you after the solution.


1. How to import a project created by the Eclipse project

Our previous projects were basically created by Eclipse. What should we do if I want to manage them with Android Studio?

First, select the project to be transferred in Eclipse, then select File-export, select the following item, and export it according to the gradle build method.


In this way, Android Studio can import this project.

First open AS, then File, import project, AS shown below


The icons of projects that can be imported are different.


2. Set the theme Style

The official version of AS has two styles: white black and black cool. It is essential for girls to play handsome games.

Enable Preference first, find the following options, and select a topic as needed.



3. Set the font of the Code

The following page sets the font settings of the Code preview interface. Note the Scheme name. You must first Save As, Save your own name, and then modify the font and size.



4. Set the font of the System Interface

If we want to set the system font, we need to find the Appearance option, select Override defalut fonts by (not recommended), and set the font and size.



5. Set the file and encoding format of the project.

The importance of unified coding for programming is self-evident! If you want to set the Project Encoding format, you must first have a Project, select the Project, open Preferances, and set IDE Encoding, Project encoding, and Default Encoding respectively. It is recommended that all be set to UTF-8.



6. Shortcut Key settings

AS shortcut keys are flexible. They not only have their own set of shortcut keys, but also can be used by Eclipse users for convenience, so that we can get started quickly.



7. Set the number of lines of code to be displayed.

Right-click on the left and select Show Line Numbers.



8. Code Analysis

Android Studio provides powerful code analysis functions, which can be used to detect problems in our project. Select the Analyze menu and then Inspect Code


Select OK in the pop-up box below.


The following is the analysis result of a project.


Many problems are listed here. We can optimize our code based on these tips, which is very powerful!


9. view images and select colors

In Eclipse, it is very painful to view an image. When we double-click an image resource, we will call other programs to open the image, which is very troublesome, however, AS adds an image viewer to the program. After double-clicking the image, you can directly view the image and view the size, length, width, and other information, which is very convenient for us. In addition, we often use other software to take a color value or convert the color value, but now with the AS, all this is very simple.

Right-click the Image Viewer and select the Color Picker below.


After clicking, the following interface is displayed. On this interface, we can adjust the color directly and obtain the RGB color value and 16-bit color value. Click the small straw on the left to directly color the image. You only need to leave the straw at the position where the color is needed. This tool is too convenient!



10. Multi-Resolution preview of the layout

In addition to the exciting features above, AS also provides a powerful layout for multi-device preview, which is too convenient for interface adaptation!

First, click the layout file and select the following options in priview on the right.


In this way, we can see the Display Effect of basically all mainstream devices at the same time. This is simply an artifact!



11. Monitor memory usage

You can use this tool if your program runs very quickly but cannot find the cause.

First, select a project to run in Debug mode, then open Meory Monitor in the lower-right corner of the AS Interface, and select our test mobile phone and the Application in Debug mode. Then, we can intuitively see the memory usage of the program, just like this. Haha, my test machine is a hammer... exposed...




From the above brief introduction, we can definitely feel that Google has made great efforts in the development of AS. We just have a simple understanding of the features of AS and have not started to write code, but I believe it is absolutely cool to write code! If you are also attracted by these features, please try it now!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.