Giter Site home page Giter Site logo

layoutformatter's Introduction

LayoutFormatter

Retrofit your Android layout XML files.

It will adjust your attributes order in accordance with the rules, and it will adjust some attributes to the front, and take some attributes at the end of the rows. It will make your code format more nice.

Related article: 《当我们谈 XML 布局文件代码的优雅性》

Obtaining & Installation

The plugin is distributed through the Plugin Manager in IntelliJ. https://plugins.jetbrains.com/plugin/8299

Search word LayoutFormatter: On Mac: Preference -> Plugins -> Browse repositories

Or you can download the jar file from LayoutFormatter.jar, then Preferences -> Plugin -> Install plugin from disk...

Usage

YourFiles -> PopupMenu(Right Click) -> Refactor -> Reformat Layout XML.

Or you could use the default keyboard-shortcut: ctrl alt F (command alt F).

Changelog

v1.1.3

  • Add more rules, up to 70.

v1.1.2

  • Support Windows system;
  • Fix the />< bug.

v1.1.1

  • Adjust the location of the Action to RefactoringMenu;
  • Support UNDO(ctrl/command + z);
  • Filter non XML file;
  • Support one key to format all files on the entire project or folder;
  • Add default keyboard-shortcut: ctrl alt F (command alt F).

v1.0.4

  • Fix the bad style that > or /> may be moved to a newline;
  • Add fill_parent to match_parent;
  • Add dip to dp.

Deprecated

This project is deprecated in favor of the Android Studio has the same XML formatter: Editor -> Code Style -> XML -> Arrangement

However

I still think this plugin is more powerful, and easier to use.

Issues

layoutformatter's People

Contributors

drakeet avatar junyuecao avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.