android 中的清单文件和 xml 文件有什么区别
What is the difference between manifest file and xml file in android
我是新手android.I想知道androidManifest文件和androidXMLfile.Both的主要区别是什么同样 xml。但是,他们之间的主要区别是什么,谁能提前解释一下please.Thanks
阅读docs关于清单
它说
The manifest file presents essential information about your app to the
Android system, information the system must have before it can run any
of the app's code.
此清单文件的文件类型应为.xml
并且,关于其他 XML 文件,几乎所有其他数据,除了代码之外,所有内容都以 XML 格式指定。
根据docs,之所以使用XML,原因如下
The advantage to declaring your UI in XML is that it enables you to
better separate the presentation of your application from the code
that controls its behavior. Your UI descriptions are external to your
application code, which means that you can modify or adapt it without
having to modify your source code and recompile. For example, you can
create XML layouts for different screen orientations, different device
screen sizes, and different languages. Additionally, declaring the
layout in XML makes it easier to visualize the structure of your UI,
so it's easier to debug problems. As such, this document focuses on
teaching you how to declare your layout in XML. If you're interested
in instantiating View objects at runtime, refer to the ViewGroup and
View class references.
我是新手android.I想知道androidManifest文件和androidXMLfile.Both的主要区别是什么同样 xml。但是,他们之间的主要区别是什么,谁能提前解释一下please.Thanks
阅读docs关于清单
它说
The manifest file presents essential information about your app to the Android system, information the system must have before it can run any of the app's code.
此清单文件的文件类型应为.xml
并且,关于其他 XML 文件,几乎所有其他数据,除了代码之外,所有内容都以 XML 格式指定。
根据docs,之所以使用XML,原因如下
The advantage to declaring your UI in XML is that it enables you to better separate the presentation of your application from the code that controls its behavior. Your UI descriptions are external to your application code, which means that you can modify or adapt it without having to modify your source code and recompile. For example, you can create XML layouts for different screen orientations, different device screen sizes, and different languages. Additionally, declaring the layout in XML makes it easier to visualize the structure of your UI, so it's easier to debug problems. As such, this document focuses on teaching you how to declare your layout in XML. If you're interested in instantiating View objects at runtime, refer to the ViewGroup and View class references.