Android中View和ViewGroup之间的区别 [英] Difference between View and ViewGroup in Android

查看:133
本文介绍了Android中View和ViewGroup之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Android编程中,ViewViewGroup有什么区别?

What is the difference between a View and a ViewGroup in Android programming?

推荐答案

查看

  1. View对象是Android中用户界面(UI)元素的基本构建块.
  2. View是一个简单的矩形框,用于响应用户的操作.
  3. 例如EditTextButtonCheckBox等.
  4. View引用android.view.View类,它是所有UI类的基类.
  1. View objects are the basic building blocks of User Interface(UI) elements in Android.
  2. View is a simple rectangle box which responds to the user's actions.
  3. Examples are EditText, Button, CheckBox etc..
  4. View refers to the android.view.View class, which is the base class of all UI classes.

ViewGroup

  1. ViewGroup是不可见的容器.它包含ViewViewGroup
  2. 例如,LinearLayoutViewGroup,其中包含Button(View)和其他布局.
  3. ViewGroup是布局的基类.
  1. ViewGroup is the invisible container. It holds View and ViewGroup
  2. For example, LinearLayout is the ViewGroup that contains Button(View), and other Layouts also.
  3. ViewGroup is the base class for Layouts.

这篇关于Android中View和ViewGroup之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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