在机器人工作室Acitvity_Main.xml和Fragment_main.xml文件之间的区别是什么 [英] What is the difference between Acitvity_Main.xml and Fragment_main.xml files in Android Studio

查看:242
本文介绍了在机器人工作室Acitvity_Main.xml和Fragment_main.xml文件之间的区别是什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在以往我创建一个新项目,该Fragment_main.xml文件添加到我的布局文件夹,而不像在Eclipse正是这个文件,它包含了常见的Activity_Main.xml file.Why永远是Fragment_main.xml文件添加到我的机器人Studio项目?它不同于常规Activity_main.xml文件?

When ever i create a new project, the Fragment_main.xml file is added to my Layout folder and unlike in Eclipse it is this file that contains what is normally in the Activity_Main.xml file.Why is the Fragment_main.xml file always added to my projects in Android Studio and how is it different from the "regular" Activity_main.xml file?

推荐答案

该Activity_main.xml包含布局的FragmentActivity和fragment_main.xml是布局的片段。

The Activity_main.xml contains the Layout for the FragmentActivity and the fragment_main.xml is the Layout for the fragment.

有关更多信息,片段和如何使用它。
请访问:<一href="http://developer.android.com/training/basics/fragments/index.html">http://developer.android.com/training/basics/fragments/index.html

For more information to fragments and how you can use it.
Visit: http://developer.android.com/training/basics/fragments/index.html

这篇关于在机器人工作室Acitvity_Main.xml和Fragment_main.xml文件之间的区别是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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