In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article shares a sample analysis of XML file formatting configuration in Eclipse Android projects. Xiaobian thinks it is quite practical, so share it with everyone for reference. Let's follow Xiaobian and have a look.
Eclipse Android development is actually quite convenient, but there are also some unsatisfactory places, such as XML file formatting effect is not ideal. By default, using ADT's visual interface layout, in the automatically generated xml file, the configuration of a control is squeezed into one line (the effect is shown below), which is very inconvenient to read and modify. And I hope that the formatting effect of *** is as follows, each attribute configuration of the control occupies a line for easy reading and modification, and the control without child elements can be used directly/>
To achieve formatting, you need to modify Eclipse Android configuration and perform some additional operations:
1. Modify Eclipse XML formatting configuration
The configuration for this step is to make the formatting effect one line for each property configuration of the control. Go to Window/Preferences and expand to XML/XML Files/Editor.
Check "Split multiple attributes seachonanewline", as shown in the following figure:
With this configuration, each attribute configuration takes up one line each time you format it using the shortcut Ctrl+Shift+F.
2. Declaration method of compressed nodes
The purpose of this step is to compress the declaration of elements without child nodes, such as converting "" to "".
The method is to right-click on the blank space in the XML file and select "Source/CleanupDocument... ", as shown in the following figure:
After that, the following interface will pop up:
Check "Compression element tags" and click OK.
For convenience, you can add a shortcut key for this operation, enter Window/Preferences, expand to General/Keys, and configure your favorite shortcut key as shown below:
Thank you for reading! About "Eclipse Android project XML file formatting configuration sample analysis" This article is shared here, I hope the above content can be of some help to everyone, so that we can learn more knowledge, if you think the article is good, you can share it to let more people see it!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.