首页 > 代码库 > 1.1.3 Getting Started_Budding Your First App_Building a Simple User Interface
1.1.3 Getting Started_Budding Your First App_Building a Simple User Interface
The graphical user interface for an Android app is built using a hierarchy of View
and ViewGroup
objects. View
objects are usually UI widgets such as buttons or text fields and ViewGroup
objects are invisible view containers that define how the child views are laid out, such as in a grid or a vertical list.
Android provides an XML vocabulary that corresponds to the subclasses of View
and ViewGroup
so you can define your UI in XML using a hierarchy of UI elements.
Android的用户界面使用 View 和 ViewGroup 这种层级结构创建。View 就是通常的UI widgets(小工具),比如 buttons,text fields,ViewGroup 是不可见的 view 的容器,它来定义包含的 View 的布局,比如一个网格或者垂直列表。
Android 提供一种XML语法对应 View 和 ViewGroup ,因此你能在 XML 中使用层级的 UI 元素来定义你的 UI
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。