use of org.robolectric.res.android.ResTable.ResourceName in project robolectric by robolectric.
the class ShadowArscAssetManager method getResourceName.
@Implementation
protected String getResourceName(int resid) {
CppAssetManager am = assetManagerForJavaObject();
ResourceName name = new ResourceName();
if (!am.getResources().getResourceName(resid, true, name)) {
return null;
}
StringBuilder str = new StringBuilder();
if (name.packageName != null) {
str.append(name.packageName.trim());
}
if (name.type != null) {
if (str.length() > 0) {
char div = ':';
str.append(div);
}
str.append(name.type);
}
if (name.name != null) {
if (str.length() > 0) {
char div = '/';
str.append(div);
}
str.append(name.name);
}
return str.toString();
}
Aggregations