本文介绍了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.

视图组

  1. ViewGroup 是不可见的容器.它包含 ViewViewGroup
  2. 例如,LinearLayout 是包含 Button(View) 和其他 Layouts 的 ViewGroup.
  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的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-13 04:20