Theoretical question: load external XML-Layout file in Android

前端 未结 4 582
名媛妹妹
名媛妹妹 2021-01-02 04:10

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?

To be exactl

4条回答
  •  遥遥无期
    2021-01-02 04:44

    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.

提交回复
热议问题