com.android.tools.lint.detector.api
Class LayoutDetector
java.lang.Object
com.android.tools.lint.detector.api.Detector
com.android.tools.lint.detector.api.Detector.XmlDetectorAdapter
com.android.tools.lint.detector.api.ResourceXmlDetector
com.android.tools.lint.detector.api.LayoutDetector
- All Implemented Interfaces:
- Detector.XmlScanner
public abstract class LayoutDetector
- extends ResourceXmlDetector
Abstract class specifically intended for layout detectors which provides some
common utility methods shared by layout detectors.
NOTE: This is not a public or final API; if you rely on this be prepared
to adjust your code for the next tools release.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LayoutDetector
public LayoutDetector()
appliesTo
public boolean appliesTo(com.android.resources.ResourceFolderType folderType)
- Description copied from class:
ResourceXmlDetector
- Returns whether this detector applies to the given folder type. This
allows the detectors to be pruned from iteration, so for example when we
are analyzing a string value file we don't need to look up detectors
related to layout.
- Overrides:
appliesTo in class ResourceXmlDetector
- Parameters:
folderType - the folder type to be visited
- Returns:
- true if this detector can apply to resources in folders of the
given type
isWidthFillParent
protected static boolean isWidthFillParent(Element element)
isHeightFillParent
protected static boolean isHeightFillParent(Element element)
hasPadding
protected boolean hasPadding(Element root)
Copyright © 2008-2012. All Rights Reserved.