@@ -0,0 +1,1316 @@
+import xml.etree.ElementTree as ET%0Aimport os%0A%0AdirDecodeEncoding = %22gbk%22;%0A %0Adef GetFileList(dir, fileList):%0A    newDir = dir%0A    # if dir is file and filename extension is xml%0A    if os.path.isfile(dir) and dir.decode(dirDecodeEncoding).endswith(%22.xml%22) and os.path.dirname(dir).endswith(%22%5Clayout%22):%0A        fileList.append(dir.decode(dirDecodeEncoding))%0A    elif os.path.isdir(dir):  %0A        for s in os.listdir(dir):%0A            # ignore generated folder an hidden folder%0A            if s == %22build%22 or s == %22gen%22 or s.startswith(%22.%22):%0A                continue%0A            newDir=os.path.join(dir,s)%0A            GetFileList(newDir, fileList)  %0A    return fileList;%0A %0Adef addFitsSystemWindows(filePath):%0A    ET.register_namespace(%22android%22, %22http://schemas.android.com/apk/res/android%22)%0A    with open(filePath, %22r%22) as handle:%0A        root = ET.parse(handle)%0A    try:%0A        isSet = root.getroot().attrib%5B%22%7Bhttp://schemas.android.com/apk/res/android%7DfitsSystemWindows%22%5D;%0A        if isSet == false:%0A            raise Exception%0A    except Exception, e:%0A        root.getroot().attrib%5B%22%7Bhttp://schemas.android.com/apk/res/android%7DfitsSystemWindows%22%5D = %22true%22%0A    root.write(filePath, encoding='utf-8', xml_declaration=True)%0A%0Alist = GetFileList(os.getcwd(), %5B%5D)%0Afor filePath in list:%0A    addFitsSystemWindows(filePath);

should work correctly