Commit ba7a69f3 by sikang

bug fix

parent 9d5d8c41
...@@ -91,8 +91,7 @@ class LayoutGarble: ...@@ -91,8 +91,7 @@ class LayoutGarble:
with open(path,"w+",encoding='utf-8') as fin: with open(path,"w+",encoding='utf-8') as fin:
for line in lines: for line in lines:
if "<TextView" in line or "<ImageView" in line or "<EditText" in line \ if "</LinearLayout>" in line or "</RelativeLayout>" in line or "</FrameLayout>":
or "<Button" in line or "<ImageButton" in line or "<CheckBox" in line:
if random.randint(0,10) % random.randint(2,3) == 0: if random.randint(0,10) % random.randint(2,3) == 0:
view = self.__create_views(1).replace("/>","\n%s/>"%"android:visibility=\"gone\"") view = self.__create_views(1).replace("/>","\n%s/>"%"android:visibility=\"gone\"")
line = "%s\n%s"%(view,line) line = "%s\n%s"%(view,line)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment