Several settings for Android studio

Source: Internet
Author: User

1. Theme.

File->settings, search theme, click Appearance, select Darcula in the theme of the right panel.

2. Comment Shortcut keys.

File->settings, search Keymap, point open keymap, search on the right panel, find Other->fix doc comment, double click, choose Add Keyboard Shortcut, press your shortcut key. In Eclipse it's ALT + Shift +J, but there's a conflict here, so I'm using a near shortcut key combination: ALT + SHIFT + K. Android Studio's shortcuts are much smarter than eclipse for modifying document annotations, such as adding parameters.

3, the member variable prefix.

If you name the member variable used to prefix with a m, but generate getter and setter, and do not want to have this m in the method name, can be set as follows.

File->settings->code Style->java, then select the Code generation tag in the right panel, Naming,field this line with the corresponding name prefix plus m.

4. Sorting methods.

If you always adjust the way you write, so that you can make calls or function-related methods close to each other, you can set this up.

As the 3rd step, select Arrangment in the label, hook keep dependent methods together, you can choose whether to sort by breadth or by depth.

5, the new file's comment template.

File->settings, search comment, find file and Code Templates, right panel, Templates->class, and then modify the contents of the edit box. The following is the comment template for the interface (Interface). My comment template is as follows:

#if (${package_name} && ${package_name} = "") package ${package_name}; #end/** * User:geek_soledad (email Protected]) * Date: ${year}-${month}-${day} * Time: ${hour}:${minute} * Fixme */public class ${name} {}

You can also back up the original file Header in the Include tab, and then modify it.


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.