packages\apps\Launcher3\res\xml\folder_shapes.xml
packages\apps\Launcher3\src\com\android\launcher3\graphics\IconShape.java
上述文件的解析在 IconShape中
private static List<IconShape> getAllShapes(Context context) {
ArrayList<IconShape> result = new ArrayList<>();
try (XmlResourceParser parser = context.getResources().getXml(R.xml.folder_shapes)) {
// Find the root tag
int type;
while ((type = parser.next()) != XmlPullParser.END_TAG
&& type != XmlPullParser.END_DOCUMENT
&& !"shapes".equals(parser.getName()));
final int depth = parser.getDepth();
int[] radiusAttr = new int[] {R.attr.folderIconRadius};
while (((type = parser.next(