com.android.sdklib.internal.repository.packages
Class LayoutlibVersionMixin
java.lang.Object
com.android.sdklib.internal.repository.packages.LayoutlibVersionMixin
- All Implemented Interfaces:
- ILayoutlibVersion
public class LayoutlibVersionMixin
- extends java.lang.Object
- implements ILayoutlibVersion
Helper class to handle the layoutlib version provided by a package.
|
Constructor Summary |
LayoutlibVersionMixin(org.w3c.dom.Node pkgNode)
Parses an XML node to process the <layoutlib> element. |
LayoutlibVersionMixin(java.util.Properties props)
Parses the layoutlib version optionally available in the given Properties. |
|
Method Summary |
boolean |
equals(java.lang.Object obj)
|
com.android.utils.Pair<java.lang.Integer,java.lang.Integer> |
getLayoutlibVersion()
Returns the layoutlib version. |
int |
hashCode()
|
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
LayoutlibVersionMixin
public LayoutlibVersionMixin(org.w3c.dom.Node pkgNode)
- Parses an XML node to process the
<layoutlib> element.
The layoutlib element is new in the XSD rev 4, so we need to cope with it missing
in earlier XMLs.
LayoutlibVersionMixin
public LayoutlibVersionMixin(java.util.Properties props)
- Parses the layoutlib version optionally available in the given
Properties.
getLayoutlibVersion
public com.android.utils.Pair<java.lang.Integer,java.lang.Integer> getLayoutlibVersion()
- Returns the layoutlib version.
The first integer is the API of layoublib, which should be > 0.
It will be equal to
ILayoutlibVersion.LAYOUTLIB_API_NOT_SPECIFIED (0) if the layoutlib
version isn't specified.
The second integer is the revision for that given API. It is >= 0
and works as a minor revision number, incremented for the same API level.
- Specified by:
getLayoutlibVersion in interface ILayoutlibVersion
- Since:
- sdk-repository-4.xsd and sdk-addon-2.xsd
hashCode
public int hashCode()
- Overrides:
hashCode in class java.lang.Object
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals in class java.lang.Object