"Android Development experience" Android Studio1.0 official version of the first experience-the use of common features guide

Source: Internet
Author: User

Reprint Please specify source: http://blog.csdn.net/zhaokaiqiang1992

In the previous article, we set up the platform for Android studio, an article that will introduce some of the common features of Android Studio. The following features are the most commonly used, but certainly not all, if you have any other questions, you can give me a message, after the settlement I will tell you.


1. How to import projects created by Eclipse projects

Our previous project was basically created by Eclipse, and if I wanted to manage it now with Android Studio, what should we do?

First, select the project that we want to transfer in Eclipse, then select File-export, select the following item, and export it according to how Gradle is built.


This will enable our Android studio to import this project.

First open as, then file, import project, like this


Can import the item's icon is not the same, very intimate ha.


2. Set Theme Style

The official version of as has two styles, white black, black cool, girls in front of the necessary skills to play handsome.

First open the preference, and then find the following options, choose a theme on your own OK



3. Set the font for the code

The following interface sets the code preview interface font settings, note scheme name, first need save As, save a name, and then modify the font and size.



4. Set the font for the system interface

If we want to set the system font, then we need to find the Appearance option, then check override Defalut fonts by (not recommended), then set the font and size to



5. Set the file and encoding format of the project

Unified coding for the importance of programming, self-evident ah! If we want to set the encoding format of the project, first, we want to have a project, then select the project, open Preferances, set the IDE Encoding, Project Encoding, default Encoding, respectively. The recommendations are set to UTF-8.



6. Shortcut key Settings

As the shortcut key is very flexible, not only has its own set of shortcut key System, and in order to facilitate the users of eclipse, he can also follow the Eclipse shortcut key habits, so we can quickly get started.



7. Set the number of lines of code to display

Right-click on the left side and select Show line numbers



8. Code Analysis

Android Studio provides powerful code analysis capabilities that can be used to uncover problems in our projects. Select the Analyze menu and select Inspect Code


Select OK in the pop-up box below


The following is an analysis of the results of a project


There are a lot of questions listed here, we can optimize our code according to these tips, very powerful!


9. Picture view and color value selection

In eclipse, to view a picture is very painful, we double-click on the picture resource, will call other programs to open the picture, very troublesome, but as in the program to add a picture viewer, we can double-click the image after the direct view, and can see the size, length and width of information, This is extremely convenient for us. In addition, we often use other software in order to get a color value or a color value conversion, but now with the AS, it all becomes very simple.

In the picture Viewer, click the right button and select the Color picker below.


After clicking, the following interface appears, in which we can adjust the color directly and get the RGB color value and the 16-bit color value. We click on the left side of the small straw, you can directly to the picture to take color, just need to stop the straw to take the color of the location, this tool is too convenient!



10. Multi-resolution preview of layouts

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

First click on the layout file, then select the options below in the Priview on the right.


In this way we can see basically all the main equipment display effect, this is an artifact!



11. Memory consumption of the monitor program

You can use this tool if your program is running very well and you can't find the cause.

First, select a project to run in debug mode, then click on the Meory Monitor in the lower right corner of the as interface, select our test phone, and the application in debug mode, then we can visually see the memory footprint of the program, just like this. Oh, my test machine is a hammer ... Exposed ...




From the above simple introduction, we can definitely feel Google in the development of as a great effort, we simply understand the characteristics of AS, has not started to write code, but I believe that writing code to absolutely cool! If you are attracted to these traits, then try to get started!

"Android Development experience" Android Studio1.0 official version of the first experience-the use of common features guide

Related Article

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.