public void setLicenses(int id) throws NotFoundException,
XmlPullParserException, IOException {
List<License> licenses = ParseLicenseXml.Parse(getResources()
.getXml(id));
LayoutInflater inflater = (LayoutInflater) getContext()
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View child;
TextView title;
TextView name;
TextView license;
for (License l : licenses) {
child = inflater.inflate(R.layout.license_layout, null);
title = (TextView) child.findViewById(R.id.license_title);
name = (TextView) child.findViewById(R.id.license_name);
license = (TextView) child.findViewById(R.id.license_license);
title.setText(getContext().getResources().getString(
l.getType() == License.TYPE_FILE ? R.string.file
: R.string.software));
name.setText(getContext().getResources().getString(R.string.bullet)
+ l.getName());
license.setText(l.getLicense());
mContainer.addView(child);
}