use of org.jetbrains.android.sdk.AndroidTargetData in project android by JetBrains.
the class StateListPicker method doValidate.
/**
* Returns a {@link ValidationInfo} in the case one of the state list state has a value that does not resolve to a valid resource,
* or a value that is a private framework value. or if one of the state list component requires an API level higher than minApi.
*/
@Nullable
public /*if there is no error*/
ValidationInfo doValidate(int minApi) {
IAndroidTarget target = myConfiguration.getRealTarget();
assert target != null;
final AndroidTargetData androidTargetData = AndroidTargetData.getTargetData(target, myModule);
assert androidTargetData != null;
ResourceRepository frameworkResources = myConfiguration.getFrameworkResources();
assert frameworkResources != null;
for (StateComponent component : myStateComponents) {
ValidationInfo error = component.doValidate(minApi, androidTargetData);
if (error != null) {
return error;
}
}
return null;
}
Aggregations