视图体系

本文介绍ViewRootImpl作为视图层级顶部组件的角色,它实现了View与WindowManager之间的协议。此外,还概述了ViewParent接口及ViewGroup类的功能与职责。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

/**
 * The top of a view hierarchy, implementing the needed protocol between View
 * and the WindowManager.  This is for the most part an internal implementation
 * detail of {
@link WindowManagerGlobal}.
 *
 * {
@hide}
 */

 

public final class ViewRootImpl implements ViewParent,
        View.AttachInfo.Callbacks, HardwareRenderer.HardwareDrawCallbacks

 

 

/**
 * Defines the responsibilities for a class that will be a parent of a View.
 * This is the API that a view sees when it wants to interact with its parent.
 *
 */

 

ViewParent

/** Interface to let you add and remove child views to an Activity. To get an instance
  * of this class, call {
@link android.content.Context#getSystemService(java.lang.String) Context.getSystemService()}.
  */

 

public interface ViewManager

 

/**
 *
<p>
 * A
</code> is a special view that can contain other views
 * (called children.) The view group is the base class for layouts and views
 * containers. This class also defines the
 * {
@link android.view.ViewGroup.LayoutParams} class which serves as the base
 * class for layouts parameters.
 *
</p>

 

public abstract class ViewGroup extends View implements ViewParent, ViewManager

 

public class View implements Drawable.Callback, KeyEvent.Callback,
        AccessibilityEventSource

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值