layoutopt
Stay organized with collections
Save and categorize content based on your preferences.
Note: The Android layoutopt
tool has been replaced
by the lint
tool beginning in SDK Tools revision 16. The lint
tool reports UI
layout performance issues in a similar way as layoutopt
and detects additional problems.
For more information about using lint
, see
Improve your code with lint checks.
layoutopt
is a command-line tool that helps you optimize the
layouts and layout hierarchies of your applications. This document is a reference for the available command line options.
Usage
To run layoutopt
against a given list of layout resources:
layoutopt <file_or_directory> ...
For example:
$ layoutopt res/layout-land
$ layoutopt res/layout/main.xml res/layout-land/main.xml
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2023-04-12 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-04-12 UTC."],[],[]]