Android中实现自动生成布局View的初始化代码方法(2)
复制代码 代码如下: public class Test { private static final String[] layoutFiles ={"./res/g_ruler.xml","./res/report.xml"}; public static void main(String[] args) { if (args!=null) { for (int
复制代码 代码如下:
public class Test {
private static final String[] layoutFiles ={"./res/g_ruler.xml","./res/report.xml"};
public static void main(String[] args) {
if (args!=null) {
for (int i = 0; i < args.length; i++) {
System.out.println("");
System.out.println("---------"+args[i]+"----------");
System.out.println(ViewCodeUtil.getCode(args[i]));
}
}
for (int i = 0; i < layoutFiles.length; i++) {
System.out.println("");
System.out.println("//---------"+layoutFiles[i]+"----------");
System.out.println(ViewCodeUtil.getCode(layoutFiles[i]));
}
}
}
精彩图集
精彩文章