content_main.xml在Android studio 1.4中的作用是什么?

今天我更新我的Android工作室到最新版本是android studio1.4.Here默认情况下,在新项目中显示content_main.xml在布局文件夹,所以我无法找到什么是使用这个文件。
根据Android studio中的新设计模式activity_main.xml将确定如何全局UI的Activity应该是。另一方面content_main.xml将确定activity_main.xml中的内容。

也就是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
content

content_main:

This XML layout file resides in activity_my.xml (activity_main),and contains some settings and Textview(other) element.

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


xml怎么加入图片路径
rss源错误怎么解决
文件后缀xml是什么意思
xml格式电子发票怎么获取
xml格式是什么意思
rss是什么意思啊
xml格式电子发票怎么打开
rss订阅源是什么意思
rss源是什么
xml注释怎么写
php输出xml格式字符串
J2ME Mobile 3D入门教程系列文章之一
XML轻松学习手册
XML入门的常见问题(一)
XML入门的常见问题(三)
XML轻松学习手册(2)XML概念
xml文件介绍及使用
xml编程(一)-xml语法
XML文件结构和基本语法
第2章 包装类