Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我使用代码创建了一个linearlyaout并添加了视图java。是否可以将此布局转换为xml布局并将其保存到存储中?
linearlyaout
java
xml
没有什么能阻止您解析所有这些Views属性,然后构建一个 xml 布局文件。但是,您将无法像文件夹中setContentView(R.layout.built_layout)的其他布局一样使用构造的 xml 布局(如 ) 。res/layout
Views
setContentView(R.layout.built_layout)
res/layout