com.android.tools.lint.checks
Class InefficientWeightDetector
java.lang.Object
com.android.tools.lint.detector.api.Detector
com.android.tools.lint.detector.api.ResourceXmlDetector
com.android.tools.lint.detector.api.LayoutDetector
com.android.tools.lint.checks.InefficientWeightDetector
- All Implemented Interfaces:
- com.android.tools.lint.detector.api.Detector.XmlScanner
public class InefficientWeightDetector
- extends com.android.tools.lint.detector.api.LayoutDetector
Checks whether a layout_weight is declared inefficiently.
Nested classes/interfaces inherited from class com.android.tools.lint.detector.api.Detector |
com.android.tools.lint.detector.api.Detector.ClassScanner, com.android.tools.lint.detector.api.Detector.JavaScanner, com.android.tools.lint.detector.api.Detector.OtherFileScanner, com.android.tools.lint.detector.api.Detector.XmlScanner |
Field Summary |
static com.android.tools.lint.detector.api.Issue |
BASELINE_WEIGHTS
Should a LinearLayout set android:baselineAligned? |
static com.android.tools.lint.detector.api.Issue |
INEFFICIENT_WEIGHT
Can a weight be replaced with 0dp instead for better performance? |
static com.android.tools.lint.detector.api.Issue |
NESTED_WEIGHTS
Are weights nested? |
static com.android.tools.lint.detector.api.Issue |
ORIENTATION
Missing explicit orientation |
static com.android.tools.lint.detector.api.Issue |
WRONG_0DP
Using 0dp on the wrong dimension |
Fields inherited from interface com.android.tools.lint.detector.api.Detector.XmlScanner |
ALL |
Method Summary |
java.util.Collection<java.lang.String> |
getApplicableElements()
|
com.android.tools.lint.detector.api.Speed |
getSpeed()
|
void |
visitElement(com.android.tools.lint.detector.api.XmlContext context,
org.w3c.dom.Element element)
|
Methods inherited from class com.android.tools.lint.detector.api.LayoutDetector |
appliesTo, hasPadding, isHeightFillParent, isWidthFillParent |
Methods inherited from class com.android.tools.lint.detector.api.ResourceXmlDetector |
appliesTo, run |
Methods inherited from class com.android.tools.lint.detector.api.Detector |
afterCheckFile, afterCheckLibraryProject, afterCheckProject, appliesToFolder, appliesToResourceRefs, beforeCheckFile, beforeCheckLibraryProject, beforeCheckProject, checkCall, checkClass, checkInstruction, createJavaVisitor, getApplicableAsmNodeTypes, getApplicableAttributes, getApplicableCallNames, getApplicableCallOwners, getApplicableFiles, getApplicableMethodNames, getApplicableNodeTypes, visitAttribute, visitDocument, visitElementAfter, visitMethod, visitResourceReference |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.android.tools.lint.detector.api.Detector.XmlScanner |
getApplicableAttributes, visitAttribute, visitDocument, visitElementAfter |
INEFFICIENT_WEIGHT
public static final com.android.tools.lint.detector.api.Issue INEFFICIENT_WEIGHT
- Can a weight be replaced with 0dp instead for better performance?
NESTED_WEIGHTS
public static final com.android.tools.lint.detector.api.Issue NESTED_WEIGHTS
- Are weights nested?
BASELINE_WEIGHTS
public static final com.android.tools.lint.detector.api.Issue BASELINE_WEIGHTS
- Should a LinearLayout set android:baselineAligned?
WRONG_0DP
public static final com.android.tools.lint.detector.api.Issue WRONG_0DP
- Using 0dp on the wrong dimension
ORIENTATION
public static final com.android.tools.lint.detector.api.Issue ORIENTATION
- Missing explicit orientation
InefficientWeightDetector
public InefficientWeightDetector()
- Constructs a new
InefficientWeightDetector
getSpeed
@NonNull
public com.android.tools.lint.detector.api.Speed getSpeed()
- Overrides:
getSpeed
in class com.android.tools.lint.detector.api.Detector
getApplicableElements
public java.util.Collection<java.lang.String> getApplicableElements()
- Specified by:
getApplicableElements
in interface com.android.tools.lint.detector.api.Detector.XmlScanner
- Overrides:
getApplicableElements
in class com.android.tools.lint.detector.api.Detector
visitElement
public void visitElement(@NonNull
com.android.tools.lint.detector.api.XmlContext context,
@NonNull
org.w3c.dom.Element element)
- Specified by:
visitElement
in interface com.android.tools.lint.detector.api.Detector.XmlScanner
- Overrides:
visitElement
in class com.android.tools.lint.detector.api.Detector