// TODO: Implement this properly.
String name = super.getName();
if (name == null) {
return null;
}
// Store tools attributes if this looks like a layout we'll need adapter view
// bindings for in the LayoutlibCallback.
if (LIST_VIEW.equals(name) || EXPANDABLE_LIST_VIEW.equals(name) || GRID_VIEW.equals(name) || SPINNER.equals(name)) {
Map<String, String> map = null;
int count = getAttributeCount();
for (int i = 0; i < count; i++) {
String namespace = getAttributeNamespace(i);
if (namespace != null && namespace.equals(TOOLS_URI)) {
String attribute = getAttributeName(i);
if (attribute.equals(ATTR_IGNORE)) {
continue;
}
if (map == null) {
map = new HashMap<String, String>(4);
}
map.put(attribute, getAttributeValue(i));
}
}
return map;
}
return null;