也就是content_main.xml将包含textview,edittext,button等组件。它将包含在activity_main.xml中。
所以我们可以认为content_main.xml就像在HTML中的partial。 activity_main.xml将包含您的活动全局设计,content_main.xml将包含内容。
从它们包含什么:
activity_main:协调器布局,ViewPager等
content_main:开发人员选择元素。 textview,edittext,button等。
android developer website对他们说的是什么
activity_main:
This XML layout file is for the activity you added when you created
the project with Android Studio. Following the New Project workflow,
Android Studio presents this file with both a text view and a preview
of the screen UI. The file contains some default interface elements
from the material design library,including the app bar and a floating
action button. It also includes a separate layout file with the main
contentcontent_main:
This XML layout file resides in
activity_my.xml
(activity_main),and contains some settings and Textview(other) element.
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。