Methods Summary |
---|
public int | getAlternateCount()Returns the number of alternate versions of this resource.
int count = 0;
for (ResourceFile file : mFiles) {
if (file.getFolder().getConfiguration().isDefault() == false) {
count++;
}
}
return count;
|
public boolean | hasAlternates()Returns if the resource item has at least one non-default configuration.
for (ResourceFile file : mFiles) {
if (file.getFolder().getConfiguration().isDefault() == false) {
return true;
}
}
return false;
|
public boolean | hasDefault()Returns whether the resource has a default version, with no qualifier.
for (ResourceFile file : mFiles) {
if (file.getFolder().getConfiguration().isDefault()) {
return true;
}
}
// We only want to return false if there's no default and more than 0 items.
return (mFiles.size() == 0);
|
public boolean | isEditableDirectly()
return hasAlternates() == false;
|