public static final class ManifestData.SupportsScreens
extends java.lang.Object
supports-screens
node in the manifest.
By default, all the getters will return null if there was no value defined in the manifest.
To get an instance with all the actual values, use resolveSupportsScreensValues(int)
Constructor and Description |
---|
SupportsScreens() |
SupportsScreens(java.lang.String value)
Instantiate an instance from a string.
|
Modifier and Type | Method and Description |
---|---|
int |
compareScreenSizesWith(ManifestData.SupportsScreens o)
Comparison of 2 Supports-screens.
|
boolean |
equals(java.lang.Object obj) |
java.lang.Boolean |
getAnyDensity()
returns the value of the
anyDensity attribute or null if not present. |
static ManifestData.SupportsScreens |
getDefaultValues(int targetSdkVersion)
Returns an instance of
ManifestData.SupportsScreens initialized with the default values
based on the given targetSdkVersion. |
java.lang.String |
getEncodedValues()
Returns a string encoding of the content of the instance.
|
java.lang.Boolean |
getLargeScreens()
returns the value of the
largeScreens attribute or null if not present. |
java.lang.Boolean |
getNormalScreens()
returns the value of the
normalScreens attribute or null if not present. |
java.lang.Boolean |
getResizeable()
returns the value of the
resizeable attribute or null if not present. |
java.lang.Boolean |
getSmallScreens()
returns the value of the
smallScreens attribute or null if not present. |
int |
hashCode() |
boolean |
hasSameScreenSupportAs(ManifestData.SupportsScreens support)
Returns true if the two instances support the same screen sizes.
|
boolean |
hasStrictlyDifferentScreenSupportAs(ManifestData.SupportsScreens support)
Returns true if the two instances have strictly different screen size support.
|
boolean |
overlapWith(ManifestData.SupportsScreens otherSS)
Returns true if the two instance overlap with each other.
|
ManifestData.SupportsScreens |
resolveSupportsScreensValues(int targetSdkVersion)
Returns a version of the receiver for which all values have been set, even if they
were not present in the manifest.
|
java.lang.String |
toString() |
public SupportsScreens()
public SupportsScreens(java.lang.String value)
getEncodedValues()
.value
- the string.public static ManifestData.SupportsScreens getDefaultValues(int targetSdkVersion)
ManifestData.SupportsScreens
initialized with the default values
based on the given targetSdkVersion.targetSdkVersion
- public ManifestData.SupportsScreens resolveSupportsScreensValues(int targetSdkVersion)
targetSdkVersion
- the target api level of the app, since this has an effect
on default values.public java.lang.Boolean getResizeable()
resizeable
attribute or null if not present.public java.lang.Boolean getAnyDensity()
anyDensity
attribute or null if not present.public java.lang.Boolean getSmallScreens()
smallScreens
attribute or null if not present.public java.lang.Boolean getNormalScreens()
normalScreens
attribute or null if not present.public java.lang.Boolean getLargeScreens()
largeScreens
attribute or null if not present.public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean hasSameScreenSupportAs(ManifestData.SupportsScreens support)
equals(Object)
except that it ignores the values of
getAnyDensity()
and getResizeable()
.support
- the other instance to compare to.public boolean hasStrictlyDifferentScreenSupportAs(ManifestData.SupportsScreens support)
support
- the other instance to compare to.public int compareScreenSizesWith(ManifestData.SupportsScreens o)
#hasStrictlyDifferentScreenSupportAs(SupportsScreens)
returns true and
#overlapWith(SupportsScreens)
returns false.java.lang.IllegalArgumentException
- if the two instanced are not strictly different or
overlap each other#hasStrictlyDifferentScreenSupportAs(SupportsScreens)
,
#overlapWith(SupportsScreens)
public java.lang.String getEncodedValues()
ManifestData.SupportsScreens
object through
#SupportsScreens(String)
.public java.lang.String toString()
toString
in class java.lang.Object
public boolean overlapWith(ManifestData.SupportsScreens otherSS)
otherSS
- the other supports-screens to compare to.