Eclipse/adt (Android Develop Tool) Some convenient initial settings

Source: Internet
Author: User


1. Set the background color of the editing window
The background color of Eclipse's main editing window, the default is white, personal feel too bright, recommended to protect the vision of "dark green", of course, can also be changed according to personal preferences, such as


2. The font size of the main editing window, etc.,
Can also be based on their own hobby settings, the individual font size, such as:



Develop Android, often also use the XML layout file, the above settings, only valid for the code file, open the XML file found the font is also very small, the XML file font settings are as follows:




3. Automatic Code Completion Settings。



Android interface A lot of, of course, need code hint function, refers to "enter a few characters, followed by automatic completion."
For this setting, I explained in detail below:
Eclipse Default Code Auto-completion has two ways
First, the direct use of the shortcut key "Ctrl + Space" will pop-up prompt (this is the Mac platform shortcut Keys, other platforms are not sure is the same)
The second is, in the input "_" or "." A prompt will pop up afterwards.
But I want to enter any character that pops up at the beginning, not just "_." Before the prompt appears.
The following setting means that you enter which characters are automatically prompted, and the default is "_.",
So I changed it to ". _abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz"
This allows you to enter any of the above characters to bring up the code completion hint.
Note: When I do Android, I often use "r.id", after the input capital R code completion is very annoying, you used to know, so I simply remove R, of course, you can according to your own needs of the capital R also get on.
Third, when editing the XML file, the default is only when the "<=:" Input These characters will be prompted, according to their own needs, you can add the lowercase 26 letters.
Set the following: (The input box below is too small to show the full)






4.android tests often need to run


The default shortcut keys do not seem to be very useful, nor is it customary, I changed to my favorite shortcut keys,
Note: To configure the "run Config" for the project first.
Such as


Other than that
Search for "content assist" to set up shortcut keys for active pop-up prompts
Search for "word completion" and auto-complete related settings

5. After the click Run, if the file is in the edit state, but not saved, then will be prompted to save
Generally we are going to save it, so we want to save all the files automatically after clicking Run. As set:
Note: Many people with eclipse are accustomed to keep pressing "ctrl+s" to save, in fact, according to the following settings, you will never have to press "Ctrl+s". and "Ctrl+shift+s" is the shortcut key to save all the current files.

Explanations of the following 3 options:
Always: Automatically save all files after clicking Run
Never: After clicking Run, the state of all files remains, meaning that the edited file is still in edit state. The files that run like this are still old files.
Prompt: This is the default state of Eclipse, that is, after clicking Run, if there are unsaved files, pop up the prompt, whether to save



6. code block (code template) features
It's like you're typing for in the editor.


By default, the first one, enter (or use the mouse selected), a large string of related code appears as follows:



This function is very convenient, we can also define the relevant keywords, not just "for", set the following:
If you want to customize it, just add it in here.


Reference connection: http://developer.51cto.com/art/201103/249292.htm

7. Install the color theme for the editor

1. To install the theme plugin for Elipse, proceed as follows:

Refer to the following: (in English, but the installation procedure should be understood)

\***************************** Reference ********************************\

If you were on Eclipse 3.6 (Helios), the easiest-to-install the plugin is from the Eclipse Marketplace. Go to help→eclipse Marketplace ..., then search for Eclipse Color Theme and install it.

If you is on Eclipse 3.5 (Galileo), go to help→install New software ..., press Add Site and enterECL Ipse Color Theme as the name and Http://eclipse-color-theme.github.com/update as the URL. Then select the new entry from the "select box labeled work with," Mark Eclipse Color Theme for Installati On and proceed.

Please Note: If You is using a version of the plugin lower than 0.6, please uninstall and reinstall it following the instructions Above. Update site and plugin ID have changed.

\***************************** Reference ********************************\

After successful installation, the Setup interface is as follows: ( Window→preferences→general→appereance→color Theme



The topic list has been installed by default in the first few topics, click to preview the effect on the right
If you feel that the theme is not satisfied, you can go to the official website to download,
Official website: http://eclipsecolorthemes.org

 Previous article: Android platform and API level of the corresponding relationshipNext : Android add source to eclipse and related settings

Eclipse/adt (Android Develop Tool) Some convenient initial settings

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.