理论问题:在加载Android的外部XML-布局文件 [英] Theoretical question: load external XML-Layout file in Android

查看:389
本文介绍了理论问题:在加载Android的外部XML-布局文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我认为这是可能不可能出于安全原因,但只是想确定:是否有可能从外部XML文件中的Andr​​oid创建布局

I thinks it's probably not possible for security reason but just want to be sure: is it possible to create layout in Android from an external XML file?

要完全一致:我要创建XML输出​​XSL在远程服务器上。我可以创造必要的布局直接在服务器上,然后将其下载到我的Andr​​oid应用程序。

To be exactly: I'm creating XML output with XSL on a remote server. I could create the necessary layout direct on the server and then download it to my Android App.

推荐答案

这是不可能的。在Android的XML布局不保存为XML。出于性能的考虑,他们是pre处理的编译过程中,并以二进制形式存储和布局充气只能识别二进制的形式,而不是XML。

It is impossible. XML layouts in Android are NOT stored as XML. For performance reasons, they are pre-processed during compilation and stored in binary form, and layout inflater only understands that binary form rather than xml.

这篇关于理论问题:在加载Android的外部XML-布局文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆